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:	Sun, 8 Feb 2009 17:07:10 +0800
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Heiko Carstens <heiko.carstens@...ibm.com>
Cc:	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Greg KH <gregkh@...e.de>,
	Shane Hathaway <shane@...hawaymix.org>,
	Daolong Wang <ahlongxp@...il.com>,
	User-mode Linux Kernel Development 
	<user-mode-linux-devel@...ts.sourceforge.net>,
	Jeff Dike <jdike@...toit.com>,
	Linux Kernel Development <linux-kernel@...r.kernel.org>,
	Rob Landley <rob@...dley.net>,
	Am?rico Wang <xiyou.wangcong@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>, stable@...nel.org,
	Al Viro <viro@...IV.linux.org.uk>,
	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
Subject: Re: [uml-devel] [Patch] uml: fix a link error


I am sorry for the delay.

On Sat, Feb 07, 2009 at 12:59:56PM +0100, Heiko Carstens wrote:
>On Wed, 4 Feb 2009 21:54:12 +0100 (CET)
>Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
>> I verified that Shane's solution:
>> 
>> #define sys_sigprocmask sys_kernel_sigprocmask
>> 
>> works for me, but that's definitely not the cleanest way.
>> 
>> Al Viro also had a suggestion to rework the SYSCALL_DEFINE* macros, but I
>> haven't tried it yet.
>
>
>Patch below should fix it.
>
>
>Subject: [PATCH] syscall define: fix uml compile bug
>
>From: Heiko Carstens <heiko.carstens@...ibm.com>
>
>With the new system call defines we get this on uml:
>
>arch/um/sys-i386/built-in.o: In function `sys_call_table':
>(.rodata+0x308): undefined reference to `sys_sigprocmask'
>
>Reason for this is that uml passes the preprocessor option
>-Dsigprocmask=kernel_sigprocmask to gcc when compiling the kernel.
>This causes SYSCALL_DEFINE3(sigprocmask, ...) to be expanded to
>SYSCALL_DEFINEx(3, kernel_sigprocmask, ...) and finally to a system call
>named sys_kernel_sigprocmask. However sys_sigprocmask is missing because
>of this.


Hmmm, thanks for analysis this.

I found my mistake, I thought the Makefile invokes the 'strip' command
to do replacement, but it is not, Makefile has a built-in command named
strip. Sorry for this.

Then the problem is fully from preprocessing.


>To avoid macro expansion for the system call name just concatenate the
>name at first define instead of carrying it through severel levels.
>This was pointed out by Al Viro.
>

Yes, indeed!


>Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>


Your patch should fix this problem. But... see below.


> 	}								\
>-	SYSCALL_ALIAS(sys_##name, SyS_##name);				\
>-	static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__))
>+	SYSCALL_ALIAS(sys##name, SyS##name);				\
>+	static inline long SYSC##name(__SC_DECL##x(__VA_ARGS__))

So your final actual name for a syscall 'foo' will be 'sysfoo'
instead of 'sys_foo', right?

But we have lots of explicit calls to something like sys_foo,
won't your patch break them?


-- 
"Against stupidity, the gods themselves, contend in vain."

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