11 Nov, 2014

2 commits

  • Switch over the msgctl, shmat, shmctl and semtimedop syscalls to use the compat
    layer. The problem was found with the debian procenv package, which called
    shmctl(0, SHM_INFO, &info);
    in which the shmctl syscall then overwrote parts of the surrounding areas on
    the stack on which the info variable was stored and thus lead to a segfault
    later on.

    Additionally fix the definition of struct shminfo64 to use unsigned longs like
    the other architectures. This has no impact on userspace since we only have a
    32bit userspace up to now.

    Signed-off-by: Helge Deller
    Cc: John David Anglin
    Cc: # v3.10+

    Helge Deller
     
  • Signed-off-by: Helge Deller

    Helge Deller
     

27 Aug, 2014

1 commit


14 Jul, 2014

1 commit

  • Pull parisc fixes from Helge Deller:
    "The major patch in here is one which fixes the fanotify_mark() syscall
    in the compat layer of the 64bit parisc kernel. It went unnoticed so
    long, because the calling syntax when using a 64bit parameter in a
    32bit syscall is quite complex and even worse, it may be even
    different if you call syscall() or the glibc wrapper. This patch
    makes the kernel accept the calling convention when called by the
    glibc wrapper.

    The other two patches are trivial and remove unused headers, #includes
    and adds the serial ports of the fastest C8000 workstation to the
    parisc-kernel internal hardware database"

    * 'parisc-3.16-5' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: drop unused defines and header includes
    parisc: fix fanotify_mark() syscall on 32bit compat kernel
    parisc: add serial ports of C8000/1GHz machine to hardware database

    Linus Torvalds
     

13 Jul, 2014

1 commit

  • On parisc we can not use the existing compat implementation for fanotify_mark()
    because for the 64bit mask parameter the higher and lower 32bits are ordered
    differently than what the compat function expects from big endian
    architectures.

    Specifically:
    It finally turned out, that on hppa we end up with different assignments
    of parameters to kernel arguments depending on if we call the glibc
    wrapper function
    int fanotify_mark (int __fanotify_fd, unsigned int __flags,
    uint64_t __mask, int __dfd, const char *__pathname);
    or directly calling the syscall manually
    syscall(__NR_fanotify_mark, ...)

    Reason is, that the syscall() function is implemented as C-function and
    because we now have the sysno as first parameter in front of the other
    parameters the compiler will unexpectedly add an empty paramenter in
    front of the u64 value to ensure the correct calling alignment for 64bit
    values.
    This means, on hppa you can't simply use syscall() to call the kernel
    fanotify_mark() function directly, but you have to use the glibc
    function instead.

    This patch fixes the kernel in the hppa-arch specifc coding to adjust
    the parameters in a way as if userspace calls the glibc wrapper function
    fanotify_mark().

    Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # 3.13+

    Helge Deller
     

24 May, 2014

1 commit

  • The 'renameat2()' system call was incorrectly added as a ENTRY_COMP() in
    the parisc system call table by commit 18e480aa07f78 ("parisc: add
    renameat2 syscall"). That causes a link-time error due to there not
    being any compat version of that system call:

    arch/parisc/kernel/built-in.o: In function `sys_call_table':
    (.rodata+0xad0): undefined reference to `compat_sys_renameat2'
    make: *** [vmlinux] Error 1

    Easily fixed by marking the system call as being the same for compat as
    for native by using ENTRY_SAME() instead of ENTRY_COMP().

    Reported-by: Guenter Roeck
    Acked-by: Miklos Szeredi
    Acked-by: Helge Deller
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

20 May, 2014

1 commit


13 Apr, 2014

1 commit


23 Mar, 2014

1 commit

  • We seem to be nearly the only platform which does not provide the
    sys_utimes syscall. Adding it now makes our life much easier with
    userspace applications (like dietlibc and e2fsprogs) since we then
    behave like all other platforms too and don't need extra patches which
    are hard to get upstream anyway because we are not a mainstream
    architecture.

    Signed-off-by: Helge Deller
    Cc: stable@vger.kernel.org # v3.13

    Helge Deller
     

03 Feb, 2014

1 commit


06 Mar, 2013

1 commit


04 Mar, 2013

3 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • …/git/deller/parisc-linux

    Pull second round of PARISC updates from Helge Deller:
    "The most important fix in this branch is the switch of io_setup,
    io_getevents and io_submit syscalls to use the available compat
    syscalls when running 32bit userspace on 64bit kernel. Other than
    that it's mostly removal of compile warnings."

    * 'fixes-for-3.9-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: fix redefinition of SET_PERSONALITY
    parisc: do not install modules when installing kernel
    parisc: fix compile warnings triggered by atomic_sub(sizeof(),v)
    parisc: check return value of down_interruptible() in hp_sdc_rtc.c
    parisc: avoid unitialized variable warning in pa_memcpy()
    parisc: remove unused variable 'compat_val'
    parisc: switch to compat_functions of io_setup, io_getevents and io_submit
    parisc: select ARCH_WANT_FRAME_POINTERS

    Linus Torvalds
     

03 Mar, 2013

1 commit


25 Feb, 2013

1 commit


24 Feb, 2013

2 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Pull signal handling cleanups from Al Viro:
    "This is the first pile; another one will come a bit later and will
    contain SYSCALL_DEFINE-related patches.

    - a bunch of signal-related syscalls (both native and compat)
    unified.

    - a bunch of compat syscalls switched to COMPAT_SYSCALL_DEFINE
    (fixing several potential problems with missing argument
    validation, while we are at it)

    - a lot of now-pointless wrappers killed

    - a couple of architectures (cris and hexagon) forgot to save
    altstack settings into sigframe, even though they used the
    (uninitialized) values in sigreturn; fixed.

    - microblaze fixes for delivery of multiple signals arriving at once

    - saner set of helpers for signal delivery introduced, several
    architectures switched to using those."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (143 commits)
    x86: convert to ksignal
    sparc: convert to ksignal
    arm: switch to struct ksignal * passing
    alpha: pass k_sigaction and siginfo_t using ksignal pointer
    burying unused conditionals
    make do_sigaltstack() static
    arm64: switch to generic old sigaction() (compat-only)
    arm64: switch to generic compat rt_sigaction()
    arm64: switch compat to generic old sigsuspend
    arm64: switch to generic compat rt_sigqueueinfo()
    arm64: switch to generic compat rt_sigpending()
    arm64: switch to generic compat rt_sigprocmask()
    arm64: switch to generic sigaltstack
    sparc: switch to generic old sigsuspend
    sparc: COMPAT_SYSCALL_DEFINE does all sign-extension as well as SYSCALL_DEFINE
    sparc: kill sign-extending wrappers for native syscalls
    kill sparc32_open()
    sparc: switch to use of generic old sigaction
    sparc: switch sys_compat_rt_sigaction() to COMPAT_SYSCALL_DEFINE
    mips: switch to generic sys_fork() and sys_clone()
    ...

    Linus Torvalds
     

21 Feb, 2013

6 commits


04 Feb, 2013

5 commits


13 Dec, 2012

1 commit

  • Pull big execve/kernel_thread/fork unification series from Al Viro:
    "All architectures are converted to new model. Quite a bit of that
    stuff is actually shared with architecture trees; in such cases it's
    literally shared branch pulled by both, not a cherry-pick.

    A lot of ugliness and black magic is gone (-3KLoC total in this one):

    - kernel_thread()/kernel_execve()/sys_execve() redesign.

    We don't do syscalls from kernel anymore for either kernel_thread()
    or kernel_execve():

    kernel_thread() is essentially clone(2) with callback run before we
    return to userland, the callbacks either never return or do
    successful do_execve() before returning.

    kernel_execve() is a wrapper for do_execve() - it doesn't need to
    do transition to user mode anymore.

    As a result kernel_thread() and kernel_execve() are
    arch-independent now - they live in kernel/fork.c and fs/exec.c
    resp. sys_execve() is also in fs/exec.c and it's completely
    architecture-independent.

    - daemonize() is gone, along with its parts in fs/*.c

    - struct pt_regs * is no longer passed to do_fork/copy_process/
    copy_thread/do_execve/search_binary_handler/->load_binary/do_coredump.

    - sys_fork()/sys_vfork()/sys_clone() unified; some architectures
    still need wrappers (ones with callee-saved registers not saved in
    pt_regs on syscall entry), but the main part of those suckers is in
    kernel/fork.c now."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (113 commits)
    do_coredump(): get rid of pt_regs argument
    print_fatal_signal(): get rid of pt_regs argument
    ptrace_signal(): get rid of unused arguments
    get rid of ptrace_signal_deliver() arguments
    new helper: signal_pt_regs()
    unify default ptrace_signal_deliver
    flagday: kill pt_regs argument of do_fork()
    death to idle_regs()
    don't pass regs to copy_process()
    flagday: don't pass regs to copy_thread()
    bfin: switch to generic vfork, get rid of pointless wrappers
    xtensa: switch to generic clone()
    openrisc: switch to use of generic fork and clone
    unicore32: switch to generic clone(2)
    score: switch to generic fork/vfork/clone
    c6x: sanitize copy_thread(), get rid of clone(2) wrapper, switch to generic clone()
    take sys_fork/sys_vfork/sys_clone prototypes to linux/syscalls.h
    mn10300: switch to generic fork/vfork/clone
    h8300: switch to generic fork/vfork/clone
    tile: switch to generic clone()
    ...

    Conflicts:
    arch/microblaze/include/asm/Kbuild

    Linus Torvalds
     

04 Dec, 2012

1 commit

  • In commit 9d73fc2d641f ("open*(2) compat fixes (s390, arm64)") I said:
    >
    > The usual rules for open()/openat()/open_by_handle_at() are
    > 1) native 32bit - don't force O_LARGEFILE in flags
    > 2) native 64bit - force O_LARGEFILE in flags
    > 3) compat on 64bit host - as for native 32bit
    > 4) native 32bit ABI for 64bit system (mips/n32, x86/x32) - as for native 64bit
    >
    > There are only two exceptions - s390 compat has open() forcing O_LARGEFILE and
    > arm64 compat has open_by_handle_at() doing the same thing. The same binaries
    > on native host (s390/31 and arm resp.) will *not* force O_LARGEFILE, so IMO
    > both are emulation bugs.

    Three exceptions, actually - parisc open() is another case like that.
    Native 32bit won't force O_LARGEFILE, the same binary on parisc64 will.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

15 Oct, 2012

1 commit


30 Aug, 2011

1 commit

  • These were missed in commit f5b940997397 "All Arch: remove linkage
    for sys_nfsservctl system call" due to them having no sys_ prefix
    (presumably).

    Cc: NeilBrown
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: linux-parisc@vger.kernel.org
    Signed-off-by: Stephen Rothwell
    Acked-by: James Bottomley
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

01 Aug, 2011

1 commit


29 May, 2011

1 commit

  • 32bit and 64bit on x86 are tested and working. The rest I have looked
    at closely and I can't find any problems.

    setns is an easy system call to wire up. It just takes two ints so I
    don't expect any weird architecture porting problems.

    While doing this I have noticed that we have some architectures that are
    very slow to get new system calls. cris seems to be the slowest where
    the last system calls wired up were preadv and pwritev. avr32 is weird
    in that recvmmsg was wired up but never declared in unistd.h. frv is
    behind with perf_event_open being the last syscall wired up. On h8300
    the last system call wired up was epoll_wait. On m32r the last system
    call wired up was fallocate. mn10300 has recvmmsg as the last system
    call wired up. The rest seem to at least have syncfs wired up which was
    new in the 2.6.39.

    v2: Most of the architecture support added by Daniel Lezcano
    v3: ported to v2.6.36-rc4 by: Eric W. Biederman
    v4: Moved wiring up of the system call to another patch
    v5: ported to v2.6.39-rc6
    v6: rebased onto parisc-next and net-next to avoid syscall conflicts.
    v7: ported to Linus's latest post 2.6.39 tree.

    >  arch/blackfin/include/asm/unistd.h     |    3 ++-
    >  arch/blackfin/mach-common/entry.S      |    1 +
    Acked-by: Mike Frysinger

    Oh - ia64 wiring looks good.
    Acked-by: Tony Luck

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

16 Apr, 2011

4 commits


31 Mar, 2011

1 commit