This is a follow-up to the y2038 syscall patches that Thomas already
merged. Both the csky and riscv maintainers have requested that the
time_t syscall ABI should be completely converted before an official
glibc port is merged.
The series achieves this in a few steps:
- A couple of bug fixes for minor regressions I introduced
in the original series
- A couple of older patches from Yury Norov that I had never
merged in the past, these fix up the openat/open_by_handle_at
and getrlimit/setrlimit syscalls to disallow the old versions
of off_t and rlimit.
- Hiding the deprecated system calls behind an #ifdef in
include/uapi/asm-generic/unistd.h
- Changing the two architectures to use the new style
syscall ABI for all three types: loff_t, rusage, and
time_t.
Arnd Bergmann (5):
asm-generic: Make time32 syscall numbers optional
unicore32: Fix __ARCH_WANT_STAT64 definition
checksyscalls: fix up mq_timedreceive and stat exceptions
csky: Use latest system call ABI
riscv: Use latest system call ABI
Yury Norov (3):
compat ABI: use non-compat openat and open_by_handle_at variants
32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
asm-generic: Drop getrlimit and setrlimit syscalls from default list
arch/Kconfig | 15 ++++++++
arch/arc/Kconfig | 1 +
arch/arc/include/uapi/asm/unistd.h | 2 ++
arch/arm/Kconfig | 1 +
arch/arm64/include/uapi/asm/unistd.h | 2 ++
arch/c6x/Kconfig | 1 +
arch/c6x/include/uapi/asm/unistd.h | 2 ++
arch/h8300/Kconfig | 1 +
arch/h8300/include/uapi/asm/unistd.h | 2 ++
arch/hexagon/Kconfig | 1 +
arch/hexagon/include/uapi/asm/unistd.h | 2 ++
arch/m68k/Kconfig | 1 +
arch/microblaze/Kconfig | 1 +
arch/mips/Kconfig | 1 +
arch/nds32/Kconfig | 1 +
arch/nds32/include/uapi/asm/unistd.h | 2 ++
arch/nios2/Kconfig | 1 +
arch/nios2/include/uapi/asm/unistd.h | 2 ++
arch/openrisc/Kconfig | 1 +
arch/openrisc/include/uapi/asm/unistd.h | 2 ++
arch/parisc/Kconfig | 1 +
arch/powerpc/Kconfig | 1 +
arch/riscv/include/uapi/asm/unistd.h | 1 +
arch/riscv/kernel/vdso/Makefile | 2 ++
arch/sh/Kconfig | 1 +
arch/sparc/Kconfig | 1 +
arch/unicore32/Kconfig | 1 +
arch/unicore32/include/uapi/asm/unistd.h | 4 ++-
arch/x86/Kconfig | 1 +
arch/x86/um/Kconfig | 1 +
arch/xtensa/Kconfig | 1 +
include/linux/fcntl.h | 2 +-
include/uapi/asm-generic/unistd.h | 46 ++++++++++++++++++++++--
scripts/checksyscalls.sh | 15 ++++++--
34 files changed, 112 insertions(+), 8 deletions(-)
--
2.20.0
The series aims at adding a new time header: time_types.h. This header
is what will eventually hold all the uapi time types that we plan to
leave across the interfaces after the y2038 cleanup.
The series was discussed with Arnd Bergmann.
The second patch fixes the errqueue.h header, which has a dependency on
these types.
Note that there may be a trivial merge conflict with linux-next
c70a772fda11 ("y2038: remove struct definition redirects").
Deepa Dinamani (2):
time: Add time_types.h
errqueue.h: Include time_types.h
include/uapi/linux/errqueue.h | 1 +
include/uapi/linux/time.h | 36 +----------------------------
include/uapi/linux/time_types.h | 40 +++++++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 35 deletions(-)
create mode 100644 include/uapi/linux/time_types.h
--
2.17.1
The series introduces new socket timestamps that are
y2038 safe.
The time data types used for the existing socket timestamp
options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING
are not y2038 safe. The series introduces SO_TIMESTAMP_NEW,
SO_TIMESTAMPNS_NEW and SO_TIMESTAMPING_NEW to replace these.
These new timestamps can be used on all architectures.
The alternative considered was to extend the sys_setsockopt()
by using the flags. We did not receive any strong opinions about
either of the approaches. Hence, this was chosen, as glibc folks
preferred this.
The series does not deal with updating the internal kernel socket
calls like rxrpc to make them y2038 safe. This will be dealt
with separately.
Note that the timestamps behavior already does not match the
man page specific behavior:
SIOCGSTAMP
This ioctl should only be used if the socket option SO_TIMESTAMP
is not set on the socket. Otherwise, it returns the timestamp of
the last packet that was received while SO_TIMESTAMP was not set,
or it fails if no such packet has been received,
(i.e., ioctl(2) returns -1 with errno set to ENOENT).
The recommendation is to update the man page to remove the above statement.
The overview of the socket timestamp series is as below:
1. Delete asm specific socket.h when possible.
2. Support SO/SCM_TIMESTAMP* options only in userspace.
3. Rename current SO/SCM_TIMESTAMP* to SO/SCM_TIMESTAMP*_OLD.
3. Alter socket options so that SOCK_RCVTSTAMPNS does
not rely on SOCK_RCVTSTAMP.
4. Introduce y2038 safe types for socket timestamp.
5. Introduce new y2038 safe socket options SO/SCM_TIMESTAMP*_NEW.
6. Intorduce new y2038 safe socket timeout options.
Changes since v4:
* Fixed the typo in calling sock_get_timeout()
Changes since v3:
* Rebased onto net-next and fixups as per review comments
* Merged the socket timeout series
* Integrated Arnd's patch to simplify compat handling of timeout syscalls
Changes since v2:
* Removed extra functions to reduce diff churn as per code review
Changes since v1:
* Dropped the change to disentangle sock flags
* Renamed sock_timeval to __kernel_sock_timeval
* Updated a few comments
* Added documentation changes
Arnd Bergmann (1):
socket: move compat timeout handling into sock.c
Deepa Dinamani (11):
selftests: add missing include unistd
arch: Use asm-generic/socket.h when possible
sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD
arch: sparc: Override struct __kernel_old_timeval
socket: Use old_timeval types for socket timestamps
socket: Add struct __kernel_sock_timeval
socket: Add SO_TIMESTAMP[NS]_NEW
socket: Add SO_TIMESTAMPING_NEW
socket: Update timestamping Documentation
socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes
sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW
Documentation/networking/timestamping.txt | 43 ++++-
arch/alpha/include/uapi/asm/socket.h | 47 ++++--
arch/ia64/include/uapi/asm/Kbuild | 1 +
arch/ia64/include/uapi/asm/socket.h | 122 --------------
arch/mips/include/uapi/asm/socket.h | 47 ++++--
arch/parisc/include/uapi/asm/socket.h | 46 ++++--
arch/powerpc/include/uapi/asm/socket.h | 4 +-
arch/s390/include/uapi/asm/Kbuild | 1 +
arch/s390/include/uapi/asm/socket.h | 119 --------------
arch/sparc/include/uapi/asm/posix_types.h | 10 ++
arch/sparc/include/uapi/asm/socket.h | 49 ++++--
arch/x86/include/uapi/asm/Kbuild | 1 +
arch/x86/include/uapi/asm/socket.h | 1 -
arch/xtensa/include/asm/Kbuild | 1 +
arch/xtensa/include/uapi/asm/Kbuild | 1 +
arch/xtensa/include/uapi/asm/socket.h | 124 --------------
drivers/isdn/mISDN/socket.c | 2 +-
fs/dlm/lowcomms.c | 4 +-
include/linux/skbuff.h | 24 ++-
include/linux/socket.h | 8 +
include/net/sock.h | 1 +
include/uapi/asm-generic/socket.h | 48 ++++--
include/uapi/linux/errqueue.h | 4 +
include/uapi/linux/time.h | 7 +
net/bluetooth/hci_sock.c | 4 +-
net/compat.c | 78 +--------
net/core/scm.c | 27 ++++
net/core/sock.c | 151 +++++++++++++-----
net/ipv4/tcp.c | 61 ++++---
net/rds/af_rds.c | 10 +-
net/rds/recv.c | 18 ++-
net/rxrpc/local_object.c | 2 +-
net/smc/af_smc.c | 3 +-
net/socket.c | 50 ++++--
net/vmw_vsock/af_vsock.c | 4 +-
.../networking/timestamping/rxtimestamp.c | 1 +
36 files changed, 541 insertions(+), 583 deletions(-)
delete mode 100644 arch/ia64/include/uapi/asm/socket.h
delete mode 100644 arch/s390/include/uapi/asm/socket.h
delete mode 100644 arch/x86/include/uapi/asm/socket.h
delete mode 100644 arch/xtensa/include/uapi/asm/socket.h
--
2.17.1
Cc: ccaulfie(a)redhat.com
Cc: chris(a)zankel.net
Cc: cluster-devel(a)redhat.com
Cc: davem(a)davemloft.net
Cc: deller(a)gmx.de
Cc: dhowells(a)redhat.com
Cc: fenghua.yu(a)intel.com
Cc: isdn(a)linux-pingi.de
Cc: jejb(a)parisc-linux.org
Cc: linux-afs(a)lists.infradead.org
Cc: linux-alpha(a)vger.kernel.org
Cc: linux-arch(a)vger.kernel.org
Cc: linux-ia64(a)vger.kernel.org
Cc: linux-mips(a)linux-mips.org
Cc: linux-mips(a)vger.kernel.org
Cc: linux-parisc(a)vger.kernel.org
Cc: linuxppc-dev(a)lists.ozlabs.org
Cc: linux-rdma(a)vger.kernel.org
Cc: linux-s390(a)vger.kernel.org
Cc: linux-xtensa(a)linux-xtensa.org
Cc: netdev(a)vger.kernel.org
Cc: paulus(a)samba.org
Cc: ralf(a)linux-mips.org
Cc: rth(a)twiddle.net
Cc: schwidefsky(a)de.ibm.com
Cc: sparclinux(a)vger.kernel.org
Cc: tglx(a)linutronix.de
Cc: ubraun(a)linux.ibm.com
The following changes since commit 1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8:
Linux 5.0-rc2 (2019-01-14 10:41:12 +1200)
are available in the Git repository at:
git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground.git
tags/y2038-syscall-cleanup
for you to fetch changes up to 805089c2f77047d81f47ddc227435d606ceb180e:
syscalls: remove obsolete __IGNORE_ macros (2019-02-07 00:13:27 +0100)
----------------------------------------------------------------
arch: System call unification and cleanup
The system call tables have diverged a bit over the years, and a number
of the recent additions never made it into all architectures, for one
reason or another.
This is an attempt to clean it up as far as we can without breaking
compatibility, doing a number of steps:
- Add system calls that have not yet been integrated into all
architectures but that we definitely want there. This includes
{,f}statfs64() and get{eg,eu,g,p,u,pp}id() on alpha, which have
been missing traditionally.
- The s390 compat syscall handling is cleaned up to be more like
what we do on other architectures, while keeping the 31-bit
pointer extension. This was merged as a shared branch by the
s390 maintainers and is included here in order to base the other
patches on top.
- Add the separate ipc syscalls on all architectures that
traditionally only had sys_ipc(). This version is done without
support for IPC_OLD that is we have in sys_ipc. The
new semtimedop_time64 syscall will only be added here, not
in sys_ipc
- Add syscall numbers for a couple of syscalls that we probably
don't need everywhere, in particular pkey_* and rseq,
for the purpose of symmetry: if it's in asm-generic/unistd.h,
it makes sense to have it everywhere. I expect that any future
system calls will get assigned on all platforms together, even
when they appear to be specific to a single architecture.
- Prepare for having the same system call numbers for any future
calls. In combination with the generated tables, this hopefully
makes it easier to add new calls across all architectures
together.
All of the above are technically separate from the y2038 work,
but are done as preparation before we add the new 64-bit time_t
system calls everywhere, providing a common baseline set of system
calls.
I expect that glibc and other libraries that want to use 64-bit
time_t will require linux-5.1 kernel headers for building in
the future, and at a much later point may also require linux-5.1
or a later version as the minimum kernel at runtime. Having a
common baseline then allows the removal of many architecture or
kernel version specific workarounds.
Signed-off-by: Arnd Bergmann <arnd(a)arndb.de>
----------------------------------------------------------------
Arnd Bergmann (22):
s390: open-code s390_personality syscall
ipc: introduce ksys_ipc()/compat_ksys_ipc() for s390
s390: use generic UID16 implementation
s390: autogenerate compat syscall wrappers
s390: remove compat_wrapper.c
ia64: add __NR_umount2 definition
ia64: add statx and io_pgetevents syscalls
ia64: assign syscall numbers for perf and seccomp
alpha: wire up io_pgetevents system call
alpha: update syscall macro definitions
ARM: add migrate_pages() system call
ARM: add kexec_file_load system call number
m68k: assign syscall number for seccomp
sh: remove duplicate unistd_32.h file
sh: add statx system call
sparc64: fix sparc_ipc type conversion
ipc: rename old-style shmctl/semctl/msgctl syscalls
arch: add split IPC system calls where needed
arch: add pkey and rseq syscall numbers everywhere
alpha: add standard statfs64/fstatfs64 syscalls
alpha: add generic get{eg,eu,g,p,u,pp}id() syscalls
syscalls: remove obsolete __IGNORE_ macros
arch/alpha/include/asm/unistd.h | 21 --
arch/alpha/include/uapi/asm/unistd.h | 10 +
arch/alpha/kernel/syscalls/syscall.tbl | 20 +-
arch/arm/include/asm/unistd.h | 1 -
arch/arm/tools/syscall.tbl | 8 +-
arch/arm64/include/asm/unistd.h | 2 +-
arch/arm64/include/asm/unistd32.h | 10 +-
arch/ia64/include/asm/unistd.h | 14 -
arch/ia64/include/uapi/asm/unistd.h | 2 +
arch/ia64/kernel/syscalls/syscall.tbl | 10 +-
arch/m68k/kernel/syscalls/syscall.tbl | 16 ++
arch/microblaze/kernel/syscalls/syscall.tbl | 6 +-
arch/mips/include/asm/unistd.h | 13 -
arch/mips/kernel/syscalls/syscall_n32.tbl | 6 +-
arch/mips/kernel/syscalls/syscall_n64.tbl | 6 +-
arch/mips/kernel/syscalls/syscall_o32.tbl | 11 +
arch/parisc/include/asm/unistd.h | 4 -
arch/parisc/kernel/syscalls/syscall.tbl | 4 +
arch/powerpc/kernel/syscalls/syscall.tbl | 13 +
arch/s390/Kconfig | 2 +
arch/s390/include/asm/syscall_wrapper.h | 135 ++++++++++
arch/s390/include/asm/unistd.h | 5 -
arch/s390/include/uapi/asm/posix_types.h | 6 +
arch/s390/kernel/Makefile | 2 +-
arch/s390/kernel/compat_linux.c | 235 +---------------
arch/s390/kernel/compat_wrapper.c | 186 -------------
arch/s390/kernel/entry.S | 4 +-
arch/s390/kernel/sys_s390.c | 16 +-
arch/s390/kernel/syscalls/syscall.tbl | 301 +++++++++++----------
arch/sh/include/uapi/asm/unistd_32.h | 403 ----------------------------
arch/sh/kernel/syscalls/syscall.tbl | 16 ++
arch/sparc/include/asm/unistd.h | 5 -
arch/sparc/kernel/sys_sparc_64.c | 2 +-
arch/sparc/kernel/syscalls/syscall.tbl | 16 ++
arch/x86/entry/syscalls/syscall_32.tbl | 11 +
arch/x86/entry/syscalls/syscall_64.tbl | 2 +
arch/xtensa/include/asm/unistd.h | 12 -
arch/xtensa/kernel/syscalls/syscall.tbl | 7 +-
include/linux/syscalls.h | 7 +
include/uapi/asm-generic/unistd.h | 1 +
ipc/msg.c | 39 ++-
ipc/sem.c | 39 ++-
ipc/shm.c | 40 ++-
ipc/syscall.c | 32 ++-
ipc/util.h | 21 +-
kernel/sys_ni.c | 4 +
46 files changed, 608 insertions(+), 1118 deletions(-)
create mode 100644 arch/s390/include/asm/syscall_wrapper.h
delete mode 100644 arch/s390/kernel/compat_wrapper.c
delete mode 100644 arch/sh/include/uapi/asm/unistd_32.h
The series introduces new socket timestamps that are
y2038 safe.
The time data types used for the existing socket timestamp
options: SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING
are not y2038 safe. The series introduces SO_TIMESTAMP_NEW,
SO_TIMESTAMPNS_NEW and SO_TIMESTAMPING_NEW to replace these.
These new timestamps can be used on all architectures.
The alternative considered was to extend the sys_setsockopt()
by using the flags. We did not receive any strong opinions about
either of the approaches. Hence, this was chosen, as glibc folks
preferred this.
The series does not deal with updating the internal kernel socket
calls like rxrpc to make them y2038 safe. This will be dealt
with separately.
Note that the timestamps behavior already does not match the
man page specific behavior:
SIOCGSTAMP
This ioctl should only be used if the socket option SO_TIMESTAMP
is not set on the socket. Otherwise, it returns the timestamp of
the last packet that was received while SO_TIMESTAMP was not set,
or it fails if no such packet has been received,
(i.e., ioctl(2) returns -1 with errno set to ENOENT).
The recommendation is to update the man page to remove the above statement.
The overview of the socket timestamp series is as below:
1. Delete asm specific socket.h when possible.
2. Support SO/SCM_TIMESTAMP* options only in userspace.
3. Rename current SO/SCM_TIMESTAMP* to SO/SCM_TIMESTAMP*_OLD.
3. Alter socket options so that SOCK_RCVTSTAMPNS does
not rely on SOCK_RCVTSTAMP.
4. Introduce y2038 safe types for socket timestamp.
5. Introduce new y2038 safe socket options SO/SCM_TIMESTAMP*_NEW.
6. Intorduce new y2038 safe socket timeout options.
Changes since v3:
* Rebased onto net-next and fixups as per review comments
* Merged the socket timeout series
* Integrated Arnd's patch to simplify compat handling of timeout syscalls
Changes since v2:
* Removed extra functions to reduce diff churn as per code review
Changes since v1:
* Dropped the change to disentangle sock flags
* Renamed sock_timeval to __kernel_sock_timeval
* Updated a few comments
* Added documentation changes
Arnd Bergmann (1):
socket: move compat timeout handling into sock.c
Deepa Dinamani (11):
selftests: add missing include unistd
arch: Use asm-generic/socket.h when possible
sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD
arch: sparc: Override struct __kernel_old_timeval
socket: Use old_timeval types for socket timestamps
socket: Add struct __kernel_sock_timeval
socket: Add SO_TIMESTAMP[NS]_NEW
socket: Add SO_TIMESTAMPING_NEW
socket: Update timestamping Documentation
socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes
sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW
Documentation/networking/timestamping.txt | 43 ++++-
arch/alpha/include/uapi/asm/socket.h | 47 ++++--
arch/ia64/include/uapi/asm/Kbuild | 1 +
arch/ia64/include/uapi/asm/socket.h | 122 --------------
arch/mips/include/uapi/asm/socket.h | 47 ++++--
arch/parisc/include/uapi/asm/socket.h | 46 ++++--
arch/powerpc/include/uapi/asm/socket.h | 4 +-
arch/s390/include/uapi/asm/Kbuild | 1 +
arch/s390/include/uapi/asm/socket.h | 119 --------------
arch/sparc/include/uapi/asm/posix_types.h | 10 ++
arch/sparc/include/uapi/asm/socket.h | 49 ++++--
arch/x86/include/uapi/asm/Kbuild | 1 +
arch/x86/include/uapi/asm/socket.h | 1 -
arch/xtensa/include/asm/Kbuild | 1 +
arch/xtensa/include/uapi/asm/Kbuild | 1 +
arch/xtensa/include/uapi/asm/socket.h | 124 --------------
drivers/isdn/mISDN/socket.c | 2 +-
fs/dlm/lowcomms.c | 4 +-
include/linux/skbuff.h | 24 ++-
include/linux/socket.h | 8 +
include/net/sock.h | 1 +
include/uapi/asm-generic/socket.h | 48 ++++--
include/uapi/linux/errqueue.h | 4 +
include/uapi/linux/time.h | 7 +
net/bluetooth/hci_sock.c | 4 +-
net/compat.c | 78 +--------
net/core/scm.c | 27 ++++
net/core/sock.c | 151 +++++++++++++-----
net/ipv4/tcp.c | 61 ++++---
net/rds/af_rds.c | 10 +-
net/rds/recv.c | 18 ++-
net/rxrpc/local_object.c | 2 +-
net/smc/af_smc.c | 3 +-
net/socket.c | 50 ++++--
net/vmw_vsock/af_vsock.c | 4 +-
.../networking/timestamping/rxtimestamp.c | 1 +
36 files changed, 541 insertions(+), 583 deletions(-)
delete mode 100644 arch/ia64/include/uapi/asm/socket.h
delete mode 100644 arch/s390/include/uapi/asm/socket.h
delete mode 100644 arch/x86/include/uapi/asm/socket.h
delete mode 100644 arch/xtensa/include/uapi/asm/socket.h
--
2.17.1
Hi,
I was going through your website & I figured it'd be worth leaving a note.
We can help you with a fresh content and redesign your website according to
your requirement, promote your business online which would not only make you
rank high on search engines on relevant keywords, but we will also help you
uplift your brand in the market and get huge traffic with good number of
Inbound Leads to boost your product sales and services you provide.
Would you be open to seeing briefer info/quote for what I would like to
accomplish?
Please email us back to get more info.
Thanks & Regards,
Pearl Dawson
Santa Clara, CA
Senior Marketing Consultant
If you are not the right person, feel free to forward this email to the
right person in your organization.
To opt out, please reply with Leave Out in the Subject Line.
This is a minor update of the patches I posted last week, I
would like to add this into linux-next now, but would still do
changes if there are concerns about the contents. The first
version did not see a lot of replies, which could mean that
either everyone is happy with it, or that it was largely ignored.
See also the article at https://lwn.net/Articles/776435/.
Changes since v1:
- posting as a combined series for simplicity
- dropped one mips patch that was merged as a 5.0 fix
- reworked s390 compat syscall handling (posted separately)
and rebased on top of that series
- minor fixes for arm64 and powerpc
- added alpha statfs64 interfaces
- added alpha get{eg,eu,g,p,u,pp}id()
Arnd
----
v1 description for cleanup:
The system call tables have diverged a bit over the years, and a number
of the recent additions never made it into all architectures, for one
reason or another.
This is an attempt to clean it up as far as we can without breaking
compatibility, doing a number of steps:
- Add system calls that have not yet been integrated into all
architectures but that we definitely want there.
- Add the separate ipc syscalls on all architectures that
traditionally only had sys_ipc(). This version is done without
support for IPC_OLD that is we have in sys_ipc. The
new semtimedop_time64 syscall will only be added here, not
in sys_ipc
- Add syscall numbers for a couple of syscalls that we probably
don't need everywhere, in particular pkey_* and rseq,
for the purpose of symmetry: if it's in asm-generic/unistd.h,
it makes sense to have it everywhere.
- Prepare for having the same system call numbers for any future
calls. In combination with the generated tables, this hopefully
makes it easier to add new calls across all architectures
together.
Most of the contents of this series are unrelated to the actual
y2038 work, but for the moment, that second series is based on
this one. If there are any concerns about changes here, I
can drop or rewrite any individual patch in this series.
My plan is to merge any patches in this series that are found
to be good together with the y2038 patches for linux-5.1, so
please review and provide Acks for merging through my tree,
or pick them up for 5.0 if they seem urgent enough.
v1 description for y2038 patches:
This series finally gets us to the point of having system calls with
64-bit time_t on all architectures, after a long time of incremental
preparation patches.
There was actually one conversion that I missed during the summer,
i.e. Deepa's timex series, which I now updated based the 5.0-rc1 changes
and review comments.
I hope that the actual conversion should be uncontroversial by now,
even if some of the patches are rather large.
The one area that may need a little discussion is for the system call
numbers assigned in the final patch: Can we get consensus on whether
the idea of using the same numbers on all architectures, as well as my
choice of numbers makes sense here?
So far, I have done a lot of build testing across most architectures,
which has found a number of bugs. I have also done an LTP run on arm32
with existing user space, but not on the other architectures. I did LTP
tests with a modified musl libc[2] last summer on an older version of
this series to make sure that the new 64-bit time_t interfaces work.
The version there will need updates for testing with this new kernel
patch series; I plan to do that next.
For testing, the series plus the preparatory patches is available at
[3]. Once there is a general agreement on this series and I have done
more tests for the new system calls, I plan to add this to linux-next
through my asm-generic tree or Thomas' timers tree.
Please review and test!
Arnd
[1] https://lore.kernel.org/lkml/20190110162435.309262-1-arnd@arndb.de/T/
[2] https://git.linaro.org/people/arnd/musl-y2038.git/
[3] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git y2038-5.0-rc1
Arnd Bergmann (26):
ia64: add __NR_umount2 definition
ia64: add statx and io_pgetevents syscalls
ia64: assign syscall numbers for perf and seccomp
alpha: wire up io_pgetevents system call
alpha: update syscall macro definitions
ARM: add migrate_pages() system call
ARM: add kexec_file_load system call number
m68k: assign syscall number for seccomp
sh: remove duplicate unistd_32.h file
sh: add statx system call
sparc64: fix sparc_ipc type conversion
ipc: rename old-style shmctl/semctl/msgctl syscalls
arch: add split IPC system calls where needed
arch: add pkey and rseq syscall numbers everywhere
alpha: add standard statfs64/fstatfs64 syscalls
alpha: add generic get{eg,eu,g,p,u,pp}id() syscalls
syscalls: remove obsolete __IGNORE_ macros
time: make adjtime compat handling available for 32 bit
time: fix sys_timer_settime prototype
sparc64: add custom adjtimex/clock_adjtime functions
x86/x32: use time64 versions of sigtimedwait and recvmmsg
y2038: syscalls: rename y2038 compat syscalls
y2038: use time32 syscall names on 32-bit
y2038: remove struct definition redirects
y2038: rename old time and utime syscalls
y2038: add 64-bit time_t syscalls to all 32-bit architectures
Deepa Dinamani (3):
time: Add struct __kernel_timex
timex: use __kernel_timex internally
timex: change syscalls to use struct __kernel_timex
arch/Kconfig | 2 +-
arch/alpha/include/asm/unistd.h | 21 -
arch/alpha/include/uapi/asm/unistd.h | 10 +
arch/alpha/kernel/osf_sys.c | 5 +-
arch/alpha/kernel/syscalls/syscall.tbl | 22 +-
arch/arm/include/asm/unistd.h | 5 +-
arch/arm/kernel/sys_oabi-compat.c | 8 +-
arch/arm/tools/syscall.tbl | 85 +++--
arch/arm64/include/asm/unistd.h | 2 +-
arch/arm64/include/asm/unistd32.h | 99 +++--
arch/ia64/include/asm/unistd.h | 14 -
arch/ia64/include/uapi/asm/unistd.h | 2 +
arch/ia64/kernel/syscalls/syscall.tbl | 11 +-
arch/m68k/include/asm/unistd.h | 4 +-
arch/m68k/kernel/syscalls/syscall.tbl | 88 +++--
arch/microblaze/include/asm/unistd.h | 4 +-
arch/microblaze/kernel/syscalls/syscall.tbl | 83 ++--
arch/mips/include/asm/unistd.h | 20 +-
arch/mips/kernel/syscalls/syscall_n32.tbl | 77 ++--
arch/mips/kernel/syscalls/syscall_n64.tbl | 7 +-
arch/mips/kernel/syscalls/syscall_o32.tbl | 85 +++--
arch/parisc/include/asm/unistd.h | 15 +-
arch/parisc/kernel/syscalls/syscall.tbl | 109 ++++--
arch/powerpc/include/asm/unistd.h | 8 +-
arch/powerpc/kernel/syscalls/syscall.tbl | 134 +++++--
arch/s390/include/asm/unistd.h | 7 +-
arch/s390/kernel/syscalls/syscall.tbl | 87 +++--
arch/sh/include/asm/unistd.h | 4 +-
arch/sh/include/uapi/asm/unistd_32.h | 403 --------------------
arch/sh/kernel/syscalls/syscall.tbl | 88 +++--
arch/sparc/include/asm/unistd.h | 13 +-
arch/sparc/kernel/sys_sparc_64.c | 61 ++-
arch/sparc/kernel/syscalls/syscall.tbl | 116 ++++--
arch/x86/entry/syscalls/syscall_32.tbl | 85 +++--
arch/x86/entry/syscalls/syscall_64.tbl | 4 +-
arch/x86/include/asm/unistd.h | 8 +-
arch/xtensa/include/asm/unistd.h | 14 +-
arch/xtensa/kernel/syscalls/syscall.tbl | 78 ++--
drivers/ptp/ptp_clock.c | 2 +-
fs/aio.c | 10 +-
fs/select.c | 4 +-
fs/timerfd.c | 4 +-
fs/utimes.c | 10 +-
include/linux/compat.h | 104 +----
include/linux/posix-clock.h | 2 +-
include/linux/syscalls.h | 68 +++-
include/linux/time32.h | 32 +-
include/linux/time64.h | 8 -
include/linux/timex.h | 4 +-
include/uapi/asm-generic/unistd.h | 103 +++--
include/uapi/linux/time.h | 4 -
include/uapi/linux/timex.h | 39 ++
ipc/mqueue.c | 16 +-
ipc/msg.c | 39 +-
ipc/sem.c | 41 +-
ipc/shm.c | 40 +-
ipc/syscall.c | 12 +-
ipc/util.h | 21 +-
kernel/compat.c | 64 ----
kernel/futex.c | 2 +-
kernel/sched/core.c | 5 +-
kernel/signal.c | 2 +-
kernel/sys_ni.c | 21 +-
kernel/time/hrtimer.c | 2 +-
kernel/time/ntp.c | 18 +-
kernel/time/ntp_internal.h | 2 +-
kernel/time/posix-clock.c | 2 +-
kernel/time/posix-stubs.c | 25 +-
kernel/time/posix-timers.c | 72 ++--
kernel/time/posix-timers.h | 2 +-
kernel/time/time.c | 92 ++++-
kernel/time/timekeeping.c | 4 +-
net/compat.c | 2 +-
scripts/checksyscalls.sh | 40 ++
74 files changed, 1544 insertions(+), 1262 deletions(-)
delete mode 100644 arch/sh/include/uapi/asm/unistd_32.h
--
2.20.0
Cc: mattst88(a)gmail.com
Cc: linux(a)armlinux.org.uk
Cc: catalin.marinas(a)arm.com
Cc: will.deacon(a)arm.com
Cc: tony.luck(a)intel.com
Cc: fenghua.yu(a)intel.com
Cc: geert(a)linux-m68k.org
Cc: monstr(a)monstr.eu
Cc: paul.burton(a)mips.com
Cc: deller(a)gmx.de
Cc: benh(a)kernel.crashing.org
Cc: mpe(a)ellerman.id.au
Cc: schwidefsky(a)de.ibm.com
Cc: heiko.carstens(a)de.ibm.com
Cc: dalias(a)libc.org
Cc: davem(a)davemloft.net
Cc: luto(a)kernel.org
Cc: tglx(a)linutronix.de
Cc: mingo(a)redhat.com
Cc: hpa(a)zytor.com
Cc: x86(a)kernel.org
Cc: jcmvbkbc(a)gmail.com
Cc: arnd(a)arndb.de
Cc: akpm(a)linux-foundation.org
Cc: deepa.kernel(a)gmail.com
Cc: ebiederm(a)xmission.com
Cc: firoz.khan(a)linaro.org
Cc: linux-kernel(a)vger.kernel.org
Cc: linux-alpha(a)vger.kernel.org
Cc: linux-arm-kernel(a)lists.infradead.org
Cc: linux-ia64(a)vger.kernel.org
Cc: linux-m68k(a)lists.linux-m68k.org
Cc: linux-mips(a)vger.kernel.org
Cc: linux-parisc(a)vger.kernel.org
Cc: linuxppc-dev(a)lists.ozlabs.org
Cc: linux-s390(a)vger.kernel.org
Cc: linux-sh(a)vger.kernel.org
Cc: sparclinux(a)vger.kernel.org
Cc: netdev(a)vger.kernel.org
Cc: linux-fsdevel(a)vger.kernel.org
Cc: linux-api(a)vger.kernel.org
Cc: linux-arch(a)vger.kernel.org
This will be an automated scripts to provide easy support
for add/modify/delete the system call entry by add in
respective *.tbl file.
System call table generation support for asm-generic is
provide for arm64 architecture which will use the common
scripts resides in scripts directory and use syscall.tbl
syscall_arm32.tbl files as inputs. This implementation
will replace asm-generic/unistd.h.
This patch depends on:
https://lore.kernel.org/lkml/1546439331-18646-1-git-send-email-firoz.khan@l…https://lore.kernel.org/lkml/1546520681-24453-1-git-send-email-firoz.khan@l…
Firoz Khan (3):
arm64: add system call table generation files
arm64: assign __NR_*_Linux_syscalls generated by the scripts
arm64: generate uapi and kapi headers
arch/arm64/Makefile | 3 +
arch/arm64/include/asm/Kbuild | 2 +
arch/arm64/include/asm/unistd.h | 10 +-
arch/arm64/include/asm/unistd32.h | 826 ---------------------------
arch/arm64/include/uapi/asm/Kbuild | 4 +
arch/arm64/include/uapi/asm/unistd.h | 13 +-
arch/arm64/kernel/sys.c | 8 +-
arch/arm64/kernel/sys32.c | 8 +-
arch/arm64/kernel/syscall.c | 4 +-
arch/arm64/kernel/syscalls/Makefile | 70 +++
arch/arm64/kernel/syscalls/syscall_arm32.tbl | 434 ++++++++++++++
lib/compat_audit.c | 2 +-
12 files changed, 540 insertions(+), 844 deletions(-)
delete mode 100644 arch/arm64/include/asm/unistd32.h
create mode 100644 arch/arm64/kernel/syscalls/Makefile
create mode 100644 arch/arm64/kernel/syscalls/syscall_arm32.tbl
--
1.9.1
Hi Heiko and Martin,
As promised, I gave this a go and changed the SYSCALL_DEFINEx()
infrastructure to always include the wrappers for doing the
31-bit argument conversion on s390 compat mode.
This does three main things:
- The UID16 rework saved a lot of duplicated code, and would
probably make sense by itself, but is also required as
we can no longer call sys_*() functions directly after the
last step.
- Removing the compat_wrapper.c file is of course the main
goal here, in order to remove the need to maintain the
compat_wrapper.c file when new system calls get added.
Unfortunately, this requires adding some complexity in
syscall_wrapper.h, and trades a small reduction in source
code lines for a small increase in binary size for
unused wrappers.
- As an added benefit, the use of syscall_wrapper.h now makes
it easy to change the syscall wrappers so they no longer
see all user space register contents, similar to changes
done in commits fa697140f9a2 ("syscalls/x86: Use 'struct pt_regs'
based syscall calling convention for 64-bit syscalls") and
4378a7d4be30 ("arm64: implement syscall wrappers").
I leave the actual implementation of this for you, if you
want to do it later.
I did not test the changes at runtime, but I looked at the
generated object code, which seems fine here and includes
the same conversions as before.
Arnd
Arnd Bergmann (5):
s390: open-code s390_personality syscall
ipc: introduce ksys_ipc()/compat_ksys_ipc() for s390
s390: use generic UID16 implementation
s390: autogenerate compat syscall wrappers
s390: remove compat_wrapper.c
arch/s390/Kconfig | 2 +
arch/s390/include/asm/syscall_wrapper.h | 136 +++++++++++
arch/s390/include/uapi/asm/posix_types.h | 6 +
arch/s390/kernel/Makefile | 2 +-
arch/s390/kernel/compat_linux.c | 235 +------------------
arch/s390/kernel/compat_wrapper.c | 186 ---------------
arch/s390/kernel/entry.S | 4 +-
arch/s390/kernel/sys_s390.c | 14 +-
arch/s390/kernel/syscalls/syscall.tbl | 286 +++++++++++------------
include/linux/syscalls.h | 4 +
ipc/syscall.c | 20 +-
11 files changed, 322 insertions(+), 573 deletions(-)
create mode 100644 arch/s390/include/asm/syscall_wrapper.h
delete mode 100644 arch/s390/kernel/compat_wrapper.c
--
2.20.0