System call table generation support is provided for
alpha, ia64, m68k, microblaze, mips, parisc, powerpc,
sh, sparc and xtensa architectures. The implementat-
ions are almost similar across all the above archte-
ctures. In order to reduce the source code across all
the above architectures, create common ".sh" files and
keep it in the common directory, script/. This will
be a generic scripts which can use for all the above
architectures.
This patch depends on;
https://lore.kernel.org/lkml/1546439331-18646-1-git-send-email-firoz.khan@l…
Firoz Khan (2):
microblaze: remove nargs from __SYSCALL
microblaze: generate uapi header and system call table files
arch/microblaze/kernel/syscall_table.S | 2 +-
arch/microblaze/kernel/syscalls/Makefile | 11 ++++++--
arch/microblaze/kernel/syscalls/syscallhdr.sh | 36 ---------------------------
arch/microblaze/kernel/syscalls/syscalltbl.sh | 32 ------------------------
4 files changed, 10 insertions(+), 71 deletions(-)
delete mode 100644 arch/microblaze/kernel/syscalls/syscallhdr.sh
delete mode 100644 arch/microblaze/kernel/syscalls/syscalltbl.sh
--
1.9.1
System call table generation support is provided for
alpha, ia64, m68k, microblaze, mips, parisc, powerpc,
sh, sparc and xtensa architectures. The implementat-
ions are almost similar across all the above archte-
ctures. In order to reduce the source code across all
the above architectures, create common ".sh" files and
keep it in the common directory, script/. This will
be a generic scripts which can use for all the above
architectures.
This patch depends on;
https://lore.kernel.org/lkml/1546439331-18646-1-git-send-email-firoz.khan@l…
Firoz Khan (2):
alpha: remove nargs from __SYSCALL
alpha: generate uapi header and syscall table header files
arch/alpha/kernel/syscalls/Makefile | 11 ++++++++--
arch/alpha/kernel/syscalls/syscallhdr.sh | 36 --------------------------------
arch/alpha/kernel/syscalls/syscalltbl.sh | 32 ----------------------------
arch/alpha/kernel/systbls.S | 2 +-
4 files changed, 10 insertions(+), 71 deletions(-)
delete mode 100644 arch/alpha/kernel/syscalls/syscallhdr.sh
delete mode 100644 arch/alpha/kernel/syscalls/syscalltbl.sh
--
1.9.1
Hi Linus and Thomas,
I realized that the merge window is now imminent, but I had not sent a
pull request to Thomas for the current y2038 stuff. These patches have
been around for a while though, and were in linux-next through my tree.
I got one bug report on Monday and incorporated a simple fix, which
changed the commit date for the second half of the series, in case you
are wondering.
Thomas, is it ok for you to just provide an Ack for this branch and
have Linus merge it directly?
Arnd
The following changes since commit 651022382c7f8da46cb4872a545ee1da6d097d2a:
Linux 4.20-rc1 (2018-11-04 15:37:52 -0800)
are available in the Git repository at:
https://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git
tags/y2038-for-4.21
for you to fetch changes up to e4b92b108c6cd6b311e4b6e85d6a87a34599a6e3:
timekeeping: remove obsolete time accessors (2018-12-18 16:13:05 +0100)
----------------------------------------------------------------
y2038: more syscalls and cleanups
This concludes the main part of the system call rework for 64-bit time_t,
which has spread over most of year 2018, the last six system calls being
- ppoll
- pselect6
- io_pgetevents
- recvmmsg
- futex
- rt_sigtimedwait
As before, nothing changes for 64-bit architectures, while 32-bit
architectures gain another entry point that differs only in the layout
of the timespec structure. Hopefully in the next release we can wire up
all 22 of those system calls on all 32-bit architectures, which gives
us a baseline version for glibc to start using them.
This does not include the clock_adjtime, getrusage/waitid, and
getitimer/setitimer system calls. I still plan to have new versions
of those as well, but they are not required for correct operation of
the C library since they can be emulated using the old 32-bit time_t
based system calls.
Aside from the system calls, there are also a few cleanups here,
removing old kernel internal interfaces that have become unused after
all references got removed. The arch/sh cleanups are part of this,
there were posted several times over the past year without a reaction
from the maintainers, while the corresponding changes made it into all
other architectures.
----------------------------------------------------------------
Arnd Bergmann (13):
y2038: futex: Move compat implementation into futex.c
y2038: futex: Add support for __kernel_timespec
y2038: socket: Add compat_sys_recvmmsg_time64
y2038: signal: Add sys_rt_sigtimedwait_time32
y2038: signal: Add compat_sys_rt_sigtimedwait_time64
sh: dreamcast: rtc: push down rtc class ops into driver
sh: sh03: rtc: push down rtc class ops into driver
sh: remove unused rtc_sh_get/set_time infrastructure
sh: remove board_time_init() callback
timekeeping: remove unused {read,update}_persistent_clock
timekeeping: remove timespec_add/timespec_del
vfs: replace current_kernel_time64 with ktime equivalent
timekeeping: remove obsolete time accessors
Deepa Dinamani (5):
signal: Add set_user_sigmask()
signal: Add restore_user_sigmask()
ppoll: use __kernel_timespec
pselect6: use __kernel_timespec
io_pgetevents: use __kernel_timespec
Documentation/sh/new-machine.txt | 8 --
arch/sh/boards/mach-dreamcast/Makefile | 4 +-
arch/sh/boards/mach-dreamcast/rtc.c | 45 +++++++---
arch/sh/boards/mach-dreamcast/setup.c | 1 -
arch/sh/boards/mach-sh03/Makefile | 3 +-
arch/sh/boards/mach-sh03/rtc.c | 51 ++++++-----
arch/sh/boards/mach-sh03/setup.c | 9 --
arch/sh/boards/of-generic.c | 8 --
arch/sh/configs/dreamcast_defconfig | 2 +
arch/sh/configs/sh03_defconfig | 2 +
arch/sh/include/asm/rtc.h | 3 -
arch/sh/include/mach-dreamcast/mach/sysasic.h | 1 -
arch/sh/kernel/time.c | 74 +---------------
fs/aio.c | 134
++++++++++++++++++++---------
fs/eventpoll.c | 52 ++----------
fs/inode.c | 4 +-
fs/select.c | 360
+++++++++++++++++++++++++++++++++++++++++++++---------------------------------
include/linux/compat.h | 26 ++++++
include/linux/futex.h | 8 --
include/linux/signal.h | 4 +
include/linux/socket.h | 9 +-
include/linux/syscalls.h | 29 +++++--
include/linux/time32.h | 25 ------
include/linux/timekeeping.h | 14 ---
include/linux/timekeeping32.h | 15 ----
kernel/Makefile | 3 -
kernel/futex.c | 207
+++++++++++++++++++++++++++++++++++++++++++--
kernel/futex_compat.c | 202
--------------------------------------------
kernel/signal.c | 143
+++++++++++++++++++++++++++++++
kernel/sys_ni.c | 2 +
kernel/time/ntp.c | 10 +--
kernel/time/time.c | 36 --------
kernel/time/timekeeping.c | 12 +--
net/compat.c | 34 +++-----
net/socket.c | 62 ++++++++++----
35 files changed, 847 insertions(+), 755 deletions(-)
delete mode 100644 kernel/futex_compat.c
The following changes since commit 2e6e902d185027f8e3cb8b7305238f7e35d6a436:
Linux 4.20-rc4 (2018-11-25 14:19:31 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
tags/asm-generic-4.21
for you to fetch changes up to 2b3c5a99d5f314960e00950c1782eac9361de30f:
sh: generate uapi header and syscall table header files (2018-12-19
17:54:40 +0100)
----------------------------------------------------------------
asm-generic: syscall table script for arch/sh
I worked with Firoz Khan to change all architectures to have their system
call tables (syscall.S and asm/unistd.h) generated by a script from a more
readable input file the same way that we already had on x86, s390 and arm.
I offered to take those conversions through the asm-generic tree that
did not get picked up by the architecture maintainers, and fortunately
all but one have now been accepted into arch maintainer trees, so this
branch only contains the conversion for arch/sh/, with permission from
Rich.
The conversion does not include the old 64-bit sh5 architecture, which
has never shipped and not even compiled in a long time. The table
in include/uapi/asm/unistd.h is also not included here, as Firoz is
still working on that one. It will have to wait for the next following
merge window, hopefully together with the addition of the 64-bit
time_t system calls for the y2038 work that led to the system call
table rework.
Acked-by: Rich Felker <dalias(a)libc.org>
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
----------------------------------------------------------------
Firoz Khan (3):
sh: add __NR_syscalls along with NR_syscalls
sh: add system call table generation support
sh: generate uapi header and syscall table header files
arch/sh/Makefile | 3 +
arch/sh/include/asm/Kbuild | 1 +
arch/sh/include/asm/unistd.h | 2 +
arch/sh/include/uapi/asm/Kbuild | 1 +
arch/sh/include/uapi/asm/unistd_32.h | 4 +-
arch/sh/include/uapi/asm/unistd_64.h | 4 +-
arch/sh/kernel/syscalls/Makefile | 38 +++++++++
arch/sh/kernel/syscalls/syscall.tbl | 392
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
arch/sh/kernel/syscalls/syscallhdr.sh | 36 ++++++++
arch/sh/kernel/syscalls/syscalltbl.sh | 32 +++++++
arch/sh/kernel/syscalls_32.S | 387
+-----------------------------------------------------------------------------------
11 files changed, 514 insertions(+), 386 deletions(-)
create mode 100644 arch/sh/kernel/syscalls/Makefile
create mode 100644 arch/sh/kernel/syscalls/syscall.tbl
create mode 100644 arch/sh/kernel/syscalls/syscallhdr.sh
create mode 100644 arch/sh/kernel/syscalls/syscalltbl.sh
The purpose of this patch series is, we can easily
add/modify/delete system call table support by cha-
nging entry in syscall.tbl file instead of manually
changing many files. The other goal is to unify the
system call table generation support implementation
across all the architectures.
The system call tables are in different format in
all architecture. It will be difficult to manually
add, modify or delete the system calls in the resp-
ective files manually. To make it easy by keeping a
script and which'll generate uapi header file and
syscall table file.
syscall.tbl contains the list of available system
calls along with system call number and correspond-
ing entry point. Add a new system call in this arch-
itecture will be possible by adding new entry in
the syscall.tbl file.
Adding a new table entry consisting of:
- System call number.
- ABI.
- System call name.
- Entry point name.
- Compat entry name, if required.
ARM, s390 and x86 architecuture does exist the sim-
ilar support. I leverage their implementation to
come up with a generic solution.
I have done the same support for work for alpha,
ia64, m68k, microblaze, parisc, powerpc, sh, sparc,
and xtensa. Below mentioned git repository contains
more details about the workflow.
https://github.com/frzkhn/system_call_table_generator/
Finally, this is the ground work to solve the Y2038
issue. We need to add two dozen of system calls to
solve Y2038 issue. So this patch series will help to
add new system calls easily by adding new entry in
the syscall.tbl.
Changes since v4:
- _MIPS_SIM_ABIN64 (suppose to be _MIPS_SIM_NABI64)
macro rename back to _MIPS_SIM_ABI64 to avoid
toolchain issue.
Changes since v3:
- rearranged the patches for '64' to 'n64' conver-
sion.
- moved the unistd_nr_*.h files to asm/unistd.h
- modified the *.sh files.
Changes since v2:
- fixed __NR_syscalls assign issue.
Changes since v1:
- optimized/updated the syscall table generation
scripts.
- fixed all mixed indentation issues in syscall.tbl.
- added "comments" in syscall_*.tbl.
- changed from generic-y to generated-y in Kbuild.
Firoz Khan (7):
mips: add __NR_syscalls along with __NR_Linux_syscalls
mips: remove unused macros
mips: rename macros and files from '64' to 'n64'
mips: add +1 to __NR_syscalls in uapi header
mips: remove syscall table entries
mips: add system call table generation support
mips: generate uapi header and system call table files
arch/mips/Makefile | 3 +
arch/mips/include/asm/Kbuild | 4 +
arch/mips/include/asm/unistd.h | 11 +-
arch/mips/include/uapi/asm/Kbuild | 6 +
arch/mips/include/uapi/asm/unistd.h | 1074 +----------------------------
arch/mips/kernel/Makefile | 2 +-
arch/mips/kernel/ftrace.c | 8 +-
arch/mips/kernel/scall32-o32.S | 391 +----------
arch/mips/kernel/scall64-64.S | 444 ------------
arch/mips/kernel/scall64-n32.S | 341 +--------
arch/mips/kernel/scall64-n64.S | 117 ++++
arch/mips/kernel/scall64-o32.S | 379 +---------
arch/mips/kernel/syscalls/Makefile | 96 +++
arch/mips/kernel/syscalls/syscall_n32.tbl | 343 +++++++++
arch/mips/kernel/syscalls/syscall_n64.tbl | 339 +++++++++
arch/mips/kernel/syscalls/syscall_o32.tbl | 382 ++++++++++
arch/mips/kernel/syscalls/syscallhdr.sh | 37 +
arch/mips/kernel/syscalls/syscallnr.sh | 28 +
arch/mips/kernel/syscalls/syscalltbl.sh | 36 +
19 files changed, 1427 insertions(+), 2614 deletions(-)
delete mode 100644 arch/mips/kernel/scall64-64.S
create mode 100644 arch/mips/kernel/scall64-n64.S
create mode 100644 arch/mips/kernel/syscalls/Makefile
create mode 100644 arch/mips/kernel/syscalls/syscall_n32.tbl
create mode 100644 arch/mips/kernel/syscalls/syscall_n64.tbl
create mode 100644 arch/mips/kernel/syscalls/syscall_o32.tbl
create mode 100644 arch/mips/kernel/syscalls/syscallhdr.sh
create mode 100644 arch/mips/kernel/syscalls/syscallnr.sh
create mode 100644 arch/mips/kernel/syscalls/syscalltbl.sh
--
1.9.1
The purpose of this patch series is, we can easily
add/modify/delete system call table support by cha-
nging entry in syscall.tbl file instead of manually
changing many files. The other goal is to unify the
system call table generation support implementation
across all the architectures.
The system call tables are in different format in
all architecture. It will be difficult to manually
add, modify or delete the system calls in the resp-
ective files manually. To make it easy by keeping a
script and which'll generate uapi header file and
syscall table file.
syscall.tbl contains the list of available system
calls along with system call number and correspond-
ing entry point. Add a new system call in this arch-
itecture will be possible by adding new entry in
the syscall.tbl file.
Adding a new table entry consisting of:
- System call number.
- ABI.
- System call name.
- Entry point name.
- Compat entry name, if required.
- spu entry name, if required.
ARM, s390 and x86 architecuture does exist the sim-
ilar support. I leverage their implementation to
come up with a generic solution.
I have done the same support for work for alpha,
ia64, m68k, microblaze, mips, parisc, sh, sparc,
and xtensa. Below mentioned git repository contains
more details about the workflow.
https://github.com/frzkhn/system_call_table_generator/
Finally, this is the ground work to solve the Y2038
issue. We need to add two dozen of system calls to
solve Y2038 issue. So this patch series will help to
add new system calls easily by adding new entry in the
syscall.tbl.
Changes since v5:
- rebased with 4.20-rc7.
Changes since v4:
- DOTSYM macro removed for ppc32, which was causing
the compilation error.
Changes since v3:
- split compat syscall table out from native table.
- modified the script to add new line in the generated
file.
Changes since v2:
- modified/optimized the syscall.tbl to avoid duplicate
for the spu entries.
- updated the syscalltbl.sh to meet the above point.
Changes since v1:
- optimized/updated the syscall table generation
scripts.
- fixed all mixed indentation issues in syscall.tbl.
- added "comments" in syscall_*.tbl.
- changed from generic-y to generated-y in Kbuild.
Firoz Khan (5):
powerpc: add __NR_syscalls along with NR_syscalls
powerpc: move macro definition from asm/systbl.h
powerpc: add system call table generation support
powerpc: split compat syscall table out from native table
powerpc: generate uapi header and system call table files
arch/powerpc/Makefile | 3 +
arch/powerpc/include/asm/Kbuild | 4 +
arch/powerpc/include/asm/syscall.h | 3 +-
arch/powerpc/include/asm/systbl.h | 396 --------------------------
arch/powerpc/include/asm/unistd.h | 3 +-
arch/powerpc/include/uapi/asm/Kbuild | 2 +
arch/powerpc/include/uapi/asm/unistd.h | 389 +------------------------
arch/powerpc/kernel/Makefile | 10 -
arch/powerpc/kernel/entry_64.S | 7 +-
arch/powerpc/kernel/syscalls/Makefile | 63 ++++
arch/powerpc/kernel/syscalls/syscall.tbl | 427 ++++++++++++++++++++++++++++
arch/powerpc/kernel/syscalls/syscallhdr.sh | 37 +++
arch/powerpc/kernel/syscalls/syscalltbl.sh | 36 +++
arch/powerpc/kernel/systbl.S | 40 ++-
arch/powerpc/kernel/systbl_chk.c | 60 ----
arch/powerpc/kernel/vdso.c | 7 +-
arch/powerpc/platforms/cell/spu_callbacks.c | 17 +-
17 files changed, 606 insertions(+), 898 deletions(-)
delete mode 100644 arch/powerpc/include/asm/systbl.h
create mode 100644 arch/powerpc/kernel/syscalls/Makefile
create mode 100644 arch/powerpc/kernel/syscalls/syscall.tbl
create mode 100644 arch/powerpc/kernel/syscalls/syscallhdr.sh
create mode 100644 arch/powerpc/kernel/syscalls/syscalltbl.sh
delete mode 100644 arch/powerpc/kernel/systbl_chk.c
--
1.9.1
The purpose of this patch series is, we can easily
add/modify/delete system call table support by cha-
nging entry in syscall.tbl file instead of manually
changing many files. The other goal is to unify the
system call table generation support implementation
across all the architectures.
The system call tables are in different format in
all architecture. It will be difficult to manually
add, modify or delete the system calls in the resp-
ective files manually. To make it easy by keeping a
script and which'll generate uapi header file and
syscall table file.
syscall.tbl contains the list of available system
calls along with system call number and correspond-
ing entry point. Add a new system call in this arch-
itecture will be possible by adding new entry in the
syscall.tbl file.
Adding a new table entry consisting of:
- System call number.
- ABI.
- System call name.
- Entry point name.
ARM, s390 and x86 architecuture does exist the sim-
ilar support. I leverage their implementation to
come up with a generic solution.
I have done the same support for work for ia64, m68k,
microblaze, mips, parisc, powerpc, sh, sparc and xtensa.
Below mentioned git repository contains more details
about the workflow.
https://github.com/frzkhn/system_call_table_generator/
Finally, this is the ground work to solve the Y2038
issue. We need to add two dozen of system calls to
solve Y2038 issue. So this patch series will help to
add new system calls easily by adding new entry in
the syscall.tbl.
changes since v2:
- changed from generic-y to generated-y in Kbuild.
- made changes in syscall.tbl for removing entry -
alpha_ni_syscall.
changes since v1:
- optimized/updated the syscall table generation
scripts.
- fixed all mixed indentation issues in syscall.tbl.
- added "comments" in syscall.tbl.
- enclosed __NR_sycalls macro with __KERNEL__.
- added missing new line.
Firoz Khan (5):
alpha: move __IGNORE* entries to non uapi header
alpha: remove CONFIG_OSF4_COMPAT flag from syscall table
alpha: add __NR_syscalls along with NR_SYSCALLS
alpha: add system call table generation support
alpha: generate uapi header and syscall table header files
arch/alpha/Makefile | 3 +
arch/alpha/include/asm/Kbuild | 2 +-
arch/alpha/include/asm/unistd.h | 23 +-
arch/alpha/include/uapi/asm/Kbuild | 1 +
arch/alpha/include/uapi/asm/unistd.h | 484 +--------------------------
arch/alpha/kernel/osf_sys.c | 9 +-
arch/alpha/kernel/syscalls/Makefile | 38 +++
arch/alpha/kernel/syscalls/syscall.tbl | 453 ++++++++++++++++++++++++++
arch/alpha/kernel/syscalls/syscallhdr.sh | 36 ++
arch/alpha/kernel/syscalls/syscalltbl.sh | 32 ++
arch/alpha/kernel/systbls.S | 542 +------------------------------
11 files changed, 596 insertions(+), 1027 deletions(-)
create mode 100644 arch/alpha/kernel/syscalls/Makefile
create mode 100644 arch/alpha/kernel/syscalls/syscall.tbl
create mode 100644 arch/alpha/kernel/syscalls/syscallhdr.sh
create mode 100644 arch/alpha/kernel/syscalls/syscalltbl.sh
--
1.9.1