mailing list of musl libc
 help / color / mirror / code / Atom feed
* [PATCH 0/7] updates for linux v4.8
@ 2016-10-09 16:57 Szabolcs Nagy
  2016-10-09 17:00 ` [PATCH 2/7] add sh syscall numbers from " Szabolcs Nagy
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 16:57 UTC (permalink / raw)
  To: musl

sync with linux v4.8 uapi changes.

the elf and hwcap patches include more than v4.8 sync.

in the tcp and icmp patches we may not want to sync with
kernel type definitions (at least some type definitions
are currently missing from tcp.h) so i'm not sure about
the last two patches.

Szabolcs Nagy (7):
  fix preadv2 and pwritev2 syscall numbers on x32 for linux v4.8
  add sh syscall numbers from linux v4.8
  add ETH_P_NCSI to netinet/if_ether.h from linux v4.8
  elf.h: update EM_ elf machine defines and add R_BPF_ defines
  add bits/hwcap.h and include it in sys/auxv.h
  add TCP_REPAIR_WINDOW to netinet/tcp.h from linux v4.8
  update icmphdr struct following linux v4.8

 arch/aarch64/bits/hwcap.h   |  11 +++++
 arch/arm/bits/hwcap.h       |  29 +++++++++++++
 arch/generic/bits/hwcap.h   |   0
 arch/powerpc/bits/hwcap.h   |  40 +++++++++++++++++
 arch/powerpc64/bits/hwcap.h |  40 +++++++++++++++++
 arch/sh/bits/hwcap.h        |  11 +++++
 arch/sh/bits/syscall.h.in   |  14 ++++++
 arch/x32/bits/syscall.h.in  |   4 +-
 include/elf.h               | 102 +++++++++++++++++++++++++++++++++++++++++++-
 include/netinet/if_ether.h  |   1 +
 include/netinet/ip_icmp.h   |   1 +
 include/netinet/tcp.h       |   9 ++++
 include/sys/auxv.h          |   1 +
 13 files changed, 260 insertions(+), 3 deletions(-)
 create mode 100644 arch/aarch64/bits/hwcap.h
 create mode 100644 arch/arm/bits/hwcap.h
 create mode 100644 arch/generic/bits/hwcap.h
 create mode 100644 arch/powerpc/bits/hwcap.h
 create mode 100644 arch/powerpc64/bits/hwcap.h
 create mode 100644 arch/sh/bits/hwcap.h

-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/7] add sh syscall numbers from linux v4.8
  2016-10-09 16:57 [PATCH 0/7] updates for linux v4.8 Szabolcs Nagy
@ 2016-10-09 17:00 ` Szabolcs Nagy
  2016-10-09 17:00 ` [PATCH 3/7] add ETH_P_NCSI to netinet/if_ether.h " Szabolcs Nagy
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 17:00 UTC (permalink / raw)
  To: musl

sh was updated in linux commit 74bdaa611fa69368fb4032ad437af073d31116bd
to have numbers for new syscalls.
---
 arch/sh/bits/syscall.h.in | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/sh/bits/syscall.h.in b/arch/sh/bits/syscall.h.in
index 595fc4d..420f4a0 100644
--- a/arch/sh/bits/syscall.h.in
+++ b/arch/sh/bits/syscall.h.in
@@ -338,4 +338,18 @@
 #define __NR_process_vm_writev      366
 #define __NR_kcmp                   367
 #define __NR_finit_module           368
+#define __NR_sched_getattr          369
+#define __NR_sched_setattr          370
+#define __NR_renameat2              371
+#define __NR_seccomp                372
+#define __NR_getrandom              373
+#define __NR_memfd_create           374
+#define __NR_bpf                    375
+#define __NR_execveat               376
+#define __NR_userfaultfd            377
+#define __NR_membarrier             378
+#define __NR_mlock2                 379
+#define __NR_copy_file_range        380
+#define __NR_preadv2                381
+#define __NR_pwritev2               382
 
-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/7] add ETH_P_NCSI to netinet/if_ether.h from linux v4.8
  2016-10-09 16:57 [PATCH 0/7] updates for linux v4.8 Szabolcs Nagy
  2016-10-09 17:00 ` [PATCH 2/7] add sh syscall numbers from " Szabolcs Nagy
@ 2016-10-09 17:00 ` Szabolcs Nagy
  2016-10-09 17:01 ` [PATCH 4/7] elf.h: update EM_ elf machine defines and add R_BPF_ defines Szabolcs Nagy
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 17:00 UTC (permalink / raw)
  To: musl

see linux commit 6389eaa7fa9c3ee6c7d39f6087b86660d17236ac
---
 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 4c2322b..05462c4 100644
--- a/include/netinet/if_ether.h
+++ b/include/netinet/if_ether.h
@@ -55,6 +55,7 @@
 #define ETH_P_8021AH	0x88E7
 #define ETH_P_MVRP	0x88F5
 #define ETH_P_1588	0x88F7
+#define ETH_P_NCSI	0x88F8
 #define ETH_P_PRP	0x88FB
 #define ETH_P_FCOE	0x8906
 #define ETH_P_TDLS	0x890D
-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/7] elf.h: update EM_ elf machine defines and add R_BPF_ defines
  2016-10-09 16:57 [PATCH 0/7] updates for linux v4.8 Szabolcs Nagy
  2016-10-09 17:00 ` [PATCH 2/7] add sh syscall numbers from " Szabolcs Nagy
  2016-10-09 17:00 ` [PATCH 3/7] add ETH_P_NCSI to netinet/if_ether.h " Szabolcs Nagy
@ 2016-10-09 17:01 ` Szabolcs Nagy
  2016-10-09 17:01 ` [PATCH 5/7] add bits/hwcap.h and include it in sys/auxv.h Szabolcs Nagy
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 17:01 UTC (permalink / raw)
  To: musl

sync with gabi: http://www.sco.com/developers/gabi/latest/ch4.eheader.html

EM_BPF is new in linux v4.8 and officially assigned:
https://lists.iovisor.org/pipermail/iovisor-dev/2016-June/000266.html
added related relocs too.
---
 include/elf.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 101 insertions(+), 1 deletion(-)

diff --git a/include/elf.h b/include/elf.h
index 0721d63..e79915f 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -212,13 +212,110 @@ typedef struct {
 #define EM_OR1K		92
 #define EM_OPENRISC	92
 #define EM_ARC_A5	93
+#define EM_ARC_COMPACT	93
 #define EM_XTENSA	94
+#define EM_VIDEOCORE	95
+#define EM_TMM_GPP	96
+#define EM_NS32K	97
+#define EM_TPC		98
+#define EM_SNP1K	99
+#define EM_ST200	100
+#define EM_IP2K		101
+#define EM_MAX		102
+#define EM_CR		103
+#define EM_F2MC16	104
+#define EM_MSP430	105
+#define EM_BLACKFIN	106
+#define EM_SE_C33	107
+#define EM_SEP		108
+#define EM_ARCA		109
+#define EM_UNICORE	110
+#define EM_EXCESS	111
+#define EM_DXP		112
 #define EM_ALTERA_NIOS2 113
+#define EM_CRX		114
+#define EM_XGATE	115
+#define EM_C166		116
+#define EM_M16C		117
+#define EM_DSPIC30F	118
+#define EM_CE		119
+#define EM_M32C		120
+#define EM_TSK3000	131
+#define EM_RS08		132
+#define EM_SHARC	133
+#define EM_ECOG2	134
+#define EM_SCORE7	135
+#define EM_DSP24	136
+#define EM_VIDEOCORE3	137
+#define EM_LATTICEMICO32 138
+#define EM_SE_C17	139
+#define EM_TI_C6000	140
+#define EM_TI_C2000	141
+#define EM_TI_C5500	142
+#define EM_TI_ARP32	143
+#define EM_TI_PRU	144
+#define EM_MMDSP_PLUS	160
+#define EM_CYPRESS_M8C	161
+#define EM_R32C		162
+#define EM_TRIMEDIA	163
+#define EM_QDSP6	164
+#define EM_8051		165
+#define EM_STXP7X	166
+#define EM_NDS32	167
+#define EM_ECOG1X	168
+#define EM_MAXQ30	169
+#define EM_XIMO16	170
+#define EM_MANIK	171
+#define EM_CRAYNV2	172
+#define EM_RX		173
+#define EM_METAG	174
+#define EM_MCST_ELBRUS	175
+#define EM_ECOG16	176
+#define EM_CR16		177
+#define EM_ETPU		178
+#define EM_SLE9X	179
+#define EM_L10M		180
+#define EM_K10M		181
 #define EM_AARCH64	183
+#define EM_AVR32	185
+#define EM_STM8		186
+#define EM_TILE64	187
 #define EM_TILEPRO	188
 #define EM_MICROBLAZE	189
+#define EM_CUDA		190
 #define EM_TILEGX	191
-#define EM_NUM		192
+#define EM_CLOUDSHIELD	192
+#define EM_COREA_1ST	193
+#define EM_COREA_2ND	194
+#define EM_ARC_COMPACT2	195
+#define EM_OPEN8	196
+#define EM_RL78		197
+#define EM_VIDEOCORE5	198
+#define EM_78KOR	199
+#define EM_56800EX	200
+#define EM_BA1		201
+#define EM_BA2		202
+#define EM_XCORE	203
+#define EM_MCHP_PIC	204
+#define EM_KM32		210
+#define EM_KMX32	211
+#define EM_EMX16	212
+#define EM_EMX8		213
+#define EM_KVARC	214
+#define EM_CDP		215
+#define EM_COGE		216
+#define EM_COOL		217
+#define EM_NORC		218
+#define EM_CSR_KALIMBA	219
+#define EM_Z80		220
+#define EM_VISIUM	221
+#define EM_FT32		222
+#define EM_MOXIE	223
+#define EM_AMDGPU	224
+#define EM_RISCV	243
+#define EM_BPF		247
+#define EM_NUM		248
+
 #define EM_ALPHA	0x9026
 
 #define EV_NONE		0
@@ -3013,6 +3110,9 @@ enum
 #define R_OR1K_TLS_DTPOFF	33
 #define R_OR1K_TLS_DTPMOD	34
 
+#define R_BPF_NONE		0
+#define R_BPF_MAP_FD		1
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 5/7] add bits/hwcap.h and include it in sys/auxv.h
  2016-10-09 16:57 [PATCH 0/7] updates for linux v4.8 Szabolcs Nagy
                   ` (2 preceding siblings ...)
  2016-10-09 17:01 ` [PATCH 4/7] elf.h: update EM_ elf machine defines and add R_BPF_ defines Szabolcs Nagy
@ 2016-10-09 17:01 ` Szabolcs Nagy
  2016-10-09 17:24   ` Hauke Mehrtens
  2016-10-09 17:02 ` [PATCH 6/7] add TCP_REPAIR_WINDOW to netinet/tcp.h from linux v4.8 Szabolcs Nagy
  2016-10-09 17:02 ` [PATCH 7/7] update icmphdr struct following " Szabolcs Nagy
  5 siblings, 1 reply; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 17:01 UTC (permalink / raw)
  To: musl

aarch64, arm, powerpc, powerpc64 and sh have cpu feature bits defined
in linux for AT_HWCAP auxv entry, so expose those in sys/auxv.h
---
 arch/aarch64/bits/hwcap.h   | 11 +++++++++++
 arch/arm/bits/hwcap.h       | 29 +++++++++++++++++++++++++++++
 arch/generic/bits/hwcap.h   |  0
 arch/powerpc/bits/hwcap.h   | 40 ++++++++++++++++++++++++++++++++++++++++
 arch/powerpc64/bits/hwcap.h | 40 ++++++++++++++++++++++++++++++++++++++++
 arch/sh/bits/hwcap.h        | 11 +++++++++++
 include/sys/auxv.h          |  1 +
 7 files changed, 132 insertions(+)
 create mode 100644 arch/aarch64/bits/hwcap.h
 create mode 100644 arch/arm/bits/hwcap.h
 create mode 100644 arch/generic/bits/hwcap.h
 create mode 100644 arch/powerpc/bits/hwcap.h
 create mode 100644 arch/powerpc64/bits/hwcap.h
 create mode 100644 arch/sh/bits/hwcap.h

diff --git a/arch/aarch64/bits/hwcap.h b/arch/aarch64/bits/hwcap.h
new file mode 100644
index 0000000..2b923f7
--- /dev/null
+++ b/arch/aarch64/bits/hwcap.h
@@ -0,0 +1,11 @@
+#define HWCAP_FP		(1 << 0)
+#define HWCAP_ASIMD		(1 << 1)
+#define HWCAP_EVTSTRM		(1 << 2)
+#define HWCAP_AES		(1 << 3)
+#define HWCAP_PMULL		(1 << 4)
+#define HWCAP_SHA1		(1 << 5)
+#define HWCAP_SHA2		(1 << 6)
+#define HWCAP_CRC32		(1 << 7)
+#define HWCAP_ATOMICS		(1 << 8)
+#define HWCAP_FPHP		(1 << 9)
+#define HWCAP_ASIMDHP		(1 << 10)
diff --git a/arch/arm/bits/hwcap.h b/arch/arm/bits/hwcap.h
new file mode 100644
index 0000000..ac4edea
--- /dev/null
+++ b/arch/arm/bits/hwcap.h
@@ -0,0 +1,29 @@
+#define HWCAP_SWP	(1 << 0)
+#define HWCAP_HALF	(1 << 1)
+#define HWCAP_THUMB	(1 << 2)
+#define HWCAP_26BIT	(1 << 3)
+#define HWCAP_FAST_MULT	(1 << 4)
+#define HWCAP_FPA	(1 << 5)
+#define HWCAP_VFP	(1 << 6)
+#define HWCAP_EDSP	(1 << 7)
+#define HWCAP_JAVA	(1 << 8)
+#define HWCAP_IWMMXT	(1 << 9)
+#define HWCAP_CRUNCH	(1 << 10)
+#define HWCAP_THUMBEE	(1 << 11)
+#define HWCAP_NEON	(1 << 12)
+#define HWCAP_VFPv3	(1 << 13)
+#define HWCAP_VFPv3D16	(1 << 14)
+#define HWCAP_TLS	(1 << 15)
+#define HWCAP_VFPv4	(1 << 16)
+#define HWCAP_IDIVA	(1 << 17)
+#define HWCAP_IDIVT	(1 << 18)
+#define HWCAP_VFPD32	(1 << 19)
+#define HWCAP_IDIV	(HWCAP_IDIVA | HWCAP_IDIVT)
+#define HWCAP_LPAE	(1 << 20)
+#define HWCAP_EVTSTRM	(1 << 21)
+
+#define HWCAP2_AES	(1 << 0)
+#define HWCAP2_PMULL	(1 << 1)
+#define HWCAP2_SHA1	(1 << 2)
+#define HWCAP2_SHA2	(1 << 3)
+#define HWCAP2_CRC32	(1 << 4)
diff --git a/arch/generic/bits/hwcap.h b/arch/generic/bits/hwcap.h
new file mode 100644
index 0000000..e69de29
diff --git a/arch/powerpc/bits/hwcap.h b/arch/powerpc/bits/hwcap.h
new file mode 100644
index 0000000..82c92a9
--- /dev/null
+++ b/arch/powerpc/bits/hwcap.h
@@ -0,0 +1,40 @@
+#define PPC_FEATURE_32			0x80000000
+#define PPC_FEATURE_64			0x40000000
+#define PPC_FEATURE_601_INSTR		0x20000000
+#define PPC_FEATURE_HAS_ALTIVEC		0x10000000
+#define PPC_FEATURE_HAS_FPU		0x08000000
+#define PPC_FEATURE_HAS_MMU		0x04000000
+#define PPC_FEATURE_HAS_4xxMAC		0x02000000
+#define PPC_FEATURE_UNIFIED_CACHE	0x01000000
+#define PPC_FEATURE_HAS_SPE		0x00800000
+#define PPC_FEATURE_HAS_EFP_SINGLE	0x00400000
+#define PPC_FEATURE_HAS_EFP_DOUBLE	0x00200000
+#define PPC_FEATURE_NO_TB		0x00100000
+#define PPC_FEATURE_POWER4		0x00080000
+#define PPC_FEATURE_POWER5		0x00040000
+#define PPC_FEATURE_POWER5_PLUS		0x00020000
+#define PPC_FEATURE_CELL		0x00010000
+#define PPC_FEATURE_BOOKE		0x00008000
+#define PPC_FEATURE_SMT			0x00004000
+#define PPC_FEATURE_ICACHE_SNOOP	0x00002000
+#define PPC_FEATURE_ARCH_2_05		0x00001000
+#define PPC_FEATURE_PA6T		0x00000800
+#define PPC_FEATURE_HAS_DFP		0x00000400
+#define PPC_FEATURE_POWER6_EXT		0x00000200
+#define PPC_FEATURE_ARCH_2_06		0x00000100
+#define PPC_FEATURE_HAS_VSX		0x00000080
+#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
+
+#define PPC_FEATURE_TRUE_LE		0x00000002
+#define PPC_FEATURE_PPC_LE		0x00000001
+
+#define PPC_FEATURE2_ARCH_2_07		0x80000000
+#define PPC_FEATURE2_HTM		0x40000000
+#define PPC_FEATURE2_DSCR		0x20000000
+#define PPC_FEATURE2_EBB		0x10000000
+#define PPC_FEATURE2_ISEL		0x08000000
+#define PPC_FEATURE2_TAR		0x04000000
+#define PPC_FEATURE2_VEC_CRYPTO		0x02000000
+#define PPC_FEATURE2_HTM_NOSC		0x01000000
+#define PPC_FEATURE2_ARCH_3_00		0x00800000
+#define PPC_FEATURE2_HAS_IEEE128	0x00400000
diff --git a/arch/powerpc64/bits/hwcap.h b/arch/powerpc64/bits/hwcap.h
new file mode 100644
index 0000000..82c92a9
--- /dev/null
+++ b/arch/powerpc64/bits/hwcap.h
@@ -0,0 +1,40 @@
+#define PPC_FEATURE_32			0x80000000
+#define PPC_FEATURE_64			0x40000000
+#define PPC_FEATURE_601_INSTR		0x20000000
+#define PPC_FEATURE_HAS_ALTIVEC		0x10000000
+#define PPC_FEATURE_HAS_FPU		0x08000000
+#define PPC_FEATURE_HAS_MMU		0x04000000
+#define PPC_FEATURE_HAS_4xxMAC		0x02000000
+#define PPC_FEATURE_UNIFIED_CACHE	0x01000000
+#define PPC_FEATURE_HAS_SPE		0x00800000
+#define PPC_FEATURE_HAS_EFP_SINGLE	0x00400000
+#define PPC_FEATURE_HAS_EFP_DOUBLE	0x00200000
+#define PPC_FEATURE_NO_TB		0x00100000
+#define PPC_FEATURE_POWER4		0x00080000
+#define PPC_FEATURE_POWER5		0x00040000
+#define PPC_FEATURE_POWER5_PLUS		0x00020000
+#define PPC_FEATURE_CELL		0x00010000
+#define PPC_FEATURE_BOOKE		0x00008000
+#define PPC_FEATURE_SMT			0x00004000
+#define PPC_FEATURE_ICACHE_SNOOP	0x00002000
+#define PPC_FEATURE_ARCH_2_05		0x00001000
+#define PPC_FEATURE_PA6T		0x00000800
+#define PPC_FEATURE_HAS_DFP		0x00000400
+#define PPC_FEATURE_POWER6_EXT		0x00000200
+#define PPC_FEATURE_ARCH_2_06		0x00000100
+#define PPC_FEATURE_HAS_VSX		0x00000080
+#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
+
+#define PPC_FEATURE_TRUE_LE		0x00000002
+#define PPC_FEATURE_PPC_LE		0x00000001
+
+#define PPC_FEATURE2_ARCH_2_07		0x80000000
+#define PPC_FEATURE2_HTM		0x40000000
+#define PPC_FEATURE2_DSCR		0x20000000
+#define PPC_FEATURE2_EBB		0x10000000
+#define PPC_FEATURE2_ISEL		0x08000000
+#define PPC_FEATURE2_TAR		0x04000000
+#define PPC_FEATURE2_VEC_CRYPTO		0x02000000
+#define PPC_FEATURE2_HTM_NOSC		0x01000000
+#define PPC_FEATURE2_ARCH_3_00		0x00800000
+#define PPC_FEATURE2_HAS_IEEE128	0x00400000
diff --git a/arch/sh/bits/hwcap.h b/arch/sh/bits/hwcap.h
new file mode 100644
index 0000000..f85121d
--- /dev/null
+++ b/arch/sh/bits/hwcap.h
@@ -0,0 +1,11 @@
+#define CPU_HAS_FPU		0x0001
+#define CPU_HAS_P2_FLUSH_BUG	0x0002
+#define CPU_HAS_MMU_PAGE_ASSOC	0x0004
+#define CPU_HAS_DSP		0x0008
+#define CPU_HAS_PERF_COUNTER	0x0010
+#define CPU_HAS_PTEA		0x0020
+#define CPU_HAS_LLSC		0x0040
+#define CPU_HAS_L2_CACHE	0x0080
+#define CPU_HAS_OP32		0x0100
+#define CPU_HAS_PTEAEX		0x0200
+#define CPU_HAS_CAS_L		0x0400
diff --git a/include/sys/auxv.h b/include/sys/auxv.h
index 6dcf9ad..ddccf57 100644
--- a/include/sys/auxv.h
+++ b/include/sys/auxv.h
@@ -6,6 +6,7 @@ extern "C" {
 #endif
 
 #include <elf.h>
+#include <bits/hwcap.h>
 
 unsigned long getauxval(unsigned long);
 
-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 6/7] add TCP_REPAIR_WINDOW to netinet/tcp.h from linux v4.8
  2016-10-09 16:57 [PATCH 0/7] updates for linux v4.8 Szabolcs Nagy
                   ` (3 preceding siblings ...)
  2016-10-09 17:01 ` [PATCH 5/7] add bits/hwcap.h and include it in sys/auxv.h Szabolcs Nagy
@ 2016-10-09 17:02 ` Szabolcs Nagy
  2016-10-09 17:02 ` [PATCH 7/7] update icmphdr struct following " Szabolcs Nagy
  5 siblings, 0 replies; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 17:02 UTC (permalink / raw)
  To: musl

another kernel internal state exposure for checkpoint-restore.
see linux commit b1ed4c4fa9a5ccf325184fd90edc50978ef6e33a
---
 include/netinet/tcp.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index 9ea64c4..b9b8a7f 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -30,6 +30,7 @@
 #define TCP_CC_INFO      26
 #define TCP_SAVE_SYN     27
 #define TCP_SAVED_SYN    28
+#define TCP_REPAIR_WINDOW 29
 
 #define TCP_ESTABLISHED  1
 #define TCP_SYN_SENT     2
@@ -199,6 +200,14 @@ struct tcp_md5sig {
 	uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
 };
 
+struct tcp_repair_window {
+	uint32_t snd_wl1;
+	uint32_t snd_wnd;
+	uint32_t max_window;
+	uint32_t rcv_wnd;
+	uint32_t rcv_wup;
+};
+
 #endif
 
 #endif
-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 7/7] update icmphdr struct following linux v4.8
  2016-10-09 16:57 [PATCH 0/7] updates for linux v4.8 Szabolcs Nagy
                   ` (4 preceding siblings ...)
  2016-10-09 17:02 ` [PATCH 6/7] add TCP_REPAIR_WINDOW to netinet/tcp.h from linux v4.8 Szabolcs Nagy
@ 2016-10-09 17:02 ` Szabolcs Nagy
  5 siblings, 0 replies; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 17:02 UTC (permalink / raw)
  To: musl

add union field that is used in the kernel for SIT/GRE tunneling ICMPv4
messages. see linux commit 20e1954fe238dbe5f8d3a979e593fe352bd703cf
---
 include/netinet/ip_icmp.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/netinet/ip_icmp.h b/include/netinet/ip_icmp.h
index 2f4a86d..b9e0df8 100644
--- a/include/netinet/ip_icmp.h
+++ b/include/netinet/ip_icmp.h
@@ -23,6 +23,7 @@ struct icmphdr {
 			uint16_t __unused;
 			uint16_t mtu;
 		} frag;
+		uint8_t reserved[4];
 	} un;
 };
 
-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/7] add bits/hwcap.h and include it in sys/auxv.h
  2016-10-09 17:01 ` [PATCH 5/7] add bits/hwcap.h and include it in sys/auxv.h Szabolcs Nagy
@ 2016-10-09 17:24   ` Hauke Mehrtens
  2016-10-09 18:32     ` Szabolcs Nagy
  0 siblings, 1 reply; 10+ messages in thread
From: Hauke Mehrtens @ 2016-10-09 17:24 UTC (permalink / raw)
  To: musl

On 10/09/2016 07:01 PM, Szabolcs Nagy wrote:
> aarch64, arm, powerpc, powerpc64 and sh have cpu feature bits defined
> in linux for AT_HWCAP auxv entry, so expose those in sys/auxv.h
> ---
>  arch/aarch64/bits/hwcap.h   | 11 +++++++++++
>  arch/arm/bits/hwcap.h       | 29 +++++++++++++++++++++++++++++
>  arch/generic/bits/hwcap.h   |  0
>  arch/powerpc/bits/hwcap.h   | 40 ++++++++++++++++++++++++++++++++++++++++
>  arch/powerpc64/bits/hwcap.h | 40 ++++++++++++++++++++++++++++++++++++++++
>  arch/sh/bits/hwcap.h        | 11 +++++++++++
>  include/sys/auxv.h          |  1 +
>  7 files changed, 132 insertions(+)
>  create mode 100644 arch/aarch64/bits/hwcap.h
>  create mode 100644 arch/arm/bits/hwcap.h
>  create mode 100644 arch/generic/bits/hwcap.h
>  create mode 100644 arch/powerpc/bits/hwcap.h
>  create mode 100644 arch/powerpc64/bits/hwcap.h
>  create mode 100644 arch/sh/bits/hwcap.h
> 

Hi,

shouldn't this also be added for MIPS? This commit added a file called
hwcap.h:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e14f1db7a61f016d74393ca9e8fc49a91d27f603


Hauke



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 5/7] add bits/hwcap.h and include it in sys/auxv.h
  2016-10-09 17:24   ` Hauke Mehrtens
@ 2016-10-09 18:32     ` Szabolcs Nagy
  2016-10-09 18:42       ` [PATCH with-mips] " Szabolcs Nagy
  0 siblings, 1 reply; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 18:32 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: musl

* Hauke Mehrtens <hauke@hauke-m.de> [2016-10-09 19:24:13 +0200]:
> On 10/09/2016 07:01 PM, Szabolcs Nagy wrote:
> > aarch64, arm, powerpc, powerpc64 and sh have cpu feature bits defined
> > in linux for AT_HWCAP auxv entry, so expose those in sys/auxv.h
> > ---
> >  arch/aarch64/bits/hwcap.h   | 11 +++++++++++
> >  arch/arm/bits/hwcap.h       | 29 +++++++++++++++++++++++++++++
> >  arch/generic/bits/hwcap.h   |  0
> >  arch/powerpc/bits/hwcap.h   | 40 ++++++++++++++++++++++++++++++++++++++++
> >  arch/powerpc64/bits/hwcap.h | 40 ++++++++++++++++++++++++++++++++++++++++
> >  arch/sh/bits/hwcap.h        | 11 +++++++++++
> >  include/sys/auxv.h          |  1 +
> >  7 files changed, 132 insertions(+)
> >  create mode 100644 arch/aarch64/bits/hwcap.h
> >  create mode 100644 arch/arm/bits/hwcap.h
> >  create mode 100644 arch/generic/bits/hwcap.h
> >  create mode 100644 arch/powerpc/bits/hwcap.h
> >  create mode 100644 arch/powerpc64/bits/hwcap.h
> >  create mode 100644 arch/sh/bits/hwcap.h
> > 
> 
> Hi,
> 
> shouldn't this also be added for MIPS? This commit added a file called
> hwcap.h:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e14f1db7a61f016d74393ca9e8fc49a91d27f603
> 

that commit seems to failed to add it to Kbuild
so it is never installed (i checked installed
uapi headers only because looking at the kernel
source tricked me previously)

but i guess the intention is clear in this case
so we can add it..


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH with-mips] add bits/hwcap.h and include it in sys/auxv.h
  2016-10-09 18:32     ` Szabolcs Nagy
@ 2016-10-09 18:42       ` Szabolcs Nagy
  0 siblings, 0 replies; 10+ messages in thread
From: Szabolcs Nagy @ 2016-10-09 18:42 UTC (permalink / raw)
  To: musl; +Cc: Hauke Mehrtens

aarch64, arm, mips, mips64, mipsn32, powerpc, powerpc64 and sh have
cpu feature bits defined in linux for AT_HWCAP auxv entry, so expose
those in sys/auxv.h

it seems the mips hwcaps were never exposed to userspace neither
by linux nor by glibc, but that's most likely an oversight.
---
 arch/aarch64/bits/hwcap.h   | 11 +++++++++++
 arch/arm/bits/hwcap.h       | 29 +++++++++++++++++++++++++++++
 arch/generic/bits/hwcap.h   |  0
 arch/mips/bits/hwcap.h      |  2 ++
 arch/mips64/bits/hwcap.h    |  2 ++
 arch/mipsn32/bits/hwcap.h   |  2 ++
 arch/powerpc/bits/hwcap.h   | 40 ++++++++++++++++++++++++++++++++++++++++
 arch/powerpc64/bits/hwcap.h | 40 ++++++++++++++++++++++++++++++++++++++++
 arch/sh/bits/hwcap.h        | 11 +++++++++++
 include/sys/auxv.h          |  1 +
 10 files changed, 138 insertions(+)
 create mode 100644 arch/aarch64/bits/hwcap.h
 create mode 100644 arch/arm/bits/hwcap.h
 create mode 100644 arch/generic/bits/hwcap.h
 create mode 100644 arch/mips/bits/hwcap.h
 create mode 100644 arch/mips64/bits/hwcap.h
 create mode 100644 arch/mipsn32/bits/hwcap.h
 create mode 100644 arch/powerpc/bits/hwcap.h
 create mode 100644 arch/powerpc64/bits/hwcap.h
 create mode 100644 arch/sh/bits/hwcap.h

diff --git a/arch/aarch64/bits/hwcap.h b/arch/aarch64/bits/hwcap.h
new file mode 100644
index 0000000..2b923f7
--- /dev/null
+++ b/arch/aarch64/bits/hwcap.h
@@ -0,0 +1,11 @@
+#define HWCAP_FP		(1 << 0)
+#define HWCAP_ASIMD		(1 << 1)
+#define HWCAP_EVTSTRM		(1 << 2)
+#define HWCAP_AES		(1 << 3)
+#define HWCAP_PMULL		(1 << 4)
+#define HWCAP_SHA1		(1 << 5)
+#define HWCAP_SHA2		(1 << 6)
+#define HWCAP_CRC32		(1 << 7)
+#define HWCAP_ATOMICS		(1 << 8)
+#define HWCAP_FPHP		(1 << 9)
+#define HWCAP_ASIMDHP		(1 << 10)
diff --git a/arch/arm/bits/hwcap.h b/arch/arm/bits/hwcap.h
new file mode 100644
index 0000000..ac4edea
--- /dev/null
+++ b/arch/arm/bits/hwcap.h
@@ -0,0 +1,29 @@
+#define HWCAP_SWP	(1 << 0)
+#define HWCAP_HALF	(1 << 1)
+#define HWCAP_THUMB	(1 << 2)
+#define HWCAP_26BIT	(1 << 3)
+#define HWCAP_FAST_MULT	(1 << 4)
+#define HWCAP_FPA	(1 << 5)
+#define HWCAP_VFP	(1 << 6)
+#define HWCAP_EDSP	(1 << 7)
+#define HWCAP_JAVA	(1 << 8)
+#define HWCAP_IWMMXT	(1 << 9)
+#define HWCAP_CRUNCH	(1 << 10)
+#define HWCAP_THUMBEE	(1 << 11)
+#define HWCAP_NEON	(1 << 12)
+#define HWCAP_VFPv3	(1 << 13)
+#define HWCAP_VFPv3D16	(1 << 14)
+#define HWCAP_TLS	(1 << 15)
+#define HWCAP_VFPv4	(1 << 16)
+#define HWCAP_IDIVA	(1 << 17)
+#define HWCAP_IDIVT	(1 << 18)
+#define HWCAP_VFPD32	(1 << 19)
+#define HWCAP_IDIV	(HWCAP_IDIVA | HWCAP_IDIVT)
+#define HWCAP_LPAE	(1 << 20)
+#define HWCAP_EVTSTRM	(1 << 21)
+
+#define HWCAP2_AES	(1 << 0)
+#define HWCAP2_PMULL	(1 << 1)
+#define HWCAP2_SHA1	(1 << 2)
+#define HWCAP2_SHA2	(1 << 3)
+#define HWCAP2_CRC32	(1 << 4)
diff --git a/arch/generic/bits/hwcap.h b/arch/generic/bits/hwcap.h
new file mode 100644
index 0000000..e69de29
diff --git a/arch/mips/bits/hwcap.h b/arch/mips/bits/hwcap.h
new file mode 100644
index 0000000..05cffba
--- /dev/null
+++ b/arch/mips/bits/hwcap.h
@@ -0,0 +1,2 @@
+#define HWCAP_MIPS_R6		(1 << 0)
+#define HWCAP_MIPS_MSA		(1 << 1)
diff --git a/arch/mips64/bits/hwcap.h b/arch/mips64/bits/hwcap.h
new file mode 100644
index 0000000..05cffba
--- /dev/null
+++ b/arch/mips64/bits/hwcap.h
@@ -0,0 +1,2 @@
+#define HWCAP_MIPS_R6		(1 << 0)
+#define HWCAP_MIPS_MSA		(1 << 1)
diff --git a/arch/mipsn32/bits/hwcap.h b/arch/mipsn32/bits/hwcap.h
new file mode 100644
index 0000000..05cffba
--- /dev/null
+++ b/arch/mipsn32/bits/hwcap.h
@@ -0,0 +1,2 @@
+#define HWCAP_MIPS_R6		(1 << 0)
+#define HWCAP_MIPS_MSA		(1 << 1)
diff --git a/arch/powerpc/bits/hwcap.h b/arch/powerpc/bits/hwcap.h
new file mode 100644
index 0000000..82c92a9
--- /dev/null
+++ b/arch/powerpc/bits/hwcap.h
@@ -0,0 +1,40 @@
+#define PPC_FEATURE_32			0x80000000
+#define PPC_FEATURE_64			0x40000000
+#define PPC_FEATURE_601_INSTR		0x20000000
+#define PPC_FEATURE_HAS_ALTIVEC		0x10000000
+#define PPC_FEATURE_HAS_FPU		0x08000000
+#define PPC_FEATURE_HAS_MMU		0x04000000
+#define PPC_FEATURE_HAS_4xxMAC		0x02000000
+#define PPC_FEATURE_UNIFIED_CACHE	0x01000000
+#define PPC_FEATURE_HAS_SPE		0x00800000
+#define PPC_FEATURE_HAS_EFP_SINGLE	0x00400000
+#define PPC_FEATURE_HAS_EFP_DOUBLE	0x00200000
+#define PPC_FEATURE_NO_TB		0x00100000
+#define PPC_FEATURE_POWER4		0x00080000
+#define PPC_FEATURE_POWER5		0x00040000
+#define PPC_FEATURE_POWER5_PLUS		0x00020000
+#define PPC_FEATURE_CELL		0x00010000
+#define PPC_FEATURE_BOOKE		0x00008000
+#define PPC_FEATURE_SMT			0x00004000
+#define PPC_FEATURE_ICACHE_SNOOP	0x00002000
+#define PPC_FEATURE_ARCH_2_05		0x00001000
+#define PPC_FEATURE_PA6T		0x00000800
+#define PPC_FEATURE_HAS_DFP		0x00000400
+#define PPC_FEATURE_POWER6_EXT		0x00000200
+#define PPC_FEATURE_ARCH_2_06		0x00000100
+#define PPC_FEATURE_HAS_VSX		0x00000080
+#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
+
+#define PPC_FEATURE_TRUE_LE		0x00000002
+#define PPC_FEATURE_PPC_LE		0x00000001
+
+#define PPC_FEATURE2_ARCH_2_07		0x80000000
+#define PPC_FEATURE2_HTM		0x40000000
+#define PPC_FEATURE2_DSCR		0x20000000
+#define PPC_FEATURE2_EBB		0x10000000
+#define PPC_FEATURE2_ISEL		0x08000000
+#define PPC_FEATURE2_TAR		0x04000000
+#define PPC_FEATURE2_VEC_CRYPTO		0x02000000
+#define PPC_FEATURE2_HTM_NOSC		0x01000000
+#define PPC_FEATURE2_ARCH_3_00		0x00800000
+#define PPC_FEATURE2_HAS_IEEE128	0x00400000
diff --git a/arch/powerpc64/bits/hwcap.h b/arch/powerpc64/bits/hwcap.h
new file mode 100644
index 0000000..82c92a9
--- /dev/null
+++ b/arch/powerpc64/bits/hwcap.h
@@ -0,0 +1,40 @@
+#define PPC_FEATURE_32			0x80000000
+#define PPC_FEATURE_64			0x40000000
+#define PPC_FEATURE_601_INSTR		0x20000000
+#define PPC_FEATURE_HAS_ALTIVEC		0x10000000
+#define PPC_FEATURE_HAS_FPU		0x08000000
+#define PPC_FEATURE_HAS_MMU		0x04000000
+#define PPC_FEATURE_HAS_4xxMAC		0x02000000
+#define PPC_FEATURE_UNIFIED_CACHE	0x01000000
+#define PPC_FEATURE_HAS_SPE		0x00800000
+#define PPC_FEATURE_HAS_EFP_SINGLE	0x00400000
+#define PPC_FEATURE_HAS_EFP_DOUBLE	0x00200000
+#define PPC_FEATURE_NO_TB		0x00100000
+#define PPC_FEATURE_POWER4		0x00080000
+#define PPC_FEATURE_POWER5		0x00040000
+#define PPC_FEATURE_POWER5_PLUS		0x00020000
+#define PPC_FEATURE_CELL		0x00010000
+#define PPC_FEATURE_BOOKE		0x00008000
+#define PPC_FEATURE_SMT			0x00004000
+#define PPC_FEATURE_ICACHE_SNOOP	0x00002000
+#define PPC_FEATURE_ARCH_2_05		0x00001000
+#define PPC_FEATURE_PA6T		0x00000800
+#define PPC_FEATURE_HAS_DFP		0x00000400
+#define PPC_FEATURE_POWER6_EXT		0x00000200
+#define PPC_FEATURE_ARCH_2_06		0x00000100
+#define PPC_FEATURE_HAS_VSX		0x00000080
+#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
+
+#define PPC_FEATURE_TRUE_LE		0x00000002
+#define PPC_FEATURE_PPC_LE		0x00000001
+
+#define PPC_FEATURE2_ARCH_2_07		0x80000000
+#define PPC_FEATURE2_HTM		0x40000000
+#define PPC_FEATURE2_DSCR		0x20000000
+#define PPC_FEATURE2_EBB		0x10000000
+#define PPC_FEATURE2_ISEL		0x08000000
+#define PPC_FEATURE2_TAR		0x04000000
+#define PPC_FEATURE2_VEC_CRYPTO		0x02000000
+#define PPC_FEATURE2_HTM_NOSC		0x01000000
+#define PPC_FEATURE2_ARCH_3_00		0x00800000
+#define PPC_FEATURE2_HAS_IEEE128	0x00400000
diff --git a/arch/sh/bits/hwcap.h b/arch/sh/bits/hwcap.h
new file mode 100644
index 0000000..f85121d
--- /dev/null
+++ b/arch/sh/bits/hwcap.h
@@ -0,0 +1,11 @@
+#define CPU_HAS_FPU		0x0001
+#define CPU_HAS_P2_FLUSH_BUG	0x0002
+#define CPU_HAS_MMU_PAGE_ASSOC	0x0004
+#define CPU_HAS_DSP		0x0008
+#define CPU_HAS_PERF_COUNTER	0x0010
+#define CPU_HAS_PTEA		0x0020
+#define CPU_HAS_LLSC		0x0040
+#define CPU_HAS_L2_CACHE	0x0080
+#define CPU_HAS_OP32		0x0100
+#define CPU_HAS_PTEAEX		0x0200
+#define CPU_HAS_CAS_L		0x0400
diff --git a/include/sys/auxv.h b/include/sys/auxv.h
index 6dcf9ad..ddccf57 100644
--- a/include/sys/auxv.h
+++ b/include/sys/auxv.h
@@ -6,6 +6,7 @@ extern "C" {
 #endif
 
 #include <elf.h>
+#include <bits/hwcap.h>
 
 unsigned long getauxval(unsigned long);
 
-- 
2.10.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-10-09 18:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-09 16:57 [PATCH 0/7] updates for linux v4.8 Szabolcs Nagy
2016-10-09 17:00 ` [PATCH 2/7] add sh syscall numbers from " Szabolcs Nagy
2016-10-09 17:00 ` [PATCH 3/7] add ETH_P_NCSI to netinet/if_ether.h " Szabolcs Nagy
2016-10-09 17:01 ` [PATCH 4/7] elf.h: update EM_ elf machine defines and add R_BPF_ defines Szabolcs Nagy
2016-10-09 17:01 ` [PATCH 5/7] add bits/hwcap.h and include it in sys/auxv.h Szabolcs Nagy
2016-10-09 17:24   ` Hauke Mehrtens
2016-10-09 18:32     ` Szabolcs Nagy
2016-10-09 18:42       ` [PATCH with-mips] " Szabolcs Nagy
2016-10-09 17:02 ` [PATCH 6/7] add TCP_REPAIR_WINDOW to netinet/tcp.h from linux v4.8 Szabolcs Nagy
2016-10-09 17:02 ` [PATCH 7/7] update icmphdr struct following " 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).