lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 25 Aug 2009 09:40:05 -0400
From:	Jason Baron <jbaron@...hat.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	linux-kernel@...r.kernel.org, x86@...nel.org, lethal@...ux-sh.org,
	mingo@...e.hu, laijs@...fujitsu.com, peterz@...radead.org,
	mathieu.desnoyers@...ymtl.ca, jiayingz@...gle.com,
	mbligh@...gle.com, lizf@...fujitsu.com, jistone@...hat.com,
	tglx@...utronix.de, hpa@...or.com
Subject: Re: [PATCH 2/4] Add NR_syscalls for x86_64

On Mon, Aug 24, 2009 at 06:44:00PM -0400, Steven Rostedt wrote:
> On Tue, 25 Aug 2009, Frederic Weisbecker wrote:
> 
> > On Mon, Aug 24, 2009 at 05:40:18PM -0400, Jason Baron wrote:
> > > Add a dynamic definition of NR_syscalls for x86_64. This is used in the 
> > > syscall events tracing code.
> > > 
> > > Signed-off-by: Jason Baron <jbaron@...hat.com>
> > > 
> > > ---
> > >  include/linux/ftrace.h |    5 +++++
> > >  1 files changed, 5 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> > > index dc3b132..3bd94ee 100644
> > > --- a/include/linux/ftrace.h
> > > +++ b/include/linux/ftrace.h
> > > @@ -14,6 +14,11 @@
> > >  
> > >  #include <asm/ftrace.h>
> > >  
> > > +#ifdef CONFIG_X86_64
> > > +#include <asm/asm-offsets.h>
> > > +#define NR_syscalls (__NR_syscall_max + 1)
> > > +#endif
> > > +
> > 
> > 
> > I'd rather see this in arch/x86/include/unistd_64.h, since
> > NR_syscalls seems to be the defined in unistd.h in all archs.
> > 
> > That also makes a unified way to retrieve this number for
> > other users.
> > 
> 
> Yes, NR_syscalls should be included there.
> 
> -- Steve

right, for x86_64, unistd.h is included to generate __NR_syscall_max
which is then used for NR_syscalls. So I did initially try it there, but
there were dependency problems. I'll see what I can come up with...

thanks,

-Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ