sudo apt-get install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev
sudo apt-get install libnfs-dev libiscsi-dev
./configure --target-list=x86_64-softmmu,x86_64-linux-user,i386-linux-user --extra-cflags=-save-temps --disable-werror --disable-xen --disable-vnc --disable-vnc-png --disable-vnc-jpeg --disable-vnc-sasl --disable-blobs --disable-bluez --disable-bsd-user
make
sudo make install
qemu-x86_64 [-M instruction] [-j/c/rpath path] [-enable-coarse/fine-CFI] [-ss/tss] [-encrypt]
-M instruction
- monitor jmp/call/ret instruction and output information
-jpath path
- set jmp CFG file path
-cpath path
- set call CFG file path
-rpath path
- set ret CFG file path
-enable-coarse-CFI
- enable Coarse-grained CFI mechanism
-enable-fine-CFI
- enable Fine-grained CFI mechanism
-ss
- set shadow stack mechanism
-tss
- set traditional shadow stack mechanism
-encrypt
- encrypt return address
qemu help
qemu-x86_64 --help
Execute a linux process with QEMU
qemu-x86_64 xxx
You can monitor jmp instruction and enable coarse-grained CFI, note you should to append CFG file path with -jpath command
qemu-x86_64 -M jmp -jpath path -enable-coarse-CFI xxx
You can turn on shadow stack mechanism
qemu-x86_64 -ss