* [PATCH 0/8] Updates for linux v4.18
@ 2018-08-23 9:12 Szabolcs Nagy
0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2018-08-23 9:12 UTC (permalink / raw)
To: musl
[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]
glibc does not update the tcp_info struct because they consider
changing the size an abi break, but then users have to include
linux uapi headers for the new apis which can conflict with
libc headers. i added the new members but i don't know which
approach is better.
some sysvipc padding fields got renamed on 32bit time_t targets,
see e.g. linux commit c039dbd5f4bbf3547fde7ce9f7403e25938aa253
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c039dbd5f4bbf3547fde7ce9f7403e25938aa253
i haven't made appropriate changes in musl yet and wonder
if this is something we want to expose.
in the signalfd patch i changed a pad struct member to __pad.
i don't now of other issues.
Szabolcs Nagy (8):
update netinet/tcp.h for linux v4.18
update netinet/udp.h for linux v4.18
add AF_XDP to sys/socket.h from linux v4.18
add SIGSYS support to sys/signalfd.h from linux v4.18
add TRAP_UNK si_code to signal.h from linux v4.18
add io_pgetevents and rseq syscall numbers from linux v4.18
add AT_MINSIGSTKSZ to elf.h from linux v4.18
add NT_VMCOREDD to elf.h from linux v4.18
arch/aarch64/bits/syscall.h.in | 1 +
arch/arm/bits/syscall.h.in | 1 +
arch/i386/bits/syscall.h.in | 2 ++
arch/microblaze/bits/syscall.h.in | 2 ++
arch/mips/bits/syscall.h.in | 2 ++
arch/mips64/bits/syscall.h.in | 2 ++
arch/mipsn32/bits/syscall.h.in | 2 ++
arch/or1k/bits/syscall.h.in | 1 +
arch/powerpc/bits/syscall.h.in | 2 ++
arch/powerpc64/bits/syscall.h.in | 2 ++
arch/s390x/bits/syscall.h.in | 2 ++
arch/x32/bits/syscall.h.in | 2 ++
arch/x86_64/bits/syscall.h.in | 2 ++
include/elf.h | 2 ++
include/netinet/tcp.h | 18 ++++++++++++++++++
include/netinet/udp.h | 3 +++
include/signal.h | 1 +
include/sys/signalfd.h | 6 +++++-
include/sys/socket.h | 5 ++++-
19 files changed, 56 insertions(+), 2 deletions(-)
--
2.17.1
[-- Attachment #2: 0001-update-netinet-tcp.h-for-linux-v4.18.patch --]
[-- Type: text/x-diff, Size: 2064 bytes --]
From 847a793b1528c0a48d7ae61d3ca89379c2f66112 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 21 Aug 2018 22:27:57 +0000
Subject: [PATCH 1/8] update netinet/tcp.h for linux v4.18
add packet delivery info to tcp_info,
new in linux commit feb5f2ec646483fb66f9ad7218b1aad2a93a2a5c
add TCP_ZEROCOPY_RECEIVE socket option for zerocopy receive,
new in linux commit 05255b823a6173525587f29c4e8f1ca33fd7677d
add TCP_INQ socket option and TCP_CM_INQ cmsg to get in-queue bytes in cmsg
upon read, new in linux commit b75eba76d3d72e2374fac999926dafef2997edd2
add TCP_REPAIR_* to fix repair socket window probe patch,
new in linux commit 31048d7aedf31bf0f69c54a662944632f29d82f2
---
include/netinet/tcp.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index 1e2acfbf..584af2f5 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -36,6 +36,10 @@
#define TCP_MD5SIG_EXT 32
#define TCP_FASTOPEN_KEY 33
#define TCP_FASTOPEN_NO_COOKIE 34
+#define TCP_ZEROCOPY_RECEIVE 35
+#define TCP_INQ 36
+
+#define TCP_CM_INQ TCP_INQ
#define TCP_ESTABLISHED 1
#define TCP_SYN_SENT 2
@@ -66,6 +70,8 @@ enum {
TCP_NLA_SNDQ_SIZE,
TCP_NLA_CA_STATE,
TCP_NLA_SND_SSTHRESH,
+ TCP_NLA_DELIVERED,
+ TCP_NLA_DELIVERED_CE,
};
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
@@ -217,6 +223,8 @@ struct tcp_info {
uint64_t tcpi_busy_time;
uint64_t tcpi_rwnd_limited;
uint64_t tcpi_sndbuf_limited;
+ uint32_t tcpi_delivered;
+ uint32_t tcpi_delivered_ce;
};
#define TCP_MD5SIG_MAXKEYLEN 80
@@ -240,6 +248,10 @@ struct tcp_diag_md5sig {
uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
};
+#define TCP_REPAIR_ON 1
+#define TCP_REPAIR_OFF 0
+#define TCP_REPAIR_OFF_NO_WP -1
+
struct tcp_repair_window {
uint32_t snd_wl1;
uint32_t snd_wnd;
@@ -248,6 +260,12 @@ struct tcp_repair_window {
uint32_t rcv_wup;
};
+struct tcp_zerocopy_receive {
+ uint64_t address;
+ uint32_t length;
+ uint32_t recv_skip_hint;
+};
+
#endif
#endif
--
2.17.1
[-- Attachment #3: 0002-update-netinet-udp.h-for-linux-v4.18.patch --]
[-- Type: text/x-diff, Size: 943 bytes --]
From 71b5cb373895464a7a311479de361c73d29a05a5 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 21 Aug 2018 22:34:08 +0000
Subject: [PATCH 2/8] update netinet/udp.h for linux v4.18
add UDP_NO_CHECK6_* to restrict zero UDP6 checksums, new in linux commit
1c19448c9ba6545b80ded18488a64a7f3d8e6998 (pre-v4.18 change, was missed)
add UDP_SEGMENT to support generic segmentation offload for udp datagrams,
bec1f6f697362c5bc635dacd7ac8499d0a10a4e7 (new in v4.18)
---
include/netinet/udp.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/netinet/udp.h b/include/netinet/udp.h
index 030e8fb2..993c3478 100644
--- a/include/netinet/udp.h
+++ b/include/netinet/udp.h
@@ -24,6 +24,9 @@ struct udphdr {
#define UDP_CORK 1
#define UDP_ENCAP 100
+#define UDP_NO_CHECK6_TX 101
+#define UDP_NO_CHECK6_RX 102
+#define UDP_SEGMENT 103
#define UDP_ENCAP_ESPINUDP_NON_IKE 1
#define UDP_ENCAP_ESPINUDP 2
--
2.17.1
[-- Attachment #4: 0003-add-AF_XDP-to-sys-socket.h-from-linux-v4.18.patch --]
[-- Type: text/x-diff, Size: 1238 bytes --]
From 1dad64eb1838aceb353b48fa6d9624fe84ba8f89 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 22 Aug 2018 16:28:31 +0000
Subject: [PATCH 3/8] add AF_XDP to sys/socket.h from linux v4.18
new address family and related macros were added in linux commit
68e8b849b221b37a78a110a0307717d45e3593a0
---
include/sys/socket.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 14be6e99..1dec4b00 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -109,7 +109,8 @@ struct linger {
#define PF_KCM 41
#define PF_QIPCRTR 42
#define PF_SMC 43
-#define PF_MAX 44
+#define PF_XDP 44
+#define PF_MAX 45
#define AF_UNSPEC PF_UNSPEC
#define AF_LOCAL PF_LOCAL
@@ -158,6 +159,7 @@ struct linger {
#define AF_KCM PF_KCM
#define AF_QIPCRTR PF_QIPCRTR
#define AF_SMC PF_SMC
+#define AF_XDP PF_XDP
#define AF_MAX PF_MAX
#ifndef SO_DEBUG
@@ -265,6 +267,7 @@ struct linger {
#define SOL_NFC 280
#define SOL_KCM 281
#define SOL_TLS 282
+#define SOL_XDP 283
#define SOMAXCONN 128
--
2.17.1
[-- Attachment #5: 0004-add-SIGSYS-support-to-sys-signalfd.h-from-linux-v4.1.patch --]
[-- Type: text/x-diff, Size: 965 bytes --]
From 0d51831d4dbe1fc3de1511fb6c15b2e6ea6f0e8f Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 22 Aug 2018 16:39:20 +0000
Subject: [PATCH 4/8] add SIGSYS support to sys/signalfd.h from linux v4.18
new in linux commit 76b7f670730e87974f71df9f6129811e2769666e
in struct signalfd_siginfo the pad member is changed to __pad to keep
the namespace clean, it's not part of the public api.
---
include/sys/signalfd.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/sys/signalfd.h b/include/sys/signalfd.h
index 55431b91..e881e2cf 100644
--- a/include/sys/signalfd.h
+++ b/include/sys/signalfd.h
@@ -35,7 +35,11 @@ struct signalfd_siginfo {
uint64_t ssi_stime;
uint64_t ssi_addr;
uint16_t ssi_addr_lsb;
- uint8_t pad[128-12*4-4*8-2];
+ uint16_t __pad2;
+ int32_t ssi_syscall;
+ uint64_t ssi_call_addr;
+ uint32_t ssi_arch;
+ uint8_t __pad[128-14*4-5*8-2*2];
};
#ifdef __cplusplus
--
2.17.1
[-- Attachment #6: 0005-add-TRAP_UNK-si_code-to-signal.h-from-linux-v4.18.patch --]
[-- Type: text/x-diff, Size: 765 bytes --]
From 0d22b4ab02ad516fa628c523e0c5597c6978467b Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 22 Aug 2018 17:10:55 +0000
Subject: [PATCH 5/8] add TRAP_UNK si_code to signal.h from linux v4.18
used for undiagnosed trap exceptions where linux previously set si_code to 0.
new in linux commit db78e6a0a6f9f7d7277965600eeb1a5b3a6f55a8
---
include/signal.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/signal.h b/include/signal.h
index a4f85cca..5c48cb83 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -233,6 +233,7 @@ void (*sigset(int, void (*)(int)))(int);
#define TRAP_TRACE 2
#define TRAP_BRANCH 3
#define TRAP_HWBKPT 4
+#define TRAP_UNK 5
#define POLL_IN 1
#define POLL_OUT 2
#define POLL_MSG 3
--
2.17.1
[-- Attachment #7: 0006-add-io_pgetevents-and-rseq-syscall-numbers-from-linu.patch --]
[-- Type: text/x-diff, Size: 6277 bytes --]
From 6b1a82eca320a2ff05821e26d16dd72978d45e66 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 22 Aug 2018 17:31:43 +0000
Subject: [PATCH 6/8] add io_pgetevents and rseq syscall numbers from linux
v4.18
io_pgetevents is new in linux commit 7a074e96dee62586c935c80cecd931431bfdd0be
This is the io_getevents equivalent of ppoll/pselect and allows to
properly mix signals and aio completions (especially with IOCB_CMD_POLL)
rseq is new in linux commit d7822b1e24f2df5df98c76f0e94a5416349ff759
Expose a new system call allowing each thread to register one userspace
memory area to be used as an ABI between kernel and user-space for two
purposes: user-space restartable sequences and quick access to read the
current CPU number value from user-space.
---
arch/aarch64/bits/syscall.h.in | 1 +
arch/arm/bits/syscall.h.in | 1 +
arch/i386/bits/syscall.h.in | 2 ++
arch/microblaze/bits/syscall.h.in | 2 ++
arch/mips/bits/syscall.h.in | 2 ++
arch/mips64/bits/syscall.h.in | 2 ++
arch/mipsn32/bits/syscall.h.in | 2 ++
arch/or1k/bits/syscall.h.in | 1 +
arch/powerpc/bits/syscall.h.in | 2 ++
arch/powerpc64/bits/syscall.h.in | 2 ++
arch/s390x/bits/syscall.h.in | 2 ++
arch/x32/bits/syscall.h.in | 2 ++
arch/x86_64/bits/syscall.h.in | 2 ++
13 files changed, 23 insertions(+)
diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in
index 0d4a9bca..47a969bc 100644
--- a/arch/aarch64/bits/syscall.h.in
+++ b/arch/aarch64/bits/syscall.h.in
@@ -274,4 +274,5 @@
#define __NR_pkey_alloc 289
#define __NR_pkey_free 290
#define __NR_statx 291
+#define __NR_io_pgetevents 292
diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in
index 1920516a..13a3b66c 100644
--- a/arch/arm/bits/syscall.h.in
+++ b/arch/arm/bits/syscall.h.in
@@ -353,6 +353,7 @@
#define __NR_pkey_alloc 395
#define __NR_pkey_free 396
#define __NR_statx 397
+#define __NR_rseq 398
#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 27e72fec..47f4ae03 100644
--- a/arch/i386/bits/syscall.h.in
+++ b/arch/i386/bits/syscall.h.in
@@ -382,4 +382,6 @@
#define __NR_pkey_free 382
#define __NR_statx 383
#define __NR_arch_prctl 384
+#define __NR_io_pgetevents 385
+#define __NR_rseq 386
diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in
index dda5218d..f0583961 100644
--- a/arch/microblaze/bits/syscall.h.in
+++ b/arch/microblaze/bits/syscall.h.in
@@ -393,4 +393,6 @@
#define __NR_pkey_alloc 396
#define __NR_pkey_free 397
#define __NR_statx 398
+#define __NR_io_pgetevents 399
+#define __NR_rseq 400
diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in
index c1e23635..be8c3207 100644
--- a/arch/mips/bits/syscall.h.in
+++ b/arch/mips/bits/syscall.h.in
@@ -364,4 +364,6 @@
#define __NR_pkey_alloc 4364
#define __NR_pkey_free 4365
#define __NR_statx 4366
+#define __NR_rseq 4367
+#define __NR_io_pgetevents 4368
diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in
index b0fe49b5..f814aa48 100644
--- a/arch/mips64/bits/syscall.h.in
+++ b/arch/mips64/bits/syscall.h.in
@@ -324,4 +324,6 @@
#define __NR_pkey_alloc 5324
#define __NR_pkey_free 5325
#define __NR_statx 5326
+#define __NR_rseq 4327
+#define __NR_io_pgetevents 4328
diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
index 70c5d0b8..c1726180 100644
--- a/arch/mipsn32/bits/syscall.h.in
+++ b/arch/mipsn32/bits/syscall.h.in
@@ -328,4 +328,6 @@
#define __NR_pkey_alloc 6328
#define __NR_pkey_free 6329
#define __NR_statx 6330
+#define __NR_rseq 6331
+#define __NR_io_pgetevents 6332
diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in
index 03735e88..76ba2c6e 100644
--- a/arch/or1k/bits/syscall.h.in
+++ b/arch/or1k/bits/syscall.h.in
@@ -276,4 +276,5 @@
#define __NR_pkey_alloc 289
#define __NR_pkey_free 290
#define __NR_statx 291
+#define __NR_io_pgetevents 292
diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in
index 7ce94bbd..54e155f2 100644
--- a/arch/powerpc/bits/syscall.h.in
+++ b/arch/powerpc/bits/syscall.h.in
@@ -371,4 +371,6 @@
#define __NR_pkey_alloc 384
#define __NR_pkey_free 385
#define __NR_pkey_mprotect 386
+#define __NR_rseq 387
+#define __NR_io_pgetevents 388
diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in
index 1da1ecc0..4e29cedf 100644
--- a/arch/powerpc64/bits/syscall.h.in
+++ b/arch/powerpc64/bits/syscall.h.in
@@ -362,4 +362,6 @@
#define __NR_pkey_alloc 384
#define __NR_pkey_free 385
#define __NR_pkey_mprotect 386
+#define __NR_rseq 387
+#define __NR_io_pgetevents 388
diff --git a/arch/s390x/bits/syscall.h.in b/arch/s390x/bits/syscall.h.in
index 409e9155..85a18e79 100644
--- a/arch/s390x/bits/syscall.h.in
+++ b/arch/s390x/bits/syscall.h.in
@@ -324,4 +324,6 @@
#define __NR_statx 379
#define __NR_s390_sthyi 380
#define __NR_kexec_file_load 381
+#define __NR_io_pgetevents 382
+#define __NR_rseq 383
diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in
index 23ef4472..67d89f91 100644
--- a/arch/x32/bits/syscall.h.in
+++ b/arch/x32/bits/syscall.h.in
@@ -284,6 +284,8 @@
#define __NR_pkey_alloc (0x40000000 + 330)
#define __NR_pkey_free (0x40000000 + 331)
#define __NR_statx (0x40000000 + 332)
+#define __NR_io_pgetevents (0x40000000 + 333)
+#define __NR_rseq (0x40000000 + 334)
#define __NR_rt_sigaction (0x40000000 + 512)
#define __NR_rt_sigreturn (0x40000000 + 513)
diff --git a/arch/x86_64/bits/syscall.h.in b/arch/x86_64/bits/syscall.h.in
index bffcc4ee..9cdb7789 100644
--- a/arch/x86_64/bits/syscall.h.in
+++ b/arch/x86_64/bits/syscall.h.in
@@ -331,4 +331,6 @@
#define __NR_pkey_alloc 330
#define __NR_pkey_free 331
#define __NR_statx 332
+#define __NR_io_pgetevents 333
+#define __NR_rseq 334
--
2.17.1
[-- Attachment #8: 0007-add-AT_MINSIGSTKSZ-to-elf.h-from-linux-v4.18.patch --]
[-- Type: text/x-diff, Size: 1113 bytes --]
From 053ba4fecfe092ccabf2c2ca29ace8b91798a6c4 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 22 Aug 2018 17:51:25 +0000
Subject: [PATCH 7/8] add AT_MINSIGSTKSZ to elf.h from linux v4.18
new in linux commit 94b07c1f8c39c6d839df35fa28ffd1785d385897
currently only supported on aarch64:
Stateful CPU architecture extensions may require the signal frame
to grow to a size that exceeds the arch's MINSIGSTKSZ #define.
However, changing this #define is an ABI break.
To allow userspace the option of determining the signal frame size
in a more forwards-compatible way, this patch adds a new auxv entry
tagged with AT_MINSIGSTKSZ, which provides the maximum signal frame
size that the process can observe during its lifetime.
---
include/elf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/elf.h b/include/elf.h
index c2297353..4a8843c7 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -1035,6 +1035,7 @@ typedef struct {
#define AT_L3_CACHESIZE 46
#define AT_L3_CACHEGEOMETRY 47
+#define AT_MINSIGSTKSZ 51
typedef struct {
--
2.17.1
[-- Attachment #9: 0008-add-NT_VMCOREDD-to-elf.h-from-linux-v4.18.patch --]
[-- Type: text/x-diff, Size: 673 bytes --]
From 98acd2853bf395ca3506d9823eb60c52b6010820 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 22 Aug 2018 17:56:59 +0000
Subject: [PATCH 8/8] add NT_VMCOREDD to elf.h from linux v4.18
used for device driver dump in /proc/vmcore
new in linux commit 2724273e8fd00b512596a77ee063f49b25f36507
---
include/elf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/elf.h b/include/elf.h
index 4a8843c7..54f41a10 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -685,6 +685,7 @@ typedef struct {
#define NT_METAG_RPIPE 0x501
#define NT_METAG_TLS 0x502
#define NT_ARC_V2 0x600
+#define NT_VMCOREDD 0x700
#define NT_VERSION 1
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-23 9:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-23 9:12 [PATCH 0/8] Updates for linux v4.18 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).