[lkml]   [2011]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] ipc: provide generic compat versions of IPC syscalls
On Friday 09 December 2011, Chris Metcalf wrote:
> Several of the existing compat IPC syscalls are really just i386
> compatibility, not generic compatibility. semctl() expects a
> pointer to the fourth argument, instead of the fourth argument itself.
> msgsnd(), msgrcv() and shmat() expect arguments in different order.
> This change adds an __ARCH_WANT_GENERIC_COMPAT_IPC define that
> can be set in <asm/compat.h> to indicate that the IPC compat code
> should provide exactly the same APIs to "compat" users as the
> regular IPC code does to regular users. In addition, it sets up
> to always request the IPC_64 mode, since that's what the <asm-generic>
> APIs always use.
> The workaround code in "tile" for msgsnd() and msgrcv() is removed
> with this change; it fixes the bug that shmat() and semctl() were
> not also being properly converted to expect generic compat IPC.
> Signed-off-by: Chris Metcalf <>

I like the patch, but I think the __ARCH_WANT_GENERIC_COMPAT_IPC
should be defined as the opposite, so all "old" architectures
have to set it while tile (and future architectures like arm64
and unicore64) just get the default.

> Finding the shmat/semctl bugs in tilegx finally motivated me to go and
> do the thing he suggested 18 months ago. :-) Whether someone wants to
> go a step further and actually move the i386-ish versions into arch/x86
> I will leave to the x86 platform maintainers; I also don't know whether,
> perhaps, some other platforms are actually using the i386 convention.

I don't see them as x86 specific. We have powerpc, mips, s390, sparc and
x86 using the legacy method, while only parisc and tile get it right
and use the syscalls directly.


 \ /
  Last update: 2011-12-09 17:05    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean