linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Syscall wrappers breaks things.
@ 2009-02-20 18:48 David Daney
  2009-02-21 10:02 ` Heiko Carstens
  0 siblings, 1 reply; 2+ messages in thread
From: David Daney @ 2009-02-20 18:48 UTC (permalink / raw)
  To: Heiko Carstens, Martin Schwidefsky, Ralf Baechle, Linus Torvalds,
	Andrew Morton
  Cc: Linux Kernel Mailing List

In commit ee6a093222549ac0c72cfd296c69fa5e7d6daa34 the syscall wrappers 
infrastructure was introduced.

A typical definition is something like this (from Ralf's patch):

SYSCALL_DEFINE6(32_ipc, u32, call, long, first, long, second, long, third,
	unsigned long, ptr, unsigned long, fifth)
{
.
.
.

This creates a symbol sys_32_ipc.  The old name of the symbol is 
sys32_ipc (note the change in the number of '_').

For the mips64 kernel the syscall table for o32 ABI executable contains:

.
.
.
	PTR	sys32_ipc
.
.
.

This is now linked to the sys32_ipc function in kernel/sys_ni.c which 
kindly returns ENOSYS.

The long and short of the problem is that the is now a kernel wide 
mismatch in function names between the names created by SYSCALL_DEFINE*, 
the syscall tables and kernel/sys_ni.c.

I am not sure what the best solution is, but something should probably 
be done to un-break things.

Thanks,
David Daney

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Syscall wrappers breaks things.
  2009-02-20 18:48 Syscall wrappers breaks things David Daney
@ 2009-02-21 10:02 ` Heiko Carstens
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2009-02-21 10:02 UTC (permalink / raw)
  To: David Daney
  Cc: Martin Schwidefsky, Ralf Baechle, Linus Torvalds, Andrew Morton,
	Linux Kernel Mailing List

On Fri, 20 Feb 2009 10:48:58 -0800
David Daney <ddaney@caviumnetworks.com> wrote:

> In commit ee6a093222549ac0c72cfd296c69fa5e7d6daa34 the syscall wrappers 
> infrastructure was introduced.
> 
> A typical definition is something like this (from Ralf's patch):
> 
> SYSCALL_DEFINE6(32_ipc, u32, call, long, first, long, second, long, third,
> 	unsigned long, ptr, unsigned long, fifth)
> {
> .
> 
> This creates a symbol sys_32_ipc.  The old name of the symbol is 
> sys32_ipc (note the change in the number of '_').
> 
> For the mips64 kernel the syscall table for o32 ABI executable contains:
> 	PTR	sys32_ipc
> This is now linked to the sys32_ipc function in kernel/sys_ni.c which 
> kindly returns ENOSYS.

Sure, the SYSCALL_DEFINE macros work only for system calls that follow
the sys_[whatever] naming convention. In this case the original system
call should be renamed. E.g. sys_mips_ipc.

> The long and short of the problem is that the is now a kernel wide 
> mismatch in function names between the names created by SYSCALL_DEFINE*, 
> the syscall tables and kernel/sys_ni.c.

Only if the macros are used in a wrong way.

> I am not sure what the best solution is, but something should probably 
> be done to un-break things.

Fix the patch that converts mips to system call wrappers ;)

Ralf's patch isn't in Linus' repository nor is it in linux-next. Or at
least I couldn't find it. So it looks like you're talking about some
private git tree?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-21 10:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-20 18:48 Syscall wrappers breaks things David Daney
2009-02-21 10:02 ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).