From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7786 invoked from network); 10 Jul 2021 19:13:59 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 10 Jul 2021 19:13:59 -0000 Received: (qmail 22490 invoked by uid 550); 10 Jul 2021 19:13:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 22457 invoked from network); 10 Jul 2021 19:13:56 -0000 Date: Sat, 10 Jul 2021 21:13:43 +0200 From: Szabolcs Nagy To: musl@lists.openwall.com Message-ID: <20210710191343.GA522079@port70.net> Mail-Followup-To: musl@lists.openwall.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline Subject: [musl] [PATCH 00/17] updates for linux v5.11, v5.12, v5.13 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline includes v5.11 patches: https://www.openwall.com/lists/musl/2021/03/17/1 and v5.12 and v5.13 patches. Szabolcs Nagy (17): bits/syscall.h: add epoll_pwait2 from linux v5.11 sys/prctl.h: add PR_SET_SYSCALL_USER_DISPATCH from linux v5.11 sys/socket.h: add new SO_ socket options from linux v5.11 netinet/if_ether.h: add ETH_P_CFM from linux v5.11 netinet/tcp.h: add tcp zerocopy related changes from linux v5.11 signal.h: add si_code values for SIGSYS signal.h: add SYS_USER_DISPATCH si_code value from linux v5.11 signal.h: add new sa_flags from linux v5.11 bits/syscall.h: add mount_setattr from linux v5.12 s390x: add ptrace requests from linux v5.12 netinet/tcp.h: add TCP_NLA_* values up to linux v5.12 netinet/tcp.h: add tcp_zerocopy_receive fields from linux v5.12 bits/syscall.h: add landlock syscalls from linux v5.13 netinet/in.h: add INADDR_DUMMY from linux v5.13 elf.h: add NT_ARM_PAC_ENABLED_KEYS from linux v5.13 sys/prctl.h: add PR_PAC_{SET,GET}_ENABLED_KEYS from linux v5.13 sys/ptrace.h: add PTRACE_GET_RSEQ_CONFIGURATION from linux v5.13 arch/aarch64/bits/syscall.h.in | 5 +++++ arch/arm/bits/syscall.h.in | 5 +++++ arch/i386/bits/syscall.h.in | 5 +++++ arch/m68k/bits/syscall.h.in | 5 +++++ arch/microblaze/bits/syscall.h.in | 5 +++++ arch/mips/bits/syscall.h.in | 5 +++++ arch/mips64/bits/syscall.h.in | 5 +++++ arch/mipsn32/bits/syscall.h.in | 5 +++++ arch/or1k/bits/syscall.h.in | 5 +++++ arch/powerpc/bits/syscall.h.in | 5 +++++ arch/powerpc64/bits/syscall.h.in | 5 +++++ arch/riscv64/bits/syscall.h.in | 5 +++++ arch/s390x/bits/ptrace.h | 3 +++ arch/s390x/bits/syscall.h.in | 5 +++++ arch/sh/bits/syscall.h.in | 5 +++++ arch/x32/bits/syscall.h.in | 5 +++++ arch/x86_64/bits/syscall.h.in | 5 +++++ include/elf.h | 1 + include/netinet/if_ether.h | 1 + include/netinet/in.h | 1 + include/netinet/tcp.h | 11 +++++++++++ include/signal.h | 6 ++++++ include/sys/prctl.h | 9 +++++++++ include/sys/ptrace.h | 9 +++++++++ include/sys/socket.h | 2 ++ 25 files changed, 123 insertions(+) -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-bits-syscall.h-add-epoll_pwait2-from-linux-v5.11.patch" >From 38df364ac0bb1090beaad8898f3bb7ab8644a11b Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 19:21:34 +0000 Subject: [PATCH 01/17] bits/syscall.h: add epoll_pwait2 from linux v5.11 see linux commit b0a0c2615f6f199a656ed8549d7dce625d77aa77 epoll: wire up syscall epoll_pwait2 linux commit 58169a52ebc9a733aeb5bea857bc5daa71a301bb epoll: add syscall epoll_pwait2 epoll_wait with struct timespec timeout instead of int. no time32 variant. --- arch/aarch64/bits/syscall.h.in | 1 + arch/arm/bits/syscall.h.in | 1 + arch/i386/bits/syscall.h.in | 1 + arch/m68k/bits/syscall.h.in | 1 + arch/microblaze/bits/syscall.h.in | 1 + arch/mips/bits/syscall.h.in | 1 + arch/mips64/bits/syscall.h.in | 1 + arch/mipsn32/bits/syscall.h.in | 1 + arch/or1k/bits/syscall.h.in | 1 + arch/powerpc/bits/syscall.h.in | 1 + arch/powerpc64/bits/syscall.h.in | 1 + arch/riscv64/bits/syscall.h.in | 1 + arch/s390x/bits/syscall.h.in | 1 + arch/sh/bits/syscall.h.in | 1 + arch/x32/bits/syscall.h.in | 1 + arch/x86_64/bits/syscall.h.in | 1 + 16 files changed, 16 insertions(+) diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in index 1ad467c0..e955da4d 100644 --- a/arch/aarch64/bits/syscall.h.in +++ b/arch/aarch64/bits/syscall.h.in @@ -294,4 +294,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in index cf9e3411..2a55d4db 100644 --- a/arch/arm/bits/syscall.h.in +++ b/arch/arm/bits/syscall.h.in @@ -394,6 +394,7 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 #define __ARM_NR_breakpoint 0x0f0001 #define __ARM_NR_cacheflush 0x0f0002 diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in index 5d1c4d7a..f900db2e 100644 --- a/arch/i386/bits/syscall.h.in +++ b/arch/i386/bits/syscall.h.in @@ -431,4 +431,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in index 6794b1a0..e064b445 100644 --- a/arch/m68k/bits/syscall.h.in +++ b/arch/m68k/bits/syscall.h.in @@ -411,3 +411,4 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in index 7f71df3b..86fe8271 100644 --- a/arch/microblaze/bits/syscall.h.in +++ b/arch/microblaze/bits/syscall.h.in @@ -432,4 +432,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in index d54845b2..83c9655d 100644 --- a/arch/mips/bits/syscall.h.in +++ b/arch/mips/bits/syscall.h.in @@ -413,4 +413,5 @@ #define __NR_pidfd_getfd 4438 #define __NR_faccessat2 4439 #define __NR_process_madvise 4440 +#define __NR_epoll_pwait2 4441 diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in index 920b4358..1be9f3e1 100644 --- a/arch/mips64/bits/syscall.h.in +++ b/arch/mips64/bits/syscall.h.in @@ -343,4 +343,5 @@ #define __NR_pidfd_getfd 5438 #define __NR_faccessat2 5439 #define __NR_process_madvise 5440 +#define __NR_epoll_pwait2 5441 diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in index e6dad688..1bd7aeb2 100644 --- a/arch/mipsn32/bits/syscall.h.in +++ b/arch/mipsn32/bits/syscall.h.in @@ -367,4 +367,5 @@ #define __NR_pidfd_getfd 6438 #define __NR_faccessat2 6439 #define __NR_process_madvise 6440 +#define __NR_epoll_pwait2 6441 diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in index 463ee901..499aa832 100644 --- a/arch/or1k/bits/syscall.h.in +++ b/arch/or1k/bits/syscall.h.in @@ -316,4 +316,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in index db4d0ca4..7f7d5a11 100644 --- a/arch/powerpc/bits/syscall.h.in +++ b/arch/powerpc/bits/syscall.h.in @@ -420,4 +420,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in index a128890b..b5793172 100644 --- a/arch/powerpc64/bits/syscall.h.in +++ b/arch/powerpc64/bits/syscall.h.in @@ -392,4 +392,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in index 39c0d650..df6bf5c2 100644 --- a/arch/riscv64/bits/syscall.h.in +++ b/arch/riscv64/bits/syscall.h.in @@ -294,6 +294,7 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 #define __NR_sysriscv __NR_arch_specific_syscall #define __NR_riscv_flush_icache (__NR_sysriscv + 15) diff --git a/arch/s390x/bits/syscall.h.in b/arch/s390x/bits/syscall.h.in index 9c8d984e..16ec02ee 100644 --- a/arch/s390x/bits/syscall.h.in +++ b/arch/s390x/bits/syscall.h.in @@ -357,4 +357,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in index 17dd7e07..4fc1f9e8 100644 --- a/arch/sh/bits/syscall.h.in +++ b/arch/sh/bits/syscall.h.in @@ -404,4 +404,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in index 5361442e..14c7231f 100644 --- a/arch/x32/bits/syscall.h.in +++ b/arch/x32/bits/syscall.h.in @@ -303,6 +303,7 @@ #define __NR_pidfd_getfd (0x40000000 + 438) #define __NR_faccessat2 (0x40000000 + 439) #define __NR_process_madvise (0x40000000 + 440) +#define __NR_epoll_pwait2 (0x40000000 + 441) #define __NR_rt_sigaction (0x40000000 + 512) diff --git a/arch/x86_64/bits/syscall.h.in b/arch/x86_64/bits/syscall.h.in index e943883d..f611884e 100644 --- a/arch/x86_64/bits/syscall.h.in +++ b/arch/x86_64/bits/syscall.h.in @@ -350,4 +350,5 @@ #define __NR_pidfd_getfd 438 #define __NR_faccessat2 439 #define __NR_process_madvise 440 +#define __NR_epoll_pwait2 441 -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0002-sys-prctl.h-add-PR_SET_SYSCALL_USER_DISPATCH-from-li.patch" >From 8622064afadb81ace04dcb1f8597b37e86f23084 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 20:50:17 +0000 Subject: [PATCH 02/17] sys/prctl.h: add PR_SET_SYSCALL_USER_DISPATCH from linux v5.11 see linux commit 1446e1df9eb183fdf81c3f0715402f1d7595d4cb kernel: Implement selective syscall userspace redirection linux commit 36a6c843fd0d8e02506681577e96dabd203dd8e8 entry: Use different define for selector variable in SUD redirect syscalls to a userspace handler via SIGSYS, except for a specific range of code. can be toggled via a memory write to a selector variable. mainly for wine. --- include/sys/prctl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/sys/prctl.h b/include/sys/prctl.h index 4ba73f42..3f0254c7 100644 --- a/include/sys/prctl.h +++ b/include/sys/prctl.h @@ -168,6 +168,12 @@ struct prctl_mm_map { #define PR_SET_IO_FLUSHER 57 #define PR_GET_IO_FLUSHER 58 +#define PR_SET_SYSCALL_USER_DISPATCH 59 +#define PR_SYS_DISPATCH_OFF 0 +#define PR_SYS_DISPATCH_ON 1 +#define SYSCALL_DISPATCH_FILTER_ALLOW 0 +#define SYSCALL_DISPATCH_FILTER_BLOCK 1 + int prctl (int, ...); #ifdef __cplusplus -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0003-sys-socket.h-add-new-SO_-socket-options-from-linux-v.patch" >From b574293cad72cf0f3a6ce2c22e9bc5dcbbff52c2 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 21:19:36 +0000 Subject: [PATCH 03/17] sys/socket.h: add new SO_ socket options from linux v5.11 see linux commit 7fd3253a7de6a317a0683f83739479fb880bffc8 net: Introduce preferred busy-polling linux commit 7c951cafc0cb2e575f1d58677b95ac387ac0a5bd net: Add SO_BUSY_POLL_BUDGET socket option --- include/sys/socket.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sys/socket.h b/include/sys/socket.h index 38f5bb17..6dc1e40a 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -289,6 +289,8 @@ struct linger { #define SCM_TXTIME SO_TXTIME #define SO_BINDTOIFINDEX 62 #define SO_DETACH_REUSEPORT_BPF 68 +#define SO_PREFER_BUSY_POLL 69 +#define SO_BUSY_POLL_BUDGET 70 #ifndef SOL_SOCKET #define SOL_SOCKET 1 -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0004-netinet-if_ether.h-add-ETH_P_CFM-from-linux-v5.11.patch" >From e41355350250590388fee716a9556a7f40667b34 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 21:33:25 +0000 Subject: [PATCH 04/17] netinet/if_ether.h: add ETH_P_CFM from linux v5.11 see linux commit fbaedb4129838252570410c65abb2036b5505cbd bridge: uapi: cfm: Added EtherType used by the CFM protocol. --- include/netinet/if_ether.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h index 55a2ff1b..3479f511 100644 --- a/include/netinet/if_ether.h +++ b/include/netinet/if_ether.h @@ -66,6 +66,7 @@ #define ETH_P_1588 0x88F7 #define ETH_P_NCSI 0x88F8 #define ETH_P_PRP 0x88FB +#define ETH_P_CFM 0x8902 #define ETH_P_FCOE 0x8906 #define ETH_P_TDLS 0x890D #define ETH_P_FIP 0x8914 -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0005-netinet-tcp.h-add-tcp-zerocopy-related-changes-from-.patch" >From 97c7cf5e63acc32ee11010fdf31ae5bb35abe661 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 21:39:24 +0000 Subject: [PATCH 05/17] netinet/tcp.h: add tcp zerocopy related changes from linux v5.11 see linux commit 18fb76ed53865c1b5d5f0157b1b825704590beb5 net-zerocopy: Copy straggler unaligned data for TCP Rx. zerocopy. linux commit 94ab9eb9b234ddf23af04a4bc7e8db68e67b8778 net-zerocopy: Defer vm zap unless actually needed. --- include/netinet/tcp.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h index b7b997f5..30f20239 100644 --- a/include/netinet/tcp.h +++ b/include/netinet/tcp.h @@ -281,12 +281,17 @@ struct tcp_repair_window { uint32_t rcv_wup; }; +#define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1 + struct tcp_zerocopy_receive { uint64_t address; uint32_t length; uint32_t recv_skip_hint; uint32_t inq; int32_t err; + uint64_t copybuf_address; + int32_t copybuf_len; + uint32_t flags; }; #endif -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0006-signal.h-add-si_code-values-for-SIGSYS.patch" >From 5432f5fa3e5cccb5a5af320c4a6e8fc74de88c3b Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 22:15:11 +0000 Subject: [PATCH 06/17] signal.h: add si_code values for SIGSYS unlike other si_code defines, SYS_ is not in the posix reserved namespace which is likely the reason why SYS_SECCOMP was previously missing (was new in linux v3.5). --- include/signal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/signal.h b/include/signal.h index f270a594..4dd46142 100644 --- a/include/signal.h +++ b/include/signal.h @@ -261,6 +261,8 @@ void (*sigset(int, void (*)(int)))(int); #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #define NSIG _NSIG typedef void (*sig_t)(int); + +#define SYS_SECCOMP 1 #endif #ifdef _GNU_SOURCE -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0007-signal.h-add-SYS_USER_DISPATCH-si_code-value-from-li.patch" >From 85879e0d74ec97819213683f93a27b81a7c9a229 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 7 Mar 2021 22:20:54 +0000 Subject: [PATCH 07/17] signal.h: add SYS_USER_DISPATCH si_code value from linux v5.11 see linux commit 1d7637d89cfce54a4f4a41c2325288c2f47470e8 signal: Expose SYS_USER_DISPATCH si_code type --- include/signal.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/signal.h b/include/signal.h index 4dd46142..af940ccb 100644 --- a/include/signal.h +++ b/include/signal.h @@ -263,6 +263,7 @@ void (*sigset(int, void (*)(int)))(int); typedef void (*sig_t)(int); #define SYS_SECCOMP 1 +#define SYS_USER_DISPATCH 2 #endif #ifdef _GNU_SOURCE -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0008-signal.h-add-new-sa_flags-from-linux-v5.11.patch" >From 38af581855914e7a9f0f6ef3651115d6b05e0244 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 17 Mar 2021 19:19:27 +0000 Subject: [PATCH 08/17] signal.h: add new sa_flags from linux v5.11 see linux commit a54f0dfda754c5cecc89a14dab68a3edc1e497b5 signal: define the SA_UNSUPPORTED bit in sa_flags linux commit 6ac05e832a9e96f9b1c42a8917cdd317d7b6c8fa signal: define the SA_EXPOSE_TAGBITS bit in sa_flags Note: SA_ is in the posix reserved namespace so these linux specific flags can be exposed when compiling for posix. --- include/signal.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/signal.h b/include/signal.h index af940ccb..c347f861 100644 --- a/include/signal.h +++ b/include/signal.h @@ -178,6 +178,9 @@ struct sigaction { #define sa_handler __sa_handler.sa_handler #define sa_sigaction __sa_handler.sa_sigaction +#define SA_UNSUPPORTED 0x00000400 +#define SA_EXPOSE_TAGBITS 0x00000800 + struct sigevent { union sigval sigev_value; int sigev_signo; -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0009-bits-syscall.h-add-mount_setattr-from-linux-v5.12.patch" >From 3852e3c85714de0df36668ca2aa8328e8e924302 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 25 May 2021 20:53:18 +0000 Subject: [PATCH 09/17] bits/syscall.h: add mount_setattr from linux v5.12 new syscall to change the properties of a mount or a mount tree using file descriptors which the new mount api is based on, see linux commit 2a1867219c7b27f928e2545782b86daaf9ad50bd fs: add mount_setattr() --- arch/aarch64/bits/syscall.h.in | 1 + arch/arm/bits/syscall.h.in | 1 + arch/i386/bits/syscall.h.in | 1 + arch/m68k/bits/syscall.h.in | 1 + arch/microblaze/bits/syscall.h.in | 1 + arch/mips/bits/syscall.h.in | 1 + arch/mips64/bits/syscall.h.in | 1 + arch/mipsn32/bits/syscall.h.in | 1 + arch/or1k/bits/syscall.h.in | 1 + arch/powerpc/bits/syscall.h.in | 1 + arch/powerpc64/bits/syscall.h.in | 1 + arch/riscv64/bits/syscall.h.in | 1 + arch/s390x/bits/syscall.h.in | 1 + arch/sh/bits/syscall.h.in | 1 + arch/x32/bits/syscall.h.in | 1 + arch/x86_64/bits/syscall.h.in | 1 + 16 files changed, 16 insertions(+) diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in index e955da4d..037da214 100644 --- a/arch/aarch64/bits/syscall.h.in +++ b/arch/aarch64/bits/syscall.h.in @@ -295,4 +295,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in index 2a55d4db..8919137f 100644 --- a/arch/arm/bits/syscall.h.in +++ b/arch/arm/bits/syscall.h.in @@ -395,6 +395,7 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 #define __ARM_NR_breakpoint 0x0f0001 #define __ARM_NR_cacheflush 0x0f0002 diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in index f900db2e..4c04ea89 100644 --- a/arch/i386/bits/syscall.h.in +++ b/arch/i386/bits/syscall.h.in @@ -432,4 +432,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in index e064b445..136775b4 100644 --- a/arch/m68k/bits/syscall.h.in +++ b/arch/m68k/bits/syscall.h.in @@ -412,3 +412,4 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in index 86fe8271..10f27aba 100644 --- a/arch/microblaze/bits/syscall.h.in +++ b/arch/microblaze/bits/syscall.h.in @@ -433,4 +433,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in index 83c9655d..1d0deed3 100644 --- a/arch/mips/bits/syscall.h.in +++ b/arch/mips/bits/syscall.h.in @@ -414,4 +414,5 @@ #define __NR_faccessat2 4439 #define __NR_process_madvise 4440 #define __NR_epoll_pwait2 4441 +#define __NR_mount_setattr 4442 diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in index 1be9f3e1..b1b83f5f 100644 --- a/arch/mips64/bits/syscall.h.in +++ b/arch/mips64/bits/syscall.h.in @@ -344,4 +344,5 @@ #define __NR_faccessat2 5439 #define __NR_process_madvise 5440 #define __NR_epoll_pwait2 5441 +#define __NR_mount_setattr 5442 diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in index 1bd7aeb2..bfaa080e 100644 --- a/arch/mipsn32/bits/syscall.h.in +++ b/arch/mipsn32/bits/syscall.h.in @@ -368,4 +368,5 @@ #define __NR_faccessat2 6439 #define __NR_process_madvise 6440 #define __NR_epoll_pwait2 6441 +#define __NR_mount_setattr 6442 diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in index 499aa832..3c60eda9 100644 --- a/arch/or1k/bits/syscall.h.in +++ b/arch/or1k/bits/syscall.h.in @@ -317,4 +317,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in index 7f7d5a11..33e26e4b 100644 --- a/arch/powerpc/bits/syscall.h.in +++ b/arch/powerpc/bits/syscall.h.in @@ -421,4 +421,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in index b5793172..38bb23cb 100644 --- a/arch/powerpc64/bits/syscall.h.in +++ b/arch/powerpc64/bits/syscall.h.in @@ -393,4 +393,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in index df6bf5c2..a9cbfb50 100644 --- a/arch/riscv64/bits/syscall.h.in +++ b/arch/riscv64/bits/syscall.h.in @@ -295,6 +295,7 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 #define __NR_sysriscv __NR_arch_specific_syscall #define __NR_riscv_flush_icache (__NR_sysriscv + 15) diff --git a/arch/s390x/bits/syscall.h.in b/arch/s390x/bits/syscall.h.in index 16ec02ee..88de5148 100644 --- a/arch/s390x/bits/syscall.h.in +++ b/arch/s390x/bits/syscall.h.in @@ -358,4 +358,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in index 4fc1f9e8..1a900264 100644 --- a/arch/sh/bits/syscall.h.in +++ b/arch/sh/bits/syscall.h.in @@ -405,4 +405,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in index 14c7231f..d90cb157 100644 --- a/arch/x32/bits/syscall.h.in +++ b/arch/x32/bits/syscall.h.in @@ -304,6 +304,7 @@ #define __NR_faccessat2 (0x40000000 + 439) #define __NR_process_madvise (0x40000000 + 440) #define __NR_epoll_pwait2 (0x40000000 + 441) +#define __NR_mount_setattr (0x40000000 + 442) #define __NR_rt_sigaction (0x40000000 + 512) diff --git a/arch/x86_64/bits/syscall.h.in b/arch/x86_64/bits/syscall.h.in index f611884e..634e29fd 100644 --- a/arch/x86_64/bits/syscall.h.in +++ b/arch/x86_64/bits/syscall.h.in @@ -351,4 +351,5 @@ #define __NR_faccessat2 439 #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 +#define __NR_mount_setattr 442 -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0010-s390x-add-ptrace-requests-from-linux-v5.12.patch" >From 1900d6743457441ad469e6c62f7eb20818e000e8 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 25 May 2021 21:16:43 +0000 Subject: [PATCH 10/17] s390x: add ptrace requests from linux v5.12 PTRACE_OLDSETOPTIONS is old, but it was missing, PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP are new, see linux commit 56e62a73702836017564eaacd5212e4d0fa1c01d s390: convert to generic entry --- arch/s390x/bits/ptrace.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/s390x/bits/ptrace.h b/arch/s390x/bits/ptrace.h index d50e3262..a06cb077 100644 --- a/arch/s390x/bits/ptrace.h +++ b/arch/s390x/bits/ptrace.h @@ -1,4 +1,7 @@ #define PTRACE_SINGLEBLOCK 12 +#define PTRACE_OLDSETOPTIONS 21 +#define PTRACE_SYSEMU 31 +#define PTRACE_SYSEMU_SINGLESTEP 32 #define PTRACE_PEEKUSR_AREA 0x5000 #define PTRACE_POKEUSR_AREA 0x5001 #define PTRACE_GET_LAST_BREAK 0x5006 -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0011-netinet-tcp.h-add-TCP_NLA_-values-up-to-linux-v5.12.patch" >From 08d3a3e30feb501355423e22ead92e55d241cdcd Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 26 May 2021 16:04:38 +0000 Subject: [PATCH 11/17] netinet/tcp.h: add TCP_NLA_* values up to linux v5.12 TCP_NLA_EDT was new in v5.9, see linux commit 48040793fa6003d211f021c6ad273477bcd90d91 tcp: add earliest departure time to SCM_TIMESTAMPING_OPT_STATS TCP_NLA_TTL is new in v5.12, see linux commit e7ed11ee945438b737e2ae2370e35591e16ec371 tcp: add TTL to SCM_TIMESTAMPING_OPT_STATS --- include/netinet/tcp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h index 30f20239..08ed7cc2 100644 --- a/include/netinet/tcp.h +++ b/include/netinet/tcp.h @@ -80,6 +80,8 @@ enum { TCP_NLA_SRTT, TCP_NLA_TIMEOUT_REHASH, TCP_NLA_BYTES_NOTSENT, + TCP_NLA_EDT, + TCP_NLA_TTL, }; #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0012-netinet-tcp.h-add-tcp_zerocopy_receive-fields-from-l.patch" >From 13484d24d561a7c926b1ae7460d35b809ed669d9 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 26 May 2021 16:01:38 +0000 Subject: [PATCH 12/17] netinet/tcp.h: add tcp_zerocopy_receive fields from linux v5.12 see linux commit 7eeba1706eba6def15f6cb2fc7b3c3b9a2651edc tcp: Add receive timestamp support for receive zerocopy. linux commit 3c5a2fd042d0bfac71a2dfb99515723d318df47b tcp: Sanitize CMSG flags and reserved args in tcp_zerocopy_receive. --- include/netinet/tcp.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h index 08ed7cc2..fad1d844 100644 --- a/include/netinet/tcp.h +++ b/include/netinet/tcp.h @@ -294,6 +294,10 @@ struct tcp_zerocopy_receive { uint64_t copybuf_address; int32_t copybuf_len; uint32_t flags; + uint64_t msg_control; + uint64_t msg_controllen; + uint32_t msg_flags; + uint32_t reserved; }; #endif -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0013-bits-syscall.h-add-landlock-syscalls-from-linux-v5.1.patch" >From 469a4405afc02694f41c979fbfa2215e0a34ddbe Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 4 Jul 2021 16:34:15 +0000 Subject: [PATCH 13/17] bits/syscall.h: add landlock syscalls from linux v5.13 see linux commit a49f4f81cb48925e8d7cbd9e59068f516e984144 arch: Wire up Landlock syscalls linuxcommit 17ae69aba89dbfa2139b7f8024b757ab3cc42f59 Merge tag 'landlock_v34' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Landlock provides for unprivileged application sandboxing. The goal of Landlock is to enable to restrict ambient rights (e.g. global filesystem access) for a set of processes. Landlock is inspired by seccomp-bpf but instead of filtering syscalls and their raw arguments, a Landlock rule can restrict the use of kernel objects like file hierarchies, according to the kernel semantic. --- arch/aarch64/bits/syscall.h.in | 3 +++ arch/arm/bits/syscall.h.in | 3 +++ arch/i386/bits/syscall.h.in | 3 +++ arch/m68k/bits/syscall.h.in | 3 +++ arch/microblaze/bits/syscall.h.in | 3 +++ arch/mips/bits/syscall.h.in | 3 +++ arch/mips64/bits/syscall.h.in | 3 +++ arch/mipsn32/bits/syscall.h.in | 3 +++ arch/or1k/bits/syscall.h.in | 3 +++ arch/powerpc/bits/syscall.h.in | 3 +++ arch/powerpc64/bits/syscall.h.in | 3 +++ arch/riscv64/bits/syscall.h.in | 3 +++ arch/s390x/bits/syscall.h.in | 3 +++ arch/sh/bits/syscall.h.in | 3 +++ arch/x32/bits/syscall.h.in | 3 +++ arch/x86_64/bits/syscall.h.in | 3 +++ 16 files changed, 48 insertions(+) diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in index 037da214..5f420e61 100644 --- a/arch/aarch64/bits/syscall.h.in +++ b/arch/aarch64/bits/syscall.h.in @@ -296,4 +296,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in index 8919137f..048fdea7 100644 --- a/arch/arm/bits/syscall.h.in +++ b/arch/arm/bits/syscall.h.in @@ -396,6 +396,9 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 #define __ARM_NR_breakpoint 0x0f0001 #define __ARM_NR_cacheflush 0x0f0002 diff --git a/arch/i386/bits/syscall.h.in b/arch/i386/bits/syscall.h.in index 4c04ea89..46ffe1d9 100644 --- a/arch/i386/bits/syscall.h.in +++ b/arch/i386/bits/syscall.h.in @@ -433,4 +433,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in index 136775b4..a0c63323 100644 --- a/arch/m68k/bits/syscall.h.in +++ b/arch/m68k/bits/syscall.h.in @@ -413,3 +413,6 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in index 10f27aba..931d7919 100644 --- a/arch/microblaze/bits/syscall.h.in +++ b/arch/microblaze/bits/syscall.h.in @@ -434,4 +434,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in index 1d0deed3..63e3503a 100644 --- a/arch/mips/bits/syscall.h.in +++ b/arch/mips/bits/syscall.h.in @@ -415,4 +415,7 @@ #define __NR_process_madvise 4440 #define __NR_epoll_pwait2 4441 #define __NR_mount_setattr 4442 +#define __NR_landlock_create_ruleset 4444 +#define __NR_landlock_add_rule 4445 +#define __NR_landlock_restrict_self 4446 diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in index b1b83f5f..b89965d1 100644 --- a/arch/mips64/bits/syscall.h.in +++ b/arch/mips64/bits/syscall.h.in @@ -345,4 +345,7 @@ #define __NR_process_madvise 5440 #define __NR_epoll_pwait2 5441 #define __NR_mount_setattr 5442 +#define __NR_landlock_create_ruleset 5444 +#define __NR_landlock_add_rule 5445 +#define __NR_landlock_restrict_self 5446 diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in index bfaa080e..bb2d04a8 100644 --- a/arch/mipsn32/bits/syscall.h.in +++ b/arch/mipsn32/bits/syscall.h.in @@ -369,4 +369,7 @@ #define __NR_process_madvise 6440 #define __NR_epoll_pwait2 6441 #define __NR_mount_setattr 6442 +#define __NR_landlock_create_ruleset 6444 +#define __NR_landlock_add_rule 6445 +#define __NR_landlock_restrict_self 6446 diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in index 3c60eda9..2b5f2052 100644 --- a/arch/or1k/bits/syscall.h.in +++ b/arch/or1k/bits/syscall.h.in @@ -318,4 +318,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in index 33e26e4b..b1605a58 100644 --- a/arch/powerpc/bits/syscall.h.in +++ b/arch/powerpc/bits/syscall.h.in @@ -422,4 +422,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in index 38bb23cb..b3a8fba0 100644 --- a/arch/powerpc64/bits/syscall.h.in +++ b/arch/powerpc64/bits/syscall.h.in @@ -394,4 +394,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in index a9cbfb50..b534afe8 100644 --- a/arch/riscv64/bits/syscall.h.in +++ b/arch/riscv64/bits/syscall.h.in @@ -296,6 +296,9 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 #define __NR_sysriscv __NR_arch_specific_syscall #define __NR_riscv_flush_icache (__NR_sysriscv + 15) diff --git a/arch/s390x/bits/syscall.h.in b/arch/s390x/bits/syscall.h.in index 88de5148..dfc38479 100644 --- a/arch/s390x/bits/syscall.h.in +++ b/arch/s390x/bits/syscall.h.in @@ -359,4 +359,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in index 1a900264..ff14f54d 100644 --- a/arch/sh/bits/syscall.h.in +++ b/arch/sh/bits/syscall.h.in @@ -406,4 +406,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in index d90cb157..5d22fa17 100644 --- a/arch/x32/bits/syscall.h.in +++ b/arch/x32/bits/syscall.h.in @@ -305,6 +305,9 @@ #define __NR_process_madvise (0x40000000 + 440) #define __NR_epoll_pwait2 (0x40000000 + 441) #define __NR_mount_setattr (0x40000000 + 442) +#define __NR_landlock_create_ruleset (0x40000000 + 444) +#define __NR_landlock_add_rule (0x40000000 + 445) +#define __NR_landlock_restrict_self (0x40000000 + 446) #define __NR_rt_sigaction (0x40000000 + 512) diff --git a/arch/x86_64/bits/syscall.h.in b/arch/x86_64/bits/syscall.h.in index 634e29fd..c3882de7 100644 --- a/arch/x86_64/bits/syscall.h.in +++ b/arch/x86_64/bits/syscall.h.in @@ -352,4 +352,7 @@ #define __NR_process_madvise 440 #define __NR_epoll_pwait2 441 #define __NR_mount_setattr 442 +#define __NR_landlock_create_ruleset 444 +#define __NR_landlock_add_rule 445 +#define __NR_landlock_restrict_self 446 -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0014-netinet-in.h-add-INADDR_DUMMY-from-linux-v5.13.patch" >From 76d88f9aa47fb4b974f36f17dfa612bcdac67b87 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 4 Jul 2021 20:33:25 +0000 Subject: [PATCH 14/17] netinet/in.h: add INADDR_DUMMY from linux v5.13 see linux commit 321827477360934dc040e9d3c626bf1de6c3ab3c icmp: don't send out ICMP messages with a source address of 0.0.0.0 "RFC7600 reserves a dummy address to be used as a source for ICMP messages (192.0.0.8/32), so let's teach the kernel to substitute that address as a last resort if the regular source address selection procedure fails." --- include/netinet/in.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/netinet/in.h b/include/netinet/in.h index f9594339..fb628b61 100644 --- a/include/netinet/in.h +++ b/include/netinet/in.h @@ -48,6 +48,7 @@ struct ipv6_mreq { #define INADDR_BROADCAST ((in_addr_t) 0xffffffff) #define INADDR_NONE ((in_addr_t) 0xffffffff) #define INADDR_LOOPBACK ((in_addr_t) 0x7f000001) +#define INADDR_DUMMY ((in_addr_t) 0xc0000008) #define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) #define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0015-elf.h-add-NT_ARM_PAC_ENABLED_KEYS-from-linux-v5.13.patch" >From 05e104470594bcab69e2d16cd56e913650dc4add Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 7 Jul 2021 17:40:46 +0000 Subject: [PATCH 15/17] elf.h: add NT_ARM_PAC_ENABLED_KEYS from linux v5.13 see linux commit 201698626fbca1cf1a3b686ba14cf2a056500716 arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) --- include/elf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/elf.h b/include/elf.h index 5170f3e2..86e2f0bb 100644 --- a/include/elf.h +++ b/include/elf.h @@ -687,6 +687,7 @@ typedef struct { #define NT_ARM_PACA_KEYS 0x407 #define NT_ARM_PACG_KEYS 0x408 #define NT_ARM_TAGGED_ADDR_CTRL 0x409 +#define NT_ARM_PAC_ENABLED_KEYS 0x40a #define NT_METAG_CBUF 0x500 #define NT_METAG_RPIPE 0x501 #define NT_METAG_TLS 0x502 -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0016-sys-prctl.h-add-PR_PAC_-SET-GET-_ENABLED_KEYS-from-l.patch" >From 57a589717572ef7d3c3eb4480ca224d295817536 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 7 Jul 2021 17:43:30 +0000 Subject: [PATCH 16/17] sys/prctl.h: add PR_PAC_{SET,GET}_ENABLED_KEYS from linux v5.13 see linux commit 201698626fbca1cf1a3b686ba14cf2a056500716 arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) --- include/sys/prctl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/sys/prctl.h b/include/sys/prctl.h index 3f0254c7..087a75c9 100644 --- a/include/sys/prctl.h +++ b/include/sys/prctl.h @@ -174,6 +174,9 @@ struct prctl_mm_map { #define SYSCALL_DISPATCH_FILTER_ALLOW 0 #define SYSCALL_DISPATCH_FILTER_BLOCK 1 +#define PR_PAC_SET_ENABLED_KEYS 60 +#define PR_PAC_GET_ENABLED_KEYS 61 + int prctl (int, ...); #ifdef __cplusplus -- 2.31.1 --gBBFr7Ir9EOA20Yy Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0017-sys-ptrace.h-add-PTRACE_GET_RSEQ_CONFIGURATION-from-.patch" >From ffb5be3d37cfa5115d2f67e0f64793cdbc531c7d Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 7 Jul 2021 17:46:31 +0000 Subject: [PATCH 17/17] sys/ptrace.h: add PTRACE_GET_RSEQ_CONFIGURATION from linux v5.13 see linux commit 90f093fa8ea48e5d991332cee160b761423d55c1 rseq, ptrace: Add PTRACE_GET_RSEQ_CONFIGURATION request the struct type got __ prefix to follow existing practice. --- include/sys/ptrace.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/sys/ptrace.h b/include/sys/ptrace.h index 5d62a985..c72e3c06 100644 --- a/include/sys/ptrace.h +++ b/include/sys/ptrace.h @@ -42,6 +42,7 @@ extern "C" { #define PTRACE_SECCOMP_GET_FILTER 0x420c #define PTRACE_SECCOMP_GET_METADATA 0x420d #define PTRACE_GET_SYSCALL_INFO 0x420e +#define PTRACE_GET_RSEQ_CONFIGURATION 0x420f #define PT_READ_I PTRACE_PEEKTEXT #define PT_READ_D PTRACE_PEEKDATA @@ -130,6 +131,14 @@ struct __ptrace_syscall_info { }; }; +struct __ptrace_rseq_configuration { + uint64_t rseq_abi_pointer; + uint32_t rseq_abi_size; + uint32_t signature; + uint32_t flags; + uint32_t pad; +}; + long ptrace(int, ...); #ifdef __cplusplus -- 2.31.1 --gBBFr7Ir9EOA20Yy--