[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/7] tools/fuzz: introduce x86 instruction emulator target
On Mon, Dec 12, 2016 at 02:58:39AM -0700, Jan Beulich wrote: > >>> On 12.12.16 at 10:28, <wei.liu2@xxxxxxxxxx> wrote: > > Instruction emulator fuzzing code is from code previous written by > > Andrew and George. Adapted to llvm fuzzer and hook up the build system. > > > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > > Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx> > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > > --- > > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > > Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> > > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > > Cc: Jan Beulich <jbeulich@xxxxxxxx> > > Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > > Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> > > Cc: Tim Deegan <tim@xxxxxxx> > > Cc: Wei Liu <wei.liu2@xxxxxxxxxx> > > > > v3: > > 1. coding style fix > > 2. share more code > > 3. exit when stack can't be made executable > > --- > > .gitignore | 1 + > > tools/fuzz/x86_instruction_emulator/Makefile | 31 ++++ > > .../x86-insn-emulator-fuzzer.c | 195 > > +++++++++++++++++++++ > > 3 files changed, 227 insertions(+) > > create mode 100644 tools/fuzz/x86_instruction_emulator/Makefile > > create mode 100644 > > tools/fuzz/x86_instruction_emulator/x86-insn-emulator-fuzzer.c > > > > diff --git a/.gitignore b/.gitignore > > index a2f34a1..d507243 100644 > > --- a/.gitignore > > +++ b/.gitignore > > @@ -145,6 +145,7 @@ tools/flask/utils/flask-loadpolicy > > tools/flask/utils/flask-setenforce > > tools/flask/utils/flask-set-bool > > tools/flask/utils/flask-label-pci > > +tools/fuzz/x86_instruction_emulator/x86_emulate* > > tools/helpers/_paths.h > > tools/helpers/init-xenstore-domain > > tools/helpers/xen-init-dom0 > > diff --git a/tools/fuzz/x86_instruction_emulator/Makefile > > b/tools/fuzz/x86_instruction_emulator/Makefile > > new file mode 100644 > > index 0000000..2b147ac > > --- /dev/null > > +++ b/tools/fuzz/x86_instruction_emulator/Makefile > > @@ -0,0 +1,31 @@ > > +XEN_ROOT=$(CURDIR)/../../.. > > +include $(XEN_ROOT)/tools/Rules.mk > > + > > +x86-instruction-emulator-fuzzer-all: x86-insn-emulator.a > > x86-insn-emulator-fuzzer.o > > + > > +x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h: > > + [ -L x86_emulate ] || ln -sf $(XEN_ROOT)/xen/arch/x86/x86_emulate . > > + > > +x86_emulate.c x86_emulate.h: %: > > + [ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$* > > + > > +CFLAGS += $(CFLAGS_xeninclude) > > + > > +x86_emulate.o: x86_emulate.c x86_emulate.h x86_emulate/x86_emulate.c > > x86_emulate/x86_emulate.h > > Perhaps worthwhile shortening this to > > x86_emulate.o: x86_emulate.[ch] x86_emulate/x86_emulate.[ch] > > ? > Ah, I thought this would work, but it doesn't. And I forgot to remove the old links when testing this. Now in a clean build: make[2]: *** No rule to make target 'x86_emulate.[ch]', needed by 'x86_emulate.o'. Stop. So I guess I will stick with what I had before. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |