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: <20070508182424.GA31516@uranus.ravnborg.org>
Date:	Tue, 8 May 2007 20:24:24 +0200
From:	Sam Ravnborg <sam@...nborg.org>
To:	"Luck, Tony" <tony.luck@...el.com>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Kees Cook <kees@...flux.net>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] kbuild: complain about missing system calls.

On Mon, May 07, 2007 at 03:51:49PM -0700, Luck, Tony wrote:
> > You could add them to scripts/checksyscalls.sh itself -- I think it's
> > fairly unlikely that those are syscalls which a new arch port is going
> > to 'forget' :)
> 
> Like this?
> 
> diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
> index f98171f..4d49056 100755
> --- a/scripts/checksyscalls.sh
> +++ b/scripts/checksyscalls.sh
> @@ -98,6 +98,14 @@ cat << EOF
>  #define __IGNORE_setgid32
>  #define __IGNORE_setfsuid32
>  #define __IGNORE_setfsgid32
> +/* ... some legacy names not used by ia64 */
> +#define __IGNORE_fork
> +#define __IGNORE_time
> +#define __IGNORE_alarm
> +#define __IGNORE_pause
> +#define __IGNORE_utime
> +#define __IGNORE_getpgrp
> +#define __IGNORE_vfork
>  
>  /* Unmerged syscalls for AFS, STREAMS, etc. */
>  #define __IGNORE_afs_syscall

I would prefer to introduce something in checksyscalls.sh that allows us
to do something arch specific.
I recall that x86_64 had one syscall implemented using VDSO or similar
and therefore got listed.
This is just a quick hack - can be done better by someone that is more
fluent in shell scripting...


diff --git a/scripts/checksyscalls.sh b/scripts/checksyscalls.sh
index f98171f..715ed62 100755
--- a/scripts/checksyscalls.sh
+++ b/scripts/checksyscalls.sh
@@ -107,6 +107,13 @@ cat << EOF
 EOF
 }
 
+ignore_arch_list() {
+	f=include/asm/ignore_syscalls
+	if [ -f $f ]; then
+		source $f
+	fi
+}
+
 syscall_list() {
 sed -n -e '/^\#define/ { s/[^_]*__NR_\([^[:space:]]*\).*/\
 \#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\
@@ -114,5 +121,5 @@ sed -n -e '/^\#define/ { s/[^_]*__NR_\([^[:space:]]*\).*/\
 \#endif/p }' $1
 }
 
-(ignore_list && syscall_list ${srctree}/include/asm-i386/unistd.h) | \
+(ignore_list && ignore_arch_list && syscall_list ${srctree}/include/asm-i386/unistd.h) | \
 $* -E -x c - > /dev/null

Then adding a fie like this to include/asm-x86_64 will allow us to ignore getcpu
for x86_64 only.

# syscalls that are ignored for x86_64
# on top of generic ones specified in scripts/checksyscalls.sh

cat << EOF
#define __IGNORE_getcpu
EOF



Comments?

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