* [musl] [PATCH 0/7] updates for linux v5.11
@ 2021-03-17 20:12 Szabolcs Nagy
0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2021-03-17 20:12 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
patches attached.
in signal.h there are existing SA_ macros under _GNU_SOURCE, the new SA_
macros in the last patch are added for posix|bsd|gnu.
Szabolcs Nagy (7):
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
include/netinet/if_ether.h | 1 +
include/netinet/tcp.h | 5 +++++
include/signal.h | 6 ++++++
include/sys/prctl.h | 6 ++++++
include/sys/socket.h | 2 ++
5 files changed, 20 insertions(+)
--
2.29.2
[-- Attachment #2: 0001-sys-prctl.h-add-PR_SET_SYSCALL_USER_DISPATCH-from-li.patch --]
[-- Type: text/x-diff, Size: 1191 bytes --]
From 0fe91d0b1c6a457ca92c5cf3bb17ee6450a3d6b2 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sun, 7 Mar 2021 20:50:17 +0000
Subject: [PATCH 1/7] 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.29.2
[-- Attachment #3: 0002-sys-socket.h-add-new-SO_-socket-options-from-linux-v.patch --]
[-- Type: text/x-diff, Size: 922 bytes --]
From 849e78b97bdf030369f6e8aab0a19fecb2dd43f4 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sun, 7 Mar 2021 21:19:36 +0000
Subject: [PATCH 2/7] 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.29.2
[-- Attachment #4: 0003-netinet-if_ether.h-add-ETH_P_CFM-from-linux-v5.11.patch --]
[-- Type: text/x-diff, Size: 796 bytes --]
From a99ab78fa093c01a8e27ea7d076bb74127747726 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sun, 7 Mar 2021 21:33:25 +0000
Subject: [PATCH 3/7] 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.29.2
[-- Attachment #5: 0004-netinet-tcp.h-add-tcp-zerocopy-related-changes-from-.patch --]
[-- Type: text/x-diff, Size: 1044 bytes --]
From 7fc1d2b6866ddcefd5896a9ba5741cf4c7203308 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sun, 7 Mar 2021 21:39:24 +0000
Subject: [PATCH 4/7] 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.29.2
[-- Attachment #6: 0005-signal.h-add-si_code-values-for-SIGSYS.patch --]
[-- Type: text/x-diff, Size: 789 bytes --]
From c4310483c604522cdfe99da5c41f887a58dc6dfe Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sun, 7 Mar 2021 22:15:11 +0000
Subject: [PATCH 5/7] 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.29.2
[-- Attachment #7: 0006-signal.h-add-SYS_USER_DISPATCH-si_code-value-from-li.patch --]
[-- Type: text/x-diff, Size: 714 bytes --]
From 2af4cdb1452ddbba5119ddf031a00d2f5bb04cd4 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sun, 7 Mar 2021 22:20:54 +0000
Subject: [PATCH 6/7] 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.29.2
[-- Attachment #8: 0007-signal.h-add-new-sa_flags-from-linux-v5.11.patch --]
[-- Type: text/x-diff, Size: 1033 bytes --]
From 87d7dcfe395174e2f6e76de1a20c3014c7e984d1 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 17 Mar 2021 19:19:27 +0000
Subject: [PATCH 7/7] 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.29.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-17 20:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17 20:12 [musl] [PATCH 0/7] updates for linux v5.11 Szabolcs Nagy
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).