mailing list of musl libc
 help / color / mirror / Atom feed
* [musl] [PATCH 00/16] Updates for linux v5.5, v5.6, v5.7 and v5.8
@ 2020-09-09  9:20 Szabolcs Nagy
  0 siblings, 0 replies; only message in thread
From: Szabolcs Nagy @ 2020-09-09  9:20 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 2199 bytes --]

v5.5 and v5.6 are the same as in

https://www.openwall.com/lists/musl/2020/03/31/12

v5.7 and v5.8 patches are new.

Szabolcs Nagy (16):
  netinet/tcp.h: update tcp_info for linux v5.5
  add pidfd_getfd and openat2 syscall numbers from linux v5.6
  netinet/in.h: add IPPROTO_ macros from linux v5.6
  netinet/tcp.h: update for linux v5.6
  netinet/udp.h: add TCP_ENCAP_ESPINTCP from linux v5.6
  sys/prctl.h: add PR_{SET,GET}_IO_FLUSHER from linux v5.6
  sys/random.h: add GRND_INSECURE from linux v5.6
  sched.h: add CLONE_NEWTIME from linux v5.6
  aarch64: add HWCAP2_ macros from linux v5.3
  aarch64: add new HWCAP2_ macros from linux v5.6
  sys/fanotify.h: update to linux v5.7
  sys/mman.h: add MREMAP_DONTUNMAP from linux v5.7
  netinet/tcp.h: update to linux v5.7
  bits/syscall.h: add __NR_faccessat2 from linux v5.8
  elf.h: add .note.gnu.property related definitions
  netinet/if_ether.h: add ETH_P_MRP from linux v5.8

 arch/aarch64/bits/hwcap.h         | 10 ++++++++++
 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       |  4 ++++
 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         |  4 ++++
 arch/x32/bits/syscall.h.in        |  3 +++
 arch/x86_64/bits/syscall.h.in     |  3 +++
 include/elf.h                     |  2 ++
 include/netinet/if_ether.h        |  1 +
 include/netinet/in.h              |  4 +++-
 include/netinet/tcp.h             | 18 +++++++++++++++---
 include/netinet/udp.h             |  1 +
 include/sched.h                   |  1 +
 include/sys/fanotify.h            |  4 +++-
 include/sys/mman.h                |  1 +
 include/sys/prctl.h               |  3 +++
 include/sys/random.h              |  1 +
 27 files changed, 91 insertions(+), 5 deletions(-)

-- 
2.28.0


[-- Attachment #2: 0001-netinet-tcp.h-update-tcp_info-for-linux-v5.5.patch --]
[-- Type: text/x-diff, Size: 1193 bytes --]

From 1417fb192cd9e05fc25c41207d6493ca4e27a508 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Sat, 15 Feb 2020 09:42:37 +0000
Subject: [PATCH 01/16] netinet/tcp.h: update tcp_info for linux v5.5

see

  linux commit 480274787d7e3458bc5a7cfbbbe07033984ad711
  tcp: add TCP_INFO status for failed client TFO
---
 include/netinet/tcp.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index 44a007aa..db3904ae 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -181,6 +181,13 @@ struct tcphdr {
 #define TCP_CA_Recovery		3
 #define TCP_CA_Loss		4
 
+enum tcp_fastopen_client_fail {
+	TFO_STATUS_UNSPEC,
+	TFO_COOKIE_UNAVAILABLE,
+	TFO_DATA_NOT_ACKED,
+	TFO_SYN_RETRANSMITTED,
+};
+
 struct tcp_info {
 	uint8_t tcpi_state;
 	uint8_t tcpi_ca_state;
@@ -189,7 +196,7 @@ struct tcp_info {
 	uint8_t tcpi_backoff;
 	uint8_t tcpi_options;
 	uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
-	uint8_t tcpi_delivery_rate_app_limited : 1;
+	uint8_t tcpi_delivery_rate_app_limited : 1, tcpi_fastopen_client_fail : 2;
 	uint32_t tcpi_rto;
 	uint32_t tcpi_ato;
 	uint32_t tcpi_snd_mss;
-- 
2.28.0


[-- Attachment #3: 0002-add-pidfd_getfd-and-openat2-syscall-numbers-from-lin.patch --]
[-- Type: text/x-diff, Size: 7220 bytes --]

From 3215c6ddf6db2f790c71a9c437a4d1c05c5c01e9 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 18:32:51 +0000
Subject: [PATCH 02/16] add pidfd_getfd and openat2 syscall numbers from linux
 v5.6

also added clone3 on sh and m68k, on sh it's still missing (not
yet wired up), but reserved so safe to add.

see

  linux commit fddb5d430ad9fa91b49b1d34d0202ffe2fa0e179
  open: introduce openat2(2) syscall

  linux commit 9a2cef09c801de54feecd912303ace5c27237f12
  arch: wire up pidfd_getfd syscall

  linux commit 8649c322f75c96e7ced2fec201e123b2b073bf09
  pid: Implement pidfd_getfd syscall

  linux commit e8bb2a2a1d51511e6b3f7e08125d52ec73c11139
  m68k: Wire up clone3() syscall
---
 arch/aarch64/bits/syscall.h.in    | 2 ++
 arch/arm/bits/syscall.h.in        | 2 ++
 arch/i386/bits/syscall.h.in       | 2 ++
 arch/m68k/bits/syscall.h.in       | 3 +++
 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       | 2 ++
 arch/powerpc/bits/syscall.h.in    | 2 ++
 arch/powerpc64/bits/syscall.h.in  | 2 ++
 arch/riscv64/bits/syscall.h.in    | 2 ++
 arch/s390x/bits/syscall.h.in      | 2 ++
 arch/sh/bits/syscall.h.in         | 3 +++
 arch/x32/bits/syscall.h.in        | 2 ++
 arch/x86_64/bits/syscall.h.in     | 2 ++
 16 files changed, 34 insertions(+)

diff --git a/arch/aarch64/bits/syscall.h.in b/arch/aarch64/bits/syscall.h.in
index 93648afd..169510fd 100644
--- a/arch/aarch64/bits/syscall.h.in
+++ b/arch/aarch64/bits/syscall.h.in
@@ -289,4 +289,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in
index 11d67763..729597c2 100644
--- a/arch/arm/bits/syscall.h.in
+++ b/arch/arm/bits/syscall.h.in
@@ -389,6 +389,8 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
 #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 1ae4e48a..40721c6c 100644
--- a/arch/i386/bits/syscall.h.in
+++ b/arch/i386/bits/syscall.h.in
@@ -426,4 +426,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in
index ddfa72e4..f2f838cc 100644
--- a/arch/m68k/bits/syscall.h.in
+++ b/arch/m68k/bits/syscall.h.in
@@ -405,3 +405,6 @@
 #define __NR_fsmount		432
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
+#define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in
index 963386a8..24572920 100644
--- a/arch/microblaze/bits/syscall.h.in
+++ b/arch/microblaze/bits/syscall.h.in
@@ -427,4 +427,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in
index 86251bf3..56775941 100644
--- a/arch/mips/bits/syscall.h.in
+++ b/arch/mips/bits/syscall.h.in
@@ -408,4 +408,6 @@
 #define __NR_fspick		4433
 #define __NR_pidfd_open		4434
 #define __NR_clone3		4435
+#define __NR_openat2		4437
+#define __NR_pidfd_getfd	4438
 
diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in
index 9b406e9a..6f393466 100644
--- a/arch/mips64/bits/syscall.h.in
+++ b/arch/mips64/bits/syscall.h.in
@@ -338,4 +338,6 @@
 #define __NR_fspick		5433
 #define __NR_pidfd_open		5434
 #define __NR_clone3		5435
+#define __NR_openat2		5437
+#define __NR_pidfd_getfd	5438
 
diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
index 2ad48d10..e24086f6 100644
--- a/arch/mipsn32/bits/syscall.h.in
+++ b/arch/mipsn32/bits/syscall.h.in
@@ -362,4 +362,6 @@
 #define __NR_fspick		6433
 #define __NR_pidfd_open		6434
 #define __NR_clone3		6435
+#define __NR_openat2		6437
+#define __NR_pidfd_getfd	6438
 
diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in
index e9c925e4..0d54d247 100644
--- a/arch/or1k/bits/syscall.h.in
+++ b/arch/or1k/bits/syscall.h.in
@@ -311,4 +311,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in
index 8d4f79b5..70f7a379 100644
--- a/arch/powerpc/bits/syscall.h.in
+++ b/arch/powerpc/bits/syscall.h.in
@@ -415,4 +415,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in
index b935864c..3b9f8a44 100644
--- a/arch/powerpc64/bits/syscall.h.in
+++ b/arch/powerpc64/bits/syscall.h.in
@@ -387,4 +387,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in
index 0043eeba..da4fd73d 100644
--- a/arch/riscv64/bits/syscall.h.in
+++ b/arch/riscv64/bits/syscall.h.in
@@ -289,6 +289,8 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
 #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 e89f3782..9406c937 100644
--- a/arch/s390x/bits/syscall.h.in
+++ b/arch/s390x/bits/syscall.h.in
@@ -352,4 +352,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in
index 0102ddaf..0f09c903 100644
--- a/arch/sh/bits/syscall.h.in
+++ b/arch/sh/bits/syscall.h.in
@@ -398,4 +398,7 @@
 #define __NR_fsmount		432
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
+#define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in
index f47bdee5..17a4011e 100644
--- a/arch/x32/bits/syscall.h.in
+++ b/arch/x32/bits/syscall.h.in
@@ -298,6 +298,8 @@
 #define __NR_fspick		(0x40000000 + 433)
 #define __NR_pidfd_open		(0x40000000 + 434)
 #define __NR_clone3		(0x40000000 + 435)
+#define __NR_openat2		(0x40000000 + 437)
+#define __NR_pidfd_getfd	(0x40000000 + 438)
 
 
 #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 6a646ad3..65126e1f 100644
--- a/arch/x86_64/bits/syscall.h.in
+++ b/arch/x86_64/bits/syscall.h.in
@@ -345,4 +345,6 @@
 #define __NR_fspick		433
 #define __NR_pidfd_open		434
 #define __NR_clone3		435
+#define __NR_openat2		437
+#define __NR_pidfd_getfd	438
 
-- 
2.28.0


[-- Attachment #4: 0003-netinet-in.h-add-IPPROTO_-macros-from-linux-v5.6.patch --]
[-- Type: text/x-diff, Size: 1109 bytes --]

From 2a1c0a4e2c7313e41864a3422e782ccd7b21dbb6 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 19:57:53 +0000
Subject: [PATCH 03/16] netinet/in.h: add IPPROTO_ macros from linux v5.6

add IPPROTO_ETHERNET and IPPROTO_MPTCP, see

  linux commit 2677625387056136e256c743e3285b4fe3da87bb
  seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol number

  linux commit faf391c3826cd29feae02078ca2022d2f912f7cc
  tcp: Define IPPROTO_MPTCP
---
 include/netinet/in.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/netinet/in.h b/include/netinet/in.h
index 103d2e04..36a2013a 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -101,8 +101,10 @@ uint16_t ntohs(uint16_t);
 #define IPPROTO_MH       135
 #define IPPROTO_UDPLITE  136
 #define IPPROTO_MPLS     137
+#define IPPROTO_ETHERNET 143
 #define IPPROTO_RAW      255
-#define IPPROTO_MAX      256
+#define IPPROTO_MPTCP    262
+#define IPPROTO_MAX      263
 
 #define IN6_IS_ADDR_UNSPECIFIED(a) \
         (((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && \
-- 
2.28.0


[-- Attachment #5: 0004-netinet-tcp.h-update-for-linux-v5.6.patch --]
[-- Type: text/x-diff, Size: 1362 bytes --]

From b07b16ea120a71b77ccfc55ac6b2a9aecb263839 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 20:07:33 +0000
Subject: [PATCH 04/16] netinet/tcp.h: update for linux v5.6

TCP_NLA_TIMEOUT_REHASH queries timeout-triggered rehash attempts,
tcpm_ifindex limits the scope of TCP_MD5SIG* sockopt to a device.

see

  linux commit 32efcc06d2a15fa87585614d12d6c2308cc2d3f3
  tcp: export count for rehash attempts

  linux commit 6b102db50cdde3ba2f78631ed21222edf3a5fb51
  net: Add device index to tcp_md5sig
---
 include/netinet/tcp.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index db3904ae..92550dcc 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -78,6 +78,7 @@ enum {
 	TCP_NLA_DSACK_DUPS,
 	TCP_NLA_REORD_SEEN,
 	TCP_NLA_SRTT,
+	TCP_NLA_TIMEOUT_REHASH,
 };
 
 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
@@ -247,14 +248,15 @@ struct tcp_info {
 
 #define TCP_MD5SIG_MAXKEYLEN    80
 
-#define TCP_MD5SIG_FLAG_PREFIX  1
+#define TCP_MD5SIG_FLAG_PREFIX  0x1
+#define TCP_MD5SIG_FLAG_IFINDEX 0x2
 
 struct tcp_md5sig {
 	struct sockaddr_storage tcpm_addr;
 	uint8_t tcpm_flags;
 	uint8_t tcpm_prefixlen;
 	uint16_t tcpm_keylen;
-	uint32_t __tcpm_pad;
+	int tcpm_ifindex;
 	uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
 };
 
-- 
2.28.0


[-- Attachment #6: 0005-netinet-udp.h-add-TCP_ENCAP_ESPINTCP-from-linux-v5.6.patch --]
[-- Type: text/x-diff, Size: 852 bytes --]

From 7fb0399539ccc42cc1bedf78b8a5a5c2febb7766 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 20:19:26 +0000
Subject: [PATCH 05/16] netinet/udp.h: add TCP_ENCAP_ESPINTCP from linux v5.6

The use of TCP_ in udp.h is not known, fortunately udp.h is not
specified by posix so there are no strict namespace rules, added in

  linux commit e27cca96cd68fa2c6814c90f9a1cfd36bb68c593
  xfrm: add espintcp (RFC 8229)
---
 include/netinet/udp.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/netinet/udp.h b/include/netinet/udp.h
index ffd89079..40c3f203 100644
--- a/include/netinet/udp.h
+++ b/include/netinet/udp.h
@@ -35,6 +35,7 @@ struct udphdr {
 #define UDP_ENCAP_GTP0		4
 #define UDP_ENCAP_GTP1U		5
 #define UDP_ENCAP_RXRPC		6
+#define TCP_ENCAP_ESPINTCP	7
 
 #define SOL_UDP            17
 
-- 
2.28.0


[-- Attachment #7: 0006-sys-prctl.h-add-PR_-SET-GET-_IO_FLUSHER-from-linux-v.patch --]
[-- Type: text/x-diff, Size: 886 bytes --]

From 0d3f8c5918d5be7d8771e051305e2279e627d828 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 20:26:53 +0000
Subject: [PATCH 06/16] sys/prctl.h: add PR_{SET,GET}_IO_FLUSHER from linux
 v5.6

needed for storage drivers with userspace component that may
run in the IO path, see

  linux commit 8d19f1c8e1937baf74e1962aae9f90fa3aeab463
  prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim
---
 include/sys/prctl.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/sys/prctl.h b/include/sys/prctl.h
index d9c846e9..4b9fcc05 100644
--- a/include/sys/prctl.h
+++ b/include/sys/prctl.h
@@ -158,6 +158,9 @@ struct prctl_mm_map {
 #define PR_GET_TAGGED_ADDR_CTRL 56
 #define PR_TAGGED_ADDR_ENABLE (1UL << 0)
 
+#define PR_SET_IO_FLUSHER 57
+#define PR_GET_IO_FLUSHER 58
+
 int prctl (int, ...);
 
 #ifdef __cplusplus
-- 
2.28.0


[-- Attachment #8: 0007-sys-random.h-add-GRND_INSECURE-from-linux-v5.6.patch --]
[-- Type: text/x-diff, Size: 749 bytes --]

From 6c596b1eebe1ac8876db62691401da3c479d523e Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 20:37:23 +0000
Subject: [PATCH 07/16] sys/random.h: add GRND_INSECURE from linux v5.6

added in

  linux commit 75551dbf112c992bc6c99a972990b3f272247e23
  random: add GRND_INSECURE to return best-effort non-cryptographic bytes
---
 include/sys/random.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/sys/random.h b/include/sys/random.h
index 4ee7bf2c..59e40ab8 100644
--- a/include/sys/random.h
+++ b/include/sys/random.h
@@ -10,6 +10,7 @@ extern "C" {
 
 #define GRND_NONBLOCK	0x0001
 #define GRND_RANDOM	0x0002
+#define GRND_INSECURE	0x0004
 
 ssize_t getrandom(void *, size_t, unsigned);
 
-- 
2.28.0


[-- Attachment #9: 0008-sched.h-add-CLONE_NEWTIME-from-linux-v5.6.patch --]
[-- Type: text/x-diff, Size: 799 bytes --]

From 367be7efd7dd202a7d1e1370a5f6152393c6af84 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 20:42:14 +0000
Subject: [PATCH 08/16] sched.h: add CLONE_NEWTIME from linux v5.6

reuses a bit from CSIGNAL so it can only be used with unshare
and clone3, added in

  linux commit 769071ac9f20b6a447410c7eaa55d1a5233ef40c
  ns: Introduce Time Namespace
---
 include/sched.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/sched.h b/include/sched.h
index 822f464e..fda4b484 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -49,6 +49,7 @@ int     sched_yield(void);
 
 #ifdef _GNU_SOURCE
 #define CSIGNAL		0x000000ff
+#define CLONE_NEWTIME	0x00000080
 #define CLONE_VM	0x00000100
 #define CLONE_FS	0x00000200
 #define CLONE_FILES	0x00000400
-- 
2.28.0


[-- Attachment #10: 0009-aarch64-add-HWCAP2_-macros-from-linux-v5.3.patch --]
[-- Type: text/x-diff, Size: 898 bytes --]

From 95ecdb0ecc4b0a7e41b93d866bf73671ab84ebb8 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 20:57:46 +0000
Subject: [PATCH 09/16] aarch64: add HWCAP2_ macros from linux v5.3

these were missed before, added in

  linux commit 1201937491822b61641c1878ebcd16a93aed4540
  arm64: Expose ARMv8.5 CondM capability to userspace

  linux commit ca9503fc9e9812aa6258e55d44edb03eb30fc46f
  arm64: Expose FRINT capabilities to userspace
---
 arch/aarch64/bits/hwcap.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/aarch64/bits/hwcap.h b/arch/aarch64/bits/hwcap.h
index a7484028..cb442918 100644
--- a/arch/aarch64/bits/hwcap.h
+++ b/arch/aarch64/bits/hwcap.h
@@ -38,3 +38,5 @@
 #define HWCAP2_SVEBITPERM	(1 << 4)
 #define HWCAP2_SVESHA3		(1 << 5)
 #define HWCAP2_SVESM4		(1 << 6)
+#define HWCAP2_FLAGM2		(1 << 7)
+#define HWCAP2_FRINT		(1 << 8)
-- 
2.28.0


[-- Attachment #11: 0010-aarch64-add-new-HWCAP2_-macros-from-linux-v5.6.patch --]
[-- Type: text/x-diff, Size: 1093 bytes --]

From 238f4c37f25d3bf322856741a79f0b88ff9adf66 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 31 Mar 2020 20:57:46 +0000
Subject: [PATCH 10/16] aarch64: add new HWCAP2_ macros from linux v5.6

added in

  linux commit 1a50ec0b3b2e9a83f1b1245ea37a853aac2f741c
  arm64: Implement archrandom.h for ARMv8.5-RNG

  linux commit d4209d8b717311d114b5d47ba7f8249fd44e97c2
  arm64: cpufeature: Export matrix and other features to userspace
---
 arch/aarch64/bits/hwcap.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/aarch64/bits/hwcap.h b/arch/aarch64/bits/hwcap.h
index cb442918..7ab73f99 100644
--- a/arch/aarch64/bits/hwcap.h
+++ b/arch/aarch64/bits/hwcap.h
@@ -40,3 +40,11 @@
 #define HWCAP2_SVESM4		(1 << 6)
 #define HWCAP2_FLAGM2		(1 << 7)
 #define HWCAP2_FRINT		(1 << 8)
+#define HWCAP2_SVEI8MM		(1 << 9)
+#define HWCAP2_SVEF32MM		(1 << 10)
+#define HWCAP2_SVEF64MM		(1 << 11)
+#define HWCAP2_SVEBF16		(1 << 12)
+#define HWCAP2_I8MM		(1 << 13)
+#define HWCAP2_BF16		(1 << 14)
+#define HWCAP2_DGH		(1 << 15)
+#define HWCAP2_RNG		(1 << 16)
-- 
2.28.0


[-- Attachment #12: 0011-sys-fanotify.h-update-to-linux-v5.7.patch --]
[-- Type: text/x-diff, Size: 1427 bytes --]

From 1bee9c494ea02da64f121a847b877289ef353906 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Mon, 13 Jul 2020 19:38:27 +0000
Subject: [PATCH 11/16] sys/fanotify.h: update to linux v5.7

see

  linux commit 9e2ba2c34f1922ca1e0c7d31b30ace5842c2e7d1
  fanotify: send FAN_DIR_MODIFY event flavor with dir inode and name

  linux commit 44d705b0370b1d581f46ff23e5d33e8b5ff8ec58
  fanotify: report name info for FAN_DIR_MODIFY event
---
 include/sys/fanotify.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/sys/fanotify.h b/include/sys/fanotify.h
index b637c8f5..75766790 100644
--- a/include/sys/fanotify.h
+++ b/include/sys/fanotify.h
@@ -55,8 +55,9 @@ struct fanotify_response {
 #define FAN_OPEN_PERM 0x10000
 #define FAN_ACCESS_PERM 0x20000
 #define FAN_OPEN_EXEC_PERM 0x40000
-#define FAN_ONDIR 0x40000000
+#define FAN_DIR_MODIFY 0x00080000
 #define FAN_EVENT_ON_CHILD 0x08000000
+#define FAN_ONDIR 0x40000000
 #define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE)
 #define FAN_MOVE (FAN_MOVED_FROM | FAN_MOVED_TO)
 #define FAN_CLOEXEC 0x01
@@ -88,6 +89,7 @@ struct fanotify_response {
 #define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS | FAN_ALL_PERM_EVENTS | FAN_Q_OVERFLOW)
 #define FANOTIFY_METADATA_VERSION 3
 #define FAN_EVENT_INFO_TYPE_FID 1
+#define FAN_EVENT_INFO_TYPE_DFID_NAME 2
 #define FAN_ALLOW 0x01
 #define FAN_DENY 0x02
 #define FAN_AUDIT 0x10
-- 
2.28.0


[-- Attachment #13: 0012-sys-mman.h-add-MREMAP_DONTUNMAP-from-linux-v5.7.patch --]
[-- Type: text/x-diff, Size: 799 bytes --]

From 3cd499366107041d4f9c2696f0cf099a894a082b Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Mon, 13 Jul 2020 19:43:44 +0000
Subject: [PATCH 12/16] sys/mman.h: add MREMAP_DONTUNMAP from linux v5.7

it remaps anon mappings without unmapping the original. chromeos plans
to use it with userfaultfd, see:

  linux commit e346b3813067d4b17383f975f197a9aa28a3b077
  mm/mremap: add MREMAP_DONTUNMAP to mremap()
---
 include/sys/mman.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/sys/mman.h b/include/sys/mman.h
index 3bade727..4d603e91 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -101,6 +101,7 @@ extern "C" {
 #ifdef _GNU_SOURCE
 #define MREMAP_MAYMOVE 1
 #define MREMAP_FIXED 2
+#define MREMAP_DONTUNMAP 4
 
 #define MLOCK_ONFAULT 0x01
 
-- 
2.28.0


[-- Attachment #14: 0013-netinet-tcp.h-update-to-linux-v5.7.patch --]
[-- Type: text/x-diff, Size: 1191 bytes --]

From 6cbe6d95d9cb47ab9b7fc7e58a2c52659e946fb0 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Mon, 13 Jul 2020 19:59:41 +0000
Subject: [PATCH 13/16] netinet/tcp.h: update to linux v5.7

add TCP_NLA_BYTES_NOTSENT and new tcp_zerocopy_receive fields, see

  linux commit c8856c051454909e5059df4e81c77b9c366c5515
  tcp-zerocopy: Return inq along with tcp receive zerocopy.

  linux commit 33946518d493cdf10aedb4a483f1aa41948a3dab
  tcp-zerocopy: Return sk_err (if set) along with tcp receive zerocopy.

  linux commit e08ab0b377a1489760533424437c5f4be7f484a4
  tcp: add bytes not sent to SCM_TIMESTAMPING_OPT_STATS
---
 include/netinet/tcp.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index 92550dcc..b7b997f5 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -79,6 +79,7 @@ enum {
 	TCP_NLA_REORD_SEEN,
 	TCP_NLA_SRTT,
 	TCP_NLA_TIMEOUT_REHASH,
+	TCP_NLA_BYTES_NOTSENT,
 };
 
 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
@@ -284,6 +285,8 @@ struct tcp_zerocopy_receive {
 	uint64_t address;
 	uint32_t length;
 	uint32_t recv_skip_hint;
+	uint32_t inq;
+	int32_t err;
 };
 
 #endif
-- 
2.28.0


[-- Attachment #15: 0014-bits-syscall.h-add-__NR_faccessat2-from-linux-v5.8.patch --]
[-- Type: text/x-diff, Size: 6408 bytes --]

From 3d3bf42772e370b7dacc0e26ee1ee04432f2fa25 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Tue, 28 Jul 2020 21:17:13 +0000
Subject: [PATCH 14/16] bits/syscall.h: add __NR_faccessat2 from linux v5.8

the linux faccessat syscall lacks a flag argument that is necessary
to implement the posix api, see

  linux commit c8ffd8bcdd28296a198f237cc595148a8d4adfbe
  vfs: add faccessat2 syscall
---
 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 169510fd..ac3eaf80 100644
--- a/arch/aarch64/bits/syscall.h.in
+++ b/arch/aarch64/bits/syscall.h.in
@@ -291,4 +291,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/arm/bits/syscall.h.in b/arch/arm/bits/syscall.h.in
index 729597c2..5b4e6791 100644
--- a/arch/arm/bits/syscall.h.in
+++ b/arch/arm/bits/syscall.h.in
@@ -391,6 +391,7 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
 #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 40721c6c..fb562db5 100644
--- a/arch/i386/bits/syscall.h.in
+++ b/arch/i386/bits/syscall.h.in
@@ -428,4 +428,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/m68k/bits/syscall.h.in b/arch/m68k/bits/syscall.h.in
index f2f838cc..93703b46 100644
--- a/arch/m68k/bits/syscall.h.in
+++ b/arch/m68k/bits/syscall.h.in
@@ -408,3 +408,4 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
diff --git a/arch/microblaze/bits/syscall.h.in b/arch/microblaze/bits/syscall.h.in
index 24572920..1e78dfde 100644
--- a/arch/microblaze/bits/syscall.h.in
+++ b/arch/microblaze/bits/syscall.h.in
@@ -429,4 +429,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/mips/bits/syscall.h.in b/arch/mips/bits/syscall.h.in
index 56775941..5b2066ef 100644
--- a/arch/mips/bits/syscall.h.in
+++ b/arch/mips/bits/syscall.h.in
@@ -410,4 +410,5 @@
 #define __NR_clone3		4435
 #define __NR_openat2		4437
 #define __NR_pidfd_getfd	4438
+#define __NR_faccessat2		4439
 
diff --git a/arch/mips64/bits/syscall.h.in b/arch/mips64/bits/syscall.h.in
index 6f393466..30cb321f 100644
--- a/arch/mips64/bits/syscall.h.in
+++ b/arch/mips64/bits/syscall.h.in
@@ -340,4 +340,5 @@
 #define __NR_clone3		5435
 #define __NR_openat2		5437
 #define __NR_pidfd_getfd	5438
+#define __NR_faccessat2		5439
 
diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
index e24086f6..12eae034 100644
--- a/arch/mipsn32/bits/syscall.h.in
+++ b/arch/mipsn32/bits/syscall.h.in
@@ -364,4 +364,5 @@
 #define __NR_clone3		6435
 #define __NR_openat2		6437
 #define __NR_pidfd_getfd	6438
+#define __NR_faccessat2		6439
 
diff --git a/arch/or1k/bits/syscall.h.in b/arch/or1k/bits/syscall.h.in
index 0d54d247..bc9def13 100644
--- a/arch/or1k/bits/syscall.h.in
+++ b/arch/or1k/bits/syscall.h.in
@@ -313,4 +313,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/powerpc/bits/syscall.h.in b/arch/powerpc/bits/syscall.h.in
index 70f7a379..2d4c5dfc 100644
--- a/arch/powerpc/bits/syscall.h.in
+++ b/arch/powerpc/bits/syscall.h.in
@@ -417,4 +417,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/powerpc64/bits/syscall.h.in b/arch/powerpc64/bits/syscall.h.in
index 3b9f8a44..2a5c7034 100644
--- a/arch/powerpc64/bits/syscall.h.in
+++ b/arch/powerpc64/bits/syscall.h.in
@@ -389,4 +389,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in
index da4fd73d..439712a4 100644
--- a/arch/riscv64/bits/syscall.h.in
+++ b/arch/riscv64/bits/syscall.h.in
@@ -291,6 +291,7 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
 #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 9406c937..4c04abc5 100644
--- a/arch/s390x/bits/syscall.h.in
+++ b/arch/s390x/bits/syscall.h.in
@@ -354,4 +354,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in
index 0f09c903..3942dea2 100644
--- a/arch/sh/bits/syscall.h.in
+++ b/arch/sh/bits/syscall.h.in
@@ -401,4 +401,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
diff --git a/arch/x32/bits/syscall.h.in b/arch/x32/bits/syscall.h.in
index 17a4011e..e4c4bd06 100644
--- a/arch/x32/bits/syscall.h.in
+++ b/arch/x32/bits/syscall.h.in
@@ -300,6 +300,7 @@
 #define __NR_clone3		(0x40000000 + 435)
 #define __NR_openat2		(0x40000000 + 437)
 #define __NR_pidfd_getfd	(0x40000000 + 438)
+#define __NR_faccessat2		(0x40000000 + 439)
 
 
 #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 65126e1f..12a86980 100644
--- a/arch/x86_64/bits/syscall.h.in
+++ b/arch/x86_64/bits/syscall.h.in
@@ -347,4 +347,5 @@
 #define __NR_clone3		435
 #define __NR_openat2		437
 #define __NR_pidfd_getfd	438
+#define __NR_faccessat2		439
 
-- 
2.28.0


[-- Attachment #16: 0015-elf.h-add-.note.gnu.property-related-definitions.patch --]
[-- Type: text/x-diff, Size: 881 bytes --]

From 1177604f6e3efde66d296eb9a3b38c9d4207e807 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 9 Sep 2020 07:25:52 +0000
Subject: [PATCH 15/16] elf.h: add .note.gnu.property related definitions

On x86 and aarch64 GNU properties may be used to mark ELF objects.
---
 include/elf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/elf.h b/include/elf.h
index 549f92c1..b5e7befb 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -603,6 +603,7 @@ typedef struct {
 #define PT_GNU_EH_FRAME	0x6474e550
 #define PT_GNU_STACK	0x6474e551
 #define PT_GNU_RELRO	0x6474e552
+#define PT_GNU_PROPERTY	0x6474e553
 #define PT_LOSUNW	0x6ffffffa
 #define PT_SUNWBSS	0x6ffffffa
 #define PT_SUNWSTACK	0x6ffffffb
@@ -1085,6 +1086,7 @@ typedef struct {
 
 #define NT_GNU_BUILD_ID	3
 #define NT_GNU_GOLD_VERSION	4
+#define NT_GNU_PROPERTY_TYPE_0	5
 
 
 
-- 
2.28.0


[-- Attachment #17: 0016-netinet-if_ether.h-add-ETH_P_MRP-from-linux-v5.8.patch --]
[-- Type: text/x-diff, Size: 840 bytes --]

From 893018aa19125dad1a8d1a7d2d56fcde5757aed7 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 9 Sep 2020 07:33:47 +0000
Subject: [PATCH 16/16] netinet/if_ether.h: add ETH_P_MRP from linux v5.8

Ethernet protocol number for media redundancy protocol, see

  linux commit 4714d13791f831d253852c8b5d657270becb8b2a
  bridge: uapi: mrp: Add mrp attributes.
---
 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 a08485e7..55a2ff1b 100644
--- a/include/netinet/if_ether.h
+++ b/include/netinet/if_ether.h
@@ -59,6 +59,7 @@
 #define ETH_P_PREAUTH	0x88C7
 #define ETH_P_TIPC	0x88CA
 #define ETH_P_LLDP	0x88CC
+#define ETH_P_MRP	0x88E3
 #define ETH_P_MACSEC	0x88E5
 #define ETH_P_8021AH	0x88E7
 #define ETH_P_MVRP	0x88F5
-- 
2.28.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-09  9:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09  9:20 [musl] [PATCH 00/16] Updates for linux v5.5, v5.6, v5.7 and v5.8 Szabolcs Nagy

mailing list of musl libc

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/musl

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 musl musl/ http://inbox.vuxu.org/musl \
		musl@inbox.vuxu.org
	public-inbox-index musl

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.musl


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/musl/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git