All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: trinity@vger.kernel.org
Subject: Re: [patch 1/2] add init() function to struct syscall
Date: Wed, 19 Jun 2013 22:40:52 -0400	[thread overview]
Message-ID: <20130620024052.GB24618@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1306192205300.5613@vincent-weaver-1.um.maine.edu>

On Wed, Jun 19, 2013 at 10:09:09PM -0400, Vince Weaver wrote:
 > 
 > While working on the perf_event_open() sysfs init problem, I was wondering
 > if it might be easier if we added the possibility of an init() routine
 > to each syscall structure.  That way trinity can support doing setup
 > before fuzzing begins.
 > 
 > Below is a quick patch implementing this, it seems to work but I still 
 > don't have the best grasp of trinity internals.
 > 
 > Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
 > 
 > diff --git a/include/syscall.h b/include/syscall.h
 > index ccbe436..a58a506 100644
 > --- a/include/syscall.h
 > +++ b/include/syscall.h
 > @@ -32,6 +32,7 @@ struct arglist {
 >  struct syscall {
 >  	void (*sanitise)(int childno);
 >  	void (*post)(int);
 > +	int (*init)(void);
 >  
 >  	unsigned int number;
 >  	const char name[80];

Nothing wrong with this patch, but it's highlighted a bug that's been in trinity
for a while.  Changes to the syscall struct should cause everything in syscalls/*
to be rebuilt. But somehow the dependency magic in the Makefile doesn't pick it up.

Anyone with better make-fu than me want to take a stab at that ?

	Dave

  parent reply	other threads:[~2013-06-20  2:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20  2:09 [patch 1/2] add init() function to struct syscall Vince Weaver
2013-06-20  2:10 ` [patch 2/2] make perf_event_open() use init routine Vince Weaver
2013-06-20  2:38 ` [patch 1/2] add init() function to struct syscall Dave Jones
2013-06-20  2:40 ` Dave Jones [this message]
2013-06-20  4:15   ` Michael Ellerman
2013-06-20  4:48     ` Dave Jones
2013-06-20  9:33       ` Michael Ellerman

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=20130620024052.GB24618@redhat.com \
    --to=davej@redhat.com \
    --cc=trinity@vger.kernel.org \
    --cc=vincent.weaver@maine.edu \
    /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.