06 Mar, 2013

1 commit


31 Jul, 2012

1 commit

  • If the SHMLBA definition for a native task differs from the definition for
    a compat task, the do_shmat() function would need to handle both.

    This patch introduces COMPAT_SHMLBA, which is used by the compat shmat
    syscall when calling the ipc code and allows architectures such as AArch64
    (where the native SHMLBA is 64k but the compat (AArch32) definition is
    16k) to provide the correct semantics for compat IPC system calls.

    Cc: David S. Miller
    Cc: Chris Zankel
    Cc: Arnd Bergmann
    Acked-by: Catalin Marinas
    Signed-off-by: Will Deacon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon
     

23 Mar, 2010

1 commit

  • I chased down a fail on ppc64 on 2.6.34-rc2 where an application that
    uses shared memory was getting a SEGV.

    Commit baed7fc9b580bd3fb8252ff1d9b36eaf1f86b670 ("Add generic sys_ipc
    wrapper") changed the second argument from an unsigned long to an int.
    When we call shmget the system call wrappers for sys_ipc will sign
    extend second (ie the size) which truncates it. It took a while to
    track down because the call succeeds and strace shows the untruncated
    size :)

    The patch below changes second from an int to an unsigned long which
    fixes shmget on ppc64 (and I assume s390, sparc64 and mips64).

    Signed-off-by: Anton Blanchard
    --

    I assume the function prototypes for the other IPC methods would cause us
    to sign or zero extend second where appropriate (avoiding any security
    issues). Come to think of it, the syscall wrappers for each method should do
    that for us as well.
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     

13 Mar, 2010

1 commit

  • Add a generic implementation of the ipc demultiplexer syscall. Except for
    s390 and sparc64 all implementations of the sys_ipc are nearly identical.

    There are slight differences in the types of the parameters, where mips
    and powerpc as the only 64-bit architectures with sys_ipc use unsigned
    long for the "third" argument as it gets casted to a pointer later, while
    it traditionally is an "int" like most other paramters. frv goes even
    further and uses unsigned long for all parameters execept for "ptr" which
    is a pointer type everywhere. The change from int to unsigned long for
    "third" and back to "int" for the others on frv should be fine due to the
    in-register calling conventions for syscalls (we already had a similar
    issue with the generic sys_ptrace), but I'd prefer to have the arch
    maintainers looks over this in details.

    Except for that h8300, m68k and m68knommu lack an impplementation of the
    semtimedop sub call which this patch adds, and various architectures have
    gets used - at least on i386 it seems superflous as the compat code on
    x86-64 and ia64 doesn't even bother to implement it.

    [akpm@linux-foundation.org: add sys_ipc to sys_ni.c]
    Signed-off-by: Christoph Hellwig
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Hirokazu Takata
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Reviewed-by: H. Peter Anvin
    Cc: Al Viro
    Cc: Arnd Bergmann
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: "Luck, Tony"
    Cc: James Morris
    Cc: Andreas Schwab
    Acked-by: Jesper Nilsson
    Acked-by: Russell King
    Acked-by: David Howells
    Acked-by: Kyle McMartin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig