mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/insn-fuzz: Use shorter filenames
Amongst other things, these tab complete more easily. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
3a54f72491
commit
1c98756183
5 files changed
+13
-13
No files matched your search
+1
-1
@@ -158,7 +158,7 @@ tools/flask/utils/flask-label-pci
|
||||
tools/fuzz/libelf/afl-libelf-fuzzer
|
||||
tools/fuzz/x86_instruction_emulator/asm
|
||||
tools/fuzz/x86_instruction_emulator/x86_emulate*
|
||||
tools/fuzz/x86_instruction_emulator/afl-x86-insn-emulator-fuzzer
|
||||
tools/fuzz/x86_instruction_emulator/afl-harness
|
||||
tools/helpers/_paths.h
|
||||
tools/helpers/init-xenstore-domain
|
||||
tools/helpers/xen-init-dom0
|
||||
|
||||
@@ -18,15 +18,15 @@ Use the x86 instruction emulator fuzzer as an example.
|
||||
2. run the following commands to build:
|
||||
$ cd tools/fuzz/x86_instruction_emulator
|
||||
$ make distclean
|
||||
$ make CC=$AFLPATH/afl-gcc afl # produces afl-x86-insn-emulator-fuzzer
|
||||
$ make CC=$AFLPATH/afl-gcc afl # produces afl-harness
|
||||
|
||||
3. provide initial test case (fuzzer dependent, see afl-*.c):
|
||||
$ mkdir testcase_dir
|
||||
$ dd if=/dev/urandom of=testcase_dir/rand.bin \
|
||||
bs=`./afl-x86-insn-emulator-fuzzer --min-input-size` count=1
|
||||
bs=`./afl-harness --min-input-size` count=1
|
||||
|
||||
4. run the fuzzer with AFL:
|
||||
$ $AFLPATH/afl-fuzz -m none -t 1000 -i testcase_dir -o findings_dir -- \
|
||||
./afl-x86-insn-emulator-fuzzer @@
|
||||
./afl-harness @@
|
||||
|
||||
Please see AFL documentation for more information.
|
||||
@@ -1,11 +1,11 @@
|
||||
XEN_ROOT=$(CURDIR)/../../..
|
||||
include $(XEN_ROOT)/tools/Rules.mk
|
||||
|
||||
.PHONY: x86-instruction-emulator-fuzzer-all
|
||||
.PHONY: x86-insn-fuzz-all
|
||||
ifeq ($(CONFIG_X86_64),y)
|
||||
x86-instruction-emulator-fuzzer-all: x86-insn-emulator.a x86-insn-emulator-fuzzer.o afl
|
||||
x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl
|
||||
else
|
||||
x86-instruction-emulator-fuzzer-all:
|
||||
x86-insn-fuzz-all:
|
||||
endif
|
||||
|
||||
x86_emulate:
|
||||
@@ -28,17 +28,17 @@ x86_emulate.h := x86_emulate.h x86_emulate/x86_emulate.h $(x86.h)
|
||||
|
||||
x86_emulate.o: x86_emulate.c x86_emulate/x86_emulate.c $(x86_emulate.h)
|
||||
|
||||
x86-insn-emulator-fuzzer.o: $(x86_emulate.h)
|
||||
fuzz-emul.o: $(x86_emulate.h)
|
||||
|
||||
x86-insn-emulator.a: x86-insn-emulator-fuzzer.o x86_emulate.o
|
||||
x86-insn-fuzzer.a: fuzz-emul.o x86_emulate.o
|
||||
$(AR) rc $@ $^
|
||||
|
||||
afl-x86-insn-emulator-fuzzer: afl-x86-insn-emulator-fuzzer.o x86-insn-emulator-fuzzer.o x86_emulate.o
|
||||
afl-harness: afl-harness.o fuzz-emul.o x86_emulate.o
|
||||
$(CC) $(CFLAGS) $^ -o $@
|
||||
|
||||
# Common targets
|
||||
.PHONY: all
|
||||
all: x86-instruction-emulator-fuzzer-all
|
||||
all: x86-insn-fuzz-all
|
||||
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
@@ -46,10 +46,10 @@ distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.a *.o .*.d *-x86-insn-emulator-fuzzer
|
||||
rm -f *.a *.o .*.d afl-harness
|
||||
|
||||
.PHONY: install
|
||||
install: all
|
||||
|
||||
.PHONY: afl
|
||||
afl: afl-x86-insn-emulator-fuzzer
|
||||
afl: afl-harness
|
||||
File renamed without changes.
File renamed without changes.