History log of /linux-master/arch/xtensa/include/uapi/asm/unistd.h
Revision Date Author Comments
# 5eacadb5 13-Nov-2018 Firoz Khan <firoz.khan@linaro.org>

xtensa: generate uapi header and syscall table header files

System call table generation script must be run to gener-
ate unistd_32.h and syscall_table.h files. This patch will
have changes which will invokes the script.

This patch will generate unistd_32.h and syscall_table.h
files by the syscall table generation script invoked by
xtensa/Makefile and the generated files against the removed
files must be identical.

The generated uapi header file will be included in uapi/-
asm/unistd.h and generated system call table header file
will be included by kernel/syscall.c file.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# a86067f5 13-Nov-2018 Firoz Khan <firoz.khan@linaro.org>

xtensa: add __NR_syscalls along with __NR_syscall_count

__NR_syscall_count macro holds the number of system call
exist in xtensa architecture. We have to change the value
of __NR_syscall_count, if we add or delete a system call.

One of the patch in this patch series has a script which
will generate a uapi header based on syscall.tbl file.
The syscall.tbl file contains the total number of system
calls information. So we have two option to update __NR-
_syscall_count value.

1. Update __NR_syscall_count in asm/unistd.h manually by
counting the no.of system calls. No need to update __NR-
_syscall_count until we either add a new system call or
delete existing system call.

2. We can keep this feature it above mentioned script,
that will count the number of syscalls and keep it in
a generated file. In this case we don't need to expli-
citly update __NR_syscall_count in asm/unistd.h file.

The 2nd option will be the recommended one. For that, I
added the __NR_syscalls macro in uapi/asm/unistd.h.
The macro __NR_syscalls also added for making the name
convention same across all architecture. While __NR_syscalls
isn't strictly part of the uapi, having it as part of the
generated header to simplifies the implementation. We also
need to enclose this macro with #ifdef __KERNEL__ to avoid
side effects.

Signed-off-by: Firoz Khan <firoz.khan@linaro.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
[Max: Drop __NR_syscall_count completely, use __NR_syscalls instead]


# 6f52b16c 01-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

License cleanup: add SPDX license identifier to uapi header files with no license

Many user space API headers are missing licensing information, which
makes it hard for compliance tools to determine the correct license.

By default are files without license information under the default
license of the kernel, which is GPLV2. Marking them GPLV2 would exclude
them from being included in non GPLV2 code, which is obviously not
intended. The user space API headers fall under the syscall exception
which is in the kernels COPYING file:

NOTE! This copyright does *not* cover user programs that use kernel
services by normal system calls - this is merely considered normal use
of the kernel, and does *not* fall under the heading of "derived work".

otherwise syscall usage would not be possible.

Update the files which contain no license information with an SPDX
license identifier. The chosen identifier is 'GPL-2.0 WITH
Linux-syscall-note' which is the officially assigned identifier for the
Linux syscall exception. SPDX license identifiers are 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. See the previous patch in this series for the
methodology of how this patch was researched.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1493aa65 31-Mar-2017 Max Filippov <jcmvbkbc@gmail.com>

xtensa: wire up statx system call

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# 709fb1f9 14-Nov-2016 Max Filippov <jcmvbkbc@gmail.com>

xtensa: wire up new pkey_{mprotect,alloc,free} syscalls

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# d8d2f7f6 30-Jul-2016 Max Filippov <jcmvbkbc@gmail.com>

xtensa: wire up new syscalls

Wire up userfaultfd, membarrier, mlock2, copy_file_range, preadv2, pwritev2

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# 01e84c70 27-Feb-2015 Max Filippov <jcmvbkbc@gmail.com>

xtensa: provide __NR_sync_file_range2 instead of __NR_sync_file_range

xtensa actually uses sync_file_range2 implementation, so it should
define __NR_sync_file_range2 as other architectures that use that
function. That fixes userspace interface (that apparently never worked)
and avoids special-casing xtensa in libc implementations.
See the thread ending at
http://lists.busybox.net/pipermail/uclibc/2015-February/048833.html
for more details.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# d44679ab 27-Feb-2015 Max Filippov <jcmvbkbc@gmail.com>

xtensa: wire bpf and execveat syscalls

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# 2651cc69 06-Oct-2014 Max Filippov <jcmvbkbc@gmail.com>

xtensa: re-wire umount syscall to sys_oldumount

Userspace actually passes single parameter (path name) to the umount
syscall, so new umount just fails. Fix it by requesting old umount
syscall implementation and re-wiring umount to it.

Cc: stable@vger.kernel.org
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# bb550fd5 01-Oct-2014 Max Filippov <jcmvbkbc@gmail.com>

xtensa: add seccomp, getrandom, and memfd_create syscalls

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# 89f77c6f 10-Apr-2014 Miklos Szeredi <mszeredi@suse.cz>

xtensa: add renameat2 syscall

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# f63b6d75 18-Feb-2014 Max Filippov <jcmvbkbc@gmail.com>

xtensa: wire up sched_setattr and sched_getattr syscalls

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>


# 9cf81c75 23-Feb-2013 Chris Zankel <chris@zankel.net>

xtensa: add accept4 syscall

Signed-off-by: Chris Zankel <chris@zankel.net>


# 475c32d0 23-Dec-2012 Max Filippov <jcmvbkbc@gmail.com>

xtensa: add finit_module syscall

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>


# 0430f2f2 23-Dec-2012 Al Viro <viro@zeniv.linux.org.uk>

xtensa: switch to generic sigaltstack

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# 3e41f9ba 26-Oct-2012 Al Viro <viro@zeniv.linux.org.uk>

xtensa: switch to generic clone()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# dc241f2c 25-Oct-2012 Max Filippov <jcmvbkbc@gmail.com>

xtensa: switch to generic sys_execve()

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>


# 2f72d4f6 23-Oct-2012 Chris Zankel <chris@zankel.net>

xtensa: allow multi-inclusion for uapi/unistd.h

Xtensa implements a method that allows to generate a arbitrary output
for each system call by defining the __SYSCALL(number, function, num_args).
This usually requires to include uapi/unistd.h twice. Instead of removing
the guard agains multiple inclusion entirely, allow to include unistd.h again
only if __SYSCALL is defined. Note that __SYSCALL gets always undefined at
the end of the file.

Signed-off-by: Chris Zankel <chris@zankel.net>


# 7216cabf 19-Oct-2012 Chris Zankel <chris@zankel.net>

xtensa: add missing system calls to the syscall table

Add the following system calls to the syscall table:

fallocate
sendmmsg
umount2
syncfs
epoll_create1
inotify_init1
signalfd4
dup3
pipe2
timerfd_create
timerfd_settime
timerfd_gettime
eventfd2
preadv
pwritev
fanotify_init
fanotify_mark
process_vm_readv
process_vm_writev
name_to_handle_at
open_by_handle_at
sync_file_range
perf_event_open
rt_tgsigqueueinfo
clock_adjtime
prlimit64
kcmp

Note that we have to use the 'sys_sync_file_range2' version, so that
the 64-bit arguments are aligned correctly to the argument registers.

Signed-off-by: Chris Zankel <chris@zankel.net>


# 83596729 14-Oct-2012 David Howells <dhowells@redhat.com>

UAPI: (Scripted) Disintegrate arch/xtensa/include/asm

UAPI: (Scripted) Disintegrate arch/xtensa/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>