20 Feb, 2019

2 commits

  • mq_timedreceive was spelled incorrectly, and we need exceptions
    for new architectures that leave out newstat or stat64, implementing
    only statx() now.

    Fixes: 48166e6ea47d ("y2038: add 64-bit time_t syscalls to all 32-bit architectures")
    Fixes: bf4b6a7d371e ("y2038: Remove stat64 family from default syscall set")
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • We don't want new architectures to even provide the old 32-bit time_t
    based system calls any more, or define the syscall number macros.

    Add a new __ARCH_WANT_TIME32_SYSCALLS macro that gets enabled for all
    existing 32-bit architectures using the generic system call table,
    so we don't change any current behavior.
    Since this symbol is evaluated in user space as well, we cannot use
    a Kconfig CONFIG_* macro but have to define it in uapi/asm/unistd.h.

    On 64-bit architectures, the same system call numbers mostly refer to
    the system calls we want to keep, as they already pass 64-bit time_t.

    As new architectures no longer provide these, we need new exceptions
    in checksyscalls.sh.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

19 Feb, 2019

1 commit

  • The newer prlimit64 syscall provides all the functionality of getrlimit
    and setrlimit syscalls and adds the pid of target process, so future
    architectures won't need to include getrlimit and setrlimit.

    Therefore drop getrlimit and setrlimit syscalls from the generic syscall
    list unless __ARCH_WANT_SET_GET_RLIMIT is defined by the architecture's
    unistd.h prior to including asm-generic/unistd.h, and adjust all
    architectures using the generic syscall list to define it so that no
    in-tree architectures are affected.

    Cc: Arnd Bergmann
    Cc: linux-arch@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-hexagon@vger.kernel.org
    Cc: uclinux-h8-devel@lists.sourceforge.jp
    Signed-off-by: Yury Norov
    Acked-by: Arnd Bergmann
    Acked-by: Mark Salter [c6x]
    Acked-by: James Hogan [metag]
    Acked-by: Ley Foon Tan [nios2]
    Acked-by: Stafford Horne [openrisc]
    Acked-by: Will Deacon [arm64]
    Acked-by: Vineet Gupta #arch/arc bits
    Signed-off-by: Yury Norov
    Signed-off-by: Arnd Bergmann

    Yury Norov
     

07 Feb, 2019

1 commit

  • This adds 21 new system calls on each ABI that has 32-bit time_t
    today. All of these have the exact same semantics as their existing
    counterparts, and the new ones all have macro names that end in 'time64'
    for clarification.

    This gets us to the point of being able to safely use a C library
    that has 64-bit time_t in user space. There are still a couple of
    loose ends to tie up in various areas of the code, but this is the
    big one, and should be entirely uncontroversial at this point.

    In particular, there are four system calls (getitimer, setitimer,
    waitid, and getrusage) that don't have a 64-bit counterpart yet,
    but these can all be safely implemented in the C library by wrapping
    around the existing system calls because the 32-bit time_t they
    pass only counts elapsed time, not time since the epoch. They
    will be dealt with later.

    Signed-off-by: Arnd Bergmann
    Acked-by: Heiko Carstens
    Acked-by: Geert Uytterhoeven
    Acked-by: Catalin Marinas

    Arnd Bergmann
     

10 Dec, 2018

1 commit

  • This adds an exception to the syscall table checking script.

    nfsservctl entry is only provided on x86, and there is no
    reason to add it elsewhere. However, including it on the
    syscall table caused a warning for most configurations on
    non-x86.

    :696:2: warning: #warning syscall nfsservctl not implemented [-Wcpp]

    Signed-off-by: Firoz Khan
    Acked-by: Helge Deller
    Signed-off-by: Helge Deller

    Firoz Khan
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

10 Jun, 2017

1 commit

  • checksyscalls.sh is run at every "make" run while building the kernel,
    even if no files have changed. I looked at where we spend time in
    a trivial empty rebuild and found checksyscalls.sh to be a source
    of noticeable overhead, as it spawns a lot of child processes just
    to call 'cat' copying from stdin to stdout, once for each of the
    over 400 x86 syscalls.

    Using a shell-builtin (echo) instead of the external command gives
    us a 13x speedup:

    Before After
    real 0m1.018s real 0m0.077s
    user 0m0.068s user 0m0.048s
    sys 0m0.156s sys 0m0.024s

    The time it took to rebuild a single file on my machine dropped
    from 5.5 seconds to 4.5 seconds.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Masahiro Yamada

    Arnd Bergmann
     

24 Mar, 2017

1 commit

  • sys_arch_prctl is only provided on x86, and there is no reason
    to add it elsewhere. However, including it on the 32-bit syscall
    table caused a warning for most configurations on non-x86:

    :1328:2: warning: #warning syscall arch_prctl not implemented [-Wcpp]

    This adds an exception to the syscall table checking script.

    Fixes: 79170fda313e ("x86/syscalls/32: Wire up arch_prctl on x86-32")
    Signed-off-by: Arnd Bergmann
    Cc: Kyle Huey
    Link: http://lkml.kernel.org/r/20170323151904.706286-1-arnd@arndb.de
    Signed-off-by: Thomas Gleixner

    Arnd Bergmann
     

04 Jun, 2015

1 commit


20 May, 2014

1 commit

  • The new renameat2 syscall provides all the functionality of renameat
    with an additional flags argument, so make renameat optional so that
    future architectures can omit it without getting a warning.

    This patch doesn't affect existing architectures.

    Signed-off-by: James Hogan
    Acked-by: Arnd Bergmann
    Signed-off-by: Miklos Szeredi
    Cc: linux-arch@vger.kernel.org

    James Hogan
     

25 Sep, 2012

1 commit

  • "echo" doesn't read from stdin, therefore the checksyscalls script didn't
    warn about not implemented system calls anymore since 29dc54c6
    ("checksyscalls: Use arch/x86/syscalls/syscall_32.tbl as source").

    Use "cat" instead of "echo" which handles this correctly.

    Signed-off-by: Heiko Carstens
    Cc: Michal Marek
    Cc: H. Peter Anvin
    Cc: Cyrill Gorcunov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Heiko Carstens
     

18 Nov, 2011

1 commit


20 Dec, 2010

1 commit

  • The usage help in the comments
    - refers to the wrong script name,
    - doesn't mention that $srctree must be set.

    Hence correct the script name, and derive the source tree path from the script
    path, so we no longer need to rely on $srctree being set by the caller.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Sam Ravnborg
    Signed-off-by: Michal Marek

    Geert Uytterhoeven
     

26 Jun, 2010

1 commit

  • The initial pass at the generic ABI assumed that wait4() could be
    easily expressed using waitid(). Although it's true that wait4()
    can be built on waitid(), it's awkward enough that it makes more
    sense to continue to include wait4 in the generic syscall ABI.

    Since there is already a deprecated wait4 in the ABI, this change
    converts that wait4 into old_wait, and puts wait4 in the next
    available slot for new supported syscalls, after the platform-specific
    syscalls at number 260.

    Signed-off-by: Chris Metcalf
    Acked-by: Arnd Bergmann

    Chris Metcalf
     

12 Jun, 2009

1 commit

  • A new architecture should only define a minimal set of system
    calls while still providing the full functionality. This version
    of unistd.h has gone through intensive review to make sure that
    by default it only enables syscalls that do not already have
    a more featureful replacement.

    It is modeled after the x86-64 version of unistd.h, which unifies
    the syscall number definition and the actual system call table
    in a single file, in order to keep them synchronized much more
    easily.

    This first version still keeps legacy system call definitions
    around, guarded by various #ifdefs, and with numbers larger
    than 1024. The idea behind this is to make it easier for
    new architectures to transition from a full list to the reduced
    set. In particular, the new microblaze architecture that should
    migrate to using the generic ABI headers can at least use an
    existing uClibc source tree without major rewrites during the
    conversion.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

30 Oct, 2008

1 commit


23 Oct, 2008

1 commit


11 Oct, 2007

1 commit


29 Jun, 2007

1 commit

  • Not all the world is an i386. Many architectures need 64-bit arguments to be
    aligned in suitable pairs of registers, and the original
    sys_sync_file_range(int, loff_t, loff_t, int) was therefore wasting an
    argument register for padding after the first integer. Since we don't
    normally have more than 6 arguments for system calls, that left no room for
    the final argument on some architectures.

    Fix this by introducing sys_sync_file_range2(int, int, loff_t, loff_t) which
    all fits nicely. In fact, ARM already had that, but called it
    sys_arm_sync_file_range. Move it to fs/sync.c and rename it, then implement
    the needed compatibility routine. And stop the missing syscall check from
    bitching about the absence of sys_sync_file_range() if we've implemented
    sys_sync_file_range2() instead.

    Tested on PPC32 and with 32-bit and 64-bit userspace on PPC64.

    Signed-off-by: David Woodhouse
    Acked-by: Russell King
    Cc: Arnd Bergmann
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

03 May, 2007

1 commit

  • Most system calls seems to get added to i386 first. This patch
    automatically generates a warning for any new system call which is
    implemented on i386 but not the architecture currently being compiled.
    On PowerPC at the moment, for example, it results in these warnings:
    init/missing_syscalls.h:935:3: warning: #warning syscall sync_file_range not implemented
    init/missing_syscalls.h:947:3: warning: #warning syscall getcpu not implemented
    init/missing_syscalls.h:950:3: warning: #warning syscall epoll_pwait not implemented

    The file scripts/checksyscalls.sh list a number of legacy system calls
    that are ignored because they only makes sense on i386 systems.

    Other contributors to this patch are Russell King
    and Stéphane Jourdois

    Signed-off-by: David Woodhouse
    Signed-off-by: Sam Ravnborg

    Sam Ravnborg