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]
Message-Id: <201108171122.49009.arnd@arndb.de>
Date:	Wed, 17 Aug 2011 11:22:48 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Mikael Pettersson <mikpe@...uu.se>
Cc:	Will Drewry <wad@...omium.org>, linux-kernel@...r.kernel.org,
	Russell King <linux@....linux.org.uk>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Mike Frysinger <vapier@...too.org>,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [RFC,PATCH] arch/arm: compute and export NR_syscalls

On Wednesday 17 August 2011, Mikael Pettersson wrote:
>  > I proposed this approach based solely on prior threads I've seen. E.g.,
>  > - https://lkml.org/lkml/2007/6/1/427
>  >   (don't just #define)
>  > - https://lkml.org/lkml/2009/8/27/280
>  >   (todo: x86-32 to move to x86-64)
>  > 
>  > If a single line #define is good enough, then it certainly works for me.
> 
> Yes, the one-line #define NR_syscalls in unistd.h is a perfectly adequate,
> if not entirely elegant, solution.  Adding asm-export.c just for this is
> waaay overkill.

Right. While the main problem with having the constant in asm/unistd.h
(needs to be kept in sync when adding new syscalls) is an annoyance,
the suggested approach is adding more complexity than necessary.

If you want to have the value automatically computed, I'd suggest
moving the format of unistd.h over to a method like the one used
by x86-64 and asm-generic, which is to combine the syscall number
definitions with the list of syscall pointers that currently reside
in arch/arm/kernel/calls.S, for the added benefit that it's easier to
keep the two in sync as well.

The main question is what Russell's preference is on the alternatives.

	Arnd
--
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