All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Tim Deegan <tim@xen.org>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH VERY RFC 3/5] tools/fuzz: introduce x86 instruction emulator target
Date: Thu, 8 Dec 2016 17:57:30 +0000	[thread overview]
Message-ID: <20161208175730.GF2940@citrix.com> (raw)
In-Reply-To: <584984380200007800126D83@prv-mh.provo.novell.com>

On Thu, Dec 08, 2016 at 08:03:04AM -0700, Jan Beulich wrote:
> >>> On 08.12.16 at 14:54, <wei.liu2@citrix.com> wrote:
> > Instruction emulator fuzzing code is from code previous written by
> > Andrew and George. Adapted to llvm fuzzer and hook up the build system.
> 
> With this, how much of the new code could be shared between
> Google's fuzzer and AFL, for which George had put this together
> originally afaik? Or are we now no longer planning on having an
> AFL target?
> 
> > --- /dev/null
> > +++ b/tools/fuzz/x86_instruction_emulator/Makefile
> > @@ -0,0 +1,33 @@
> > +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:
> > +	[ -L x86_emulate.c ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/x86_emulate.c
> > +
> > +x86_emulate.h:
> > +	[ -L x86_emulate.h ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/x86_emulate.h
> 
> I think these two could easily be a single (pattern) rule, with (slightly
> unusually) the file extension being the stem.

I think it is better to have them explicitly spelled out, because using
something like

x86_emulate.%:
	[ -L x86_emulate.$* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/x86_emulate.$*

would cause the x86_emulate.o compiled in tools/tests/x86_emulator be
linked here, too, due to another rule we have:

x86_emulate.o: x86_emulate.c x86_emulate.h x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h 

Please let me know if you have some other ideas to deal with this.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-12-08 17:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 13:54 [PATCH VERY RFC 0/5] Fuzzing targets for oss-fuzz Wei Liu
2016-12-08 13:54 ` [PATCH VERY RFC 1/5] libelf: don't always include libxc headers Wei Liu
2016-12-08 14:44   ` Jan Beulich
2016-12-08 13:54 ` [PATCH VERY RFC 2/5] tools/fuzz: introduce libelf target Wei Liu
2016-12-08 14:47   ` Jan Beulich
2016-12-08 14:49     ` Wei Liu
2016-12-08 13:54 ` [PATCH VERY RFC 3/5] tools/fuzz: introduce x86 instruction emulator target Wei Liu
2016-12-08 15:03   ` Jan Beulich
2016-12-08 15:15     ` Wei Liu
2016-12-08 17:25     ` Wei Liu
2016-12-09  8:05       ` Jan Beulich
2016-12-09 10:51         ` Wei Liu
2016-12-08 17:57     ` Wei Liu [this message]
2016-12-09  8:09       ` Jan Beulich
2016-12-09 10:30         ` Wei Liu
2016-12-08 13:54 ` [PATCH VERY RFC 4/5] tools: hook up fuzz directory Wei Liu
2016-12-08 13:54 ` [PATCH VERY RFC 5/5] tools/fuzz: add README Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161208175730.GF2940@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.