Bump ABI to 6

This commit is contained in:
Ben Hutchings 2019-08-19 03:17:31 +01:00
parent 795d93f1ed
commit f79aedcfab
49 changed files with 2 additions and 691709 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1
debian/changelog vendored
View File

@ -2179,6 +2179,7 @@ linux (4.19.67-1) UNRELEASED; urgency=medium
+ futex: Make the futex_hash_bucket lock raw
+ futex: Delay deallocation of pi_state
- mm/zswap: Do not disable preemption in zswap_frontswap_store()
* Bump ABI to 6
-- Salvatore Bonaccorso <carnil@debian.org> Sun, 23 Jun 2019 16:15:17 +0200

View File

@ -1,5 +1,5 @@
[abi]
abiname: 5
abiname: 6
ignore-changes:
__cpuhp_*
__xive_vm_h_*

View File

@ -1,75 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 08 Aug 2019 02:59:40 +0100
Subject: inet: Avoid ABI change for IP ID hash change
Forwarded: not-needed
"inet: switch IP ID generator to siphash" adds a new member to struct
netns_ipv4. Since this is embedded in struct net, it changes the
offsets of all the following members. However struct net itself is
not embedded in anything, and is always allocated by built-in code.
So move the new member to the end of struct net, and hide it from
genksyms.
Also hide the added element and member from modules, as they won't be
able to rely on their being present until we bump ABI.
---
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -163,6 +163,7 @@ struct net {
atomic_t fnhe_genid;
#if !defined(__GENKSYMS__) && !defined(MODULE)
int ipv4_sysctl_tcp_min_snd_mss;
+ siphash_key_t ipv4_ip_id_key;
#endif
} __randomize_layout;
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -216,6 +216,6 @@ struct netns_ipv4 {
unsigned int ipmr_seq; /* protected by rtnl_mutex */
atomic_t rt_genid;
- siphash_key_t ip_id_key;
+ /* siphash_key_t ip_id_key; - bwh: moved to end of struct net */
};
#endif
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -503,14 +503,14 @@ void __ip_select_ident(struct net *net,
u32 hash, id;
/* Note the following code is not safe, but this is okay. */
- if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key)))
- get_random_bytes(&net->ipv4.ip_id_key,
- sizeof(net->ipv4.ip_id_key));
+ if (unlikely(siphash_key_is_zero(&net->ipv4_ip_id_key)))
+ get_random_bytes(&net->ipv4_ip_id_key,
+ sizeof(net->ipv4_ip_id_key));
hash = siphash_3u32((__force u32)iph->daddr,
(__force u32)iph->saddr,
iph->protocol,
- &net->ipv4.ip_id_key);
+ &net->ipv4_ip_id_key);
id = ip_idents_reserve(hash, segs);
iph->id = htons(id);
}
--- a/net/ipv6/output_core.c
+++ b/net/ipv6/output_core.c
@@ -24,11 +24,11 @@ static u32 __ipv6_select_ident(struct ne
u32 hash, id;
/* Note the following code is not safe, but this is okay. */
- if (unlikely(siphash_key_is_zero(&net->ipv4.ip_id_key)))
- get_random_bytes(&net->ipv4.ip_id_key,
- sizeof(net->ipv4.ip_id_key));
+ if (unlikely(siphash_key_is_zero(&net->ipv4_ip_id_key)))
+ get_random_bytes(&net->ipv4_ip_id_key,
+ sizeof(net->ipv4_ip_id_key));
- hash = siphash(&combined, sizeof(combined), &net->ipv4.ip_id_key);
+ hash = siphash(&combined, sizeof(combined), &net->ipv4_ip_id_key);
/* Treat id of 0 as unset and if we get 0 back from ip_idents_reserve,
* set the hight order instead thus minimizing possible future

View File

@ -1,138 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 08 Aug 2019 02:42:32 +0100
Subject: Revert "x86/cpufeatures: Combine word 11 and 12 into a new scattered features word"
Forwarded: not-needed
Renumbering CPU feature bits is a kABI change (even if genksyms
doesn't notice it). And we actually had just enough spare bits in the
existing scattered features words.
---
--- a/arch/x86/include/asm/cpufeature.h
+++ b/arch/x86/include/asm/cpufeature.h
@@ -22,8 +22,8 @@ enum cpuid_leafs
CPUID_LNX_3,
CPUID_7_0_EBX,
CPUID_D_1_EAX,
- CPUID_LNX_4,
- CPUID_DUMMY,
+ CPUID_F_0_EDX,
+ CPUID_F_1_EDX,
CPUID_8000_0008_EBX,
CPUID_6_EAX,
CPUID_8000_000A_EDX,
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -271,16 +271,13 @@
#define X86_FEATURE_XGETBV1 (10*32+ 2) /* XGETBV with ECX = 1 instruction */
#define X86_FEATURE_XSAVES (10*32+ 3) /* XSAVES/XRSTORS instructions */
-/*
- * Extended auxiliary flags: Linux defined - for features scattered in various
- * CPUID levels like 0xf, etc.
- *
- * Reuse free bits when adding new feature flags!
- */
-#define X86_FEATURE_CQM_LLC (11*32+ 0) /* LLC QoS if 1 */
-#define X86_FEATURE_CQM_OCCUP_LLC (11*32+ 1) /* LLC occupancy monitoring */
-#define X86_FEATURE_CQM_MBM_TOTAL (11*32+ 2) /* LLC Total MBM monitoring */
-#define X86_FEATURE_CQM_MBM_LOCAL (11*32+ 3) /* LLC Local MBM monitoring */
+/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:0 (EDX), word 11 */
+#define X86_FEATURE_CQM_LLC (11*32+ 1) /* LLC QoS if 1 */
+
+/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (EDX), word 12 */
+#define X86_FEATURE_CQM_OCCUP_LLC (12*32+ 0) /* LLC occupancy monitoring */
+#define X86_FEATURE_CQM_MBM_TOTAL (12*32+ 1) /* LLC Total MBM monitoring */
+#define X86_FEATURE_CQM_MBM_LOCAL (12*32+ 2) /* LLC Local MBM monitoring */
/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -810,25 +810,33 @@ static void init_speculation_control(str
static void init_cqm(struct cpuinfo_x86 *c)
{
- if (!cpu_has(c, X86_FEATURE_CQM_LLC)) {
- c->x86_cache_max_rmid = -1;
- c->x86_cache_occ_scale = -1;
- return;
- }
-
- /* will be overridden if occupancy monitoring exists */
- c->x86_cache_max_rmid = cpuid_ebx(0xf);
-
- if (cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC) ||
- cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL) ||
- cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)) {
- u32 eax, ebx, ecx, edx;
+ u32 eax, ebx, ecx, edx;
- /* QoS sub-leaf, EAX=0Fh, ECX=1 */
- cpuid_count(0xf, 1, &eax, &ebx, &ecx, &edx);
+ /* Additional Intel-defined flags: level 0x0000000F */
+ if (c->cpuid_level >= 0x0000000F) {
- c->x86_cache_max_rmid = ecx;
- c->x86_cache_occ_scale = ebx;
+ /* QoS sub-leaf, EAX=0Fh, ECX=0 */
+ cpuid_count(0x0000000F, 0, &eax, &ebx, &ecx, &edx);
+ c->x86_capability[CPUID_F_0_EDX] = edx;
+
+ if (cpu_has(c, X86_FEATURE_CQM_LLC)) {
+ /* will be overridden if occupancy monitoring exists */
+ c->x86_cache_max_rmid = ebx;
+
+ /* QoS sub-leaf, EAX=0Fh, ECX=1 */
+ cpuid_count(0x0000000F, 1, &eax, &ebx, &ecx, &edx);
+ c->x86_capability[CPUID_F_1_EDX] = edx;
+
+ if ((cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC)) ||
+ ((cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL)) ||
+ (cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)))) {
+ c->x86_cache_max_rmid = ecx;
+ c->x86_cache_occ_scale = ebx;
+ }
+ } else {
+ c->x86_cache_max_rmid = -1;
+ c->x86_cache_occ_scale = -1;
+ }
}
}
--- a/arch/x86/kernel/cpu/cpuid-deps.c
+++ b/arch/x86/kernel/cpu/cpuid-deps.c
@@ -59,9 +59,6 @@ static const struct cpuid_dep cpuid_deps
{ X86_FEATURE_AVX512_4VNNIW, X86_FEATURE_AVX512F },
{ X86_FEATURE_AVX512_4FMAPS, X86_FEATURE_AVX512F },
{ X86_FEATURE_AVX512_VPOPCNTDQ, X86_FEATURE_AVX512F },
- { X86_FEATURE_CQM_OCCUP_LLC, X86_FEATURE_CQM_LLC },
- { X86_FEATURE_CQM_MBM_TOTAL, X86_FEATURE_CQM_LLC },
- { X86_FEATURE_CQM_MBM_LOCAL, X86_FEATURE_CQM_LLC },
{}
};
--- a/arch/x86/kernel/cpu/scattered.c
+++ b/arch/x86/kernel/cpu/scattered.c
@@ -21,10 +21,6 @@ struct cpuid_bit {
static const struct cpuid_bit cpuid_bits[] = {
{ X86_FEATURE_APERFMPERF, CPUID_ECX, 0, 0x00000006, 0 },
{ X86_FEATURE_EPB, CPUID_ECX, 3, 0x00000006, 0 },
- { X86_FEATURE_CQM_LLC, CPUID_EDX, 1, 0x0000000f, 0 },
- { X86_FEATURE_CQM_OCCUP_LLC, CPUID_EDX, 0, 0x0000000f, 1 },
- { X86_FEATURE_CQM_MBM_TOTAL, CPUID_EDX, 1, 0x0000000f, 1 },
- { X86_FEATURE_CQM_MBM_LOCAL, CPUID_EDX, 2, 0x0000000f, 1 },
{ X86_FEATURE_CAT_L3, CPUID_EBX, 1, 0x00000010, 0 },
{ X86_FEATURE_CAT_L2, CPUID_EBX, 2, 0x00000010, 0 },
{ X86_FEATURE_CDP_L3, CPUID_ECX, 2, 0x00000010, 1 },
--- a/arch/x86/kvm/cpuid.h
+++ b/arch/x86/kvm/cpuid.h
@@ -47,6 +47,8 @@ static const struct cpuid_reg reverse_cp
[CPUID_8000_0001_ECX] = {0x80000001, 0, CPUID_ECX},
[CPUID_7_0_EBX] = { 7, 0, CPUID_EBX},
[CPUID_D_1_EAX] = { 0xd, 1, CPUID_EAX},
+ [CPUID_F_0_EDX] = { 0xf, 0, CPUID_EDX},
+ [CPUID_F_1_EDX] = { 0xf, 1, CPUID_EDX},
[CPUID_8000_0008_EBX] = {0x80000008, 0, CPUID_EBX},
[CPUID_6_EAX] = { 6, 0, CPUID_EAX},
[CPUID_8000_000A_EDX] = {0x8000000a, 0, CPUID_EDX},

View File

@ -1,101 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 16 Jun 2019 13:00:34 +0100
Subject: tcp: Avoid ABI change for DoS fixes
Forwarded: not-needed
"tcp: tcp_fragment() should apply sane memory limits" adds a new Linux
MIB counter. This adds another element to the array in struct
linux_mib. Since that is always allocated by built-in code, it's a
backward-compatible change and we can hide the added element from
genksyms.
"tcp: add tcp_min_snd_mss sysctl" adds a new per-netns sysctl and a
new members in struct netns_ipv4. Since this is embedded in struct
net, it changes the offsets of all the following members. However
struct net itself is not embedded in anything, and is always allocated
by built-in code. So move the new member to the end of struct net,
and hide it from genksyms.
Also hide the added element and member from modules, as they won't be
able to rely on their being present until we bump ABI.
---
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -161,6 +161,9 @@ struct net {
#endif
struct sock *diag_nlsk;
atomic_t fnhe_genid;
+#if !defined(__GENKSYMS__) && !defined(MODULE)
+ int ipv4_sysctl_tcp_min_snd_mss;
+#endif
} __randomize_layout;
#include <linux/seq_file_net.h>
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -113,7 +113,7 @@ struct netns_ipv4 {
#endif
int sysctl_tcp_mtu_probing;
int sysctl_tcp_base_mss;
- int sysctl_tcp_min_snd_mss;
+ /* int sysctl_tcp_min_snd_mss; - bwh: moved to end of struct net */
int sysctl_tcp_probe_threshold;
u32 sysctl_tcp_probe_interval;
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -740,7 +740,7 @@ static struct ctl_table ipv4_net_table[]
},
{
.procname = "tcp_min_snd_mss",
- .data = &init_net.ipv4.sysctl_tcp_min_snd_mss,
+ .data = &init_net.ipv4_sysctl_tcp_min_snd_mss,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2527,7 +2527,7 @@ static int __net_init tcp_sk_init(struct
net->ipv4.sysctl_tcp_ecn_fallback = 1;
net->ipv4.sysctl_tcp_base_mss = TCP_BASE_MSS;
- net->ipv4.sysctl_tcp_min_snd_mss = TCP_MIN_SND_MSS;
+ net->ipv4_sysctl_tcp_min_snd_mss = TCP_MIN_SND_MSS;
net->ipv4.sysctl_tcp_probe_threshold = TCP_PROBE_THRESHOLD;
net->ipv4.sysctl_tcp_probe_interval = TCP_PROBE_INTERVAL;
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1462,7 +1462,7 @@ static inline int __tcp_mtu_to_mss(struc
mss_now -= icsk->icsk_ext_hdr_len;
/* Then reserve room for full set of TCP options and 8 bytes of data */
- mss_now = max(mss_now, sock_net(sk)->ipv4.sysctl_tcp_min_snd_mss);
+ mss_now = max(mss_now, sock_net(sk)->ipv4_sysctl_tcp_min_snd_mss);
return mss_now;
}
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -166,7 +166,7 @@ static void tcp_mtu_probing(struct inet_
mss = tcp_mtu_to_mss(sk, icsk->icsk_mtup.search_low) >> 1;
mss = min(net->ipv4.sysctl_tcp_base_mss, mss);
mss = max(mss, 68 - tcp_sk(sk)->tcp_header_len);
- mss = max(mss, net->ipv4.sysctl_tcp_min_snd_mss);
+ mss = max(mss, net->ipv4_sysctl_tcp_min_snd_mss);
icsk->icsk_mtup.search_low = tcp_mss_to_mtu(sk, mss);
}
tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -282,7 +282,9 @@ enum
LINUX_MIB_TCPACKCOMPRESSED, /* TCPAckCompressed */
LINUX_MIB_TCPZEROWINDOWDROP, /* TCPZeroWindowDrop */
LINUX_MIB_TCPRCVQDROP, /* TCPRcvQDrop */
+#if !defined(__KERNEL__) || (!defined(__GENKSYMS__) && !defined(MODULE))
LINUX_MIB_TCPWQUEUETOOBIG, /* TCPWqueueTooBig */
+#endif
__LINUX_MIB_MAX
};

View File

@ -1,37 +0,0 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 08 Aug 2019 02:40:23 +0100
Subject: x86/cpufeatures: Move swapgs feature bits to existing scattered words
Forwarded: not-needed
Renumbering CPU feature bits is a kABI change (even if genksyms
doesn't notice it). Move the new feature bits for the mitigations to
spare bits in the existing "scattered" feature words.
---
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -108,6 +108,7 @@
#define X86_FEATURE_EXTD_APICID ( 3*32+26) /* Extended APICID (8 bits) */
#define X86_FEATURE_AMD_DCM ( 3*32+27) /* AMD multi-node processor */
#define X86_FEATURE_APERFMPERF ( 3*32+28) /* P-State hardware coordination feedback capability (APERF/MPERF MSRs) */
+#define X86_FEATURE_FENCE_SWAPGS_USER ( 3*32+29) /* "" LFENCE in user entry SWAPGS path */
#define X86_FEATURE_NONSTOP_TSC_S3 ( 3*32+30) /* TSC doesn't stop in S3 state */
#define X86_FEATURE_TSC_KNOWN_FREQ ( 3*32+31) /* TSC has known frequency */
@@ -221,6 +222,7 @@
#define X86_FEATURE_ZEN ( 7*32+28) /* "" CPU is AMD family 0x17 (Zen) */
#define X86_FEATURE_L1TF_PTEINV ( 7*32+29) /* "" L1TF workaround PTE inversion */
#define X86_FEATURE_IBRS_ENHANCED ( 7*32+30) /* Enhanced IBRS */
+#define X86_FEATURE_FENCE_SWAPGS_KERNEL ( 7*32+31) /* "" LFENCE in kernel entry SWAPGS path */
/* Virtualization flags: Linux defined, word 8 */
#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
@@ -279,8 +281,6 @@
#define X86_FEATURE_CQM_OCCUP_LLC (11*32+ 1) /* LLC occupancy monitoring */
#define X86_FEATURE_CQM_MBM_TOTAL (11*32+ 2) /* LLC Total MBM monitoring */
#define X86_FEATURE_CQM_MBM_LOCAL (11*32+ 3) /* LLC Local MBM monitoring */
-#define X86_FEATURE_FENCE_SWAPGS_USER (11*32+ 4) /* "" LFENCE in user entry SWAPGS path */
-#define X86_FEATURE_FENCE_SWAPGS_KERNEL (11*32+ 5) /* "" LFENCE in kernel entry SWAPGS path */
/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */

View File

@ -247,7 +247,3 @@ bugfix/arm64/huawei-taishan/0032-scsi-hisi_sas-Fix-NULL-pointer-dereference.patc
bugfix/arm64/huawei-taishan/0033-scsi-hisi_sas-fix-calls-to-dma_set_mask_and_coherent.patch
# ABI maintenance
debian/abi/tcp-avoid-abi-change-for-dos-fixes.patch
debian/abi/x86-cpufeatures-move-swapgs-feature-bits-to-existing.patch
debian/abi/revert-x86-cpufeatures-combine-word-11-and-12-into-a-new-sc.patch
debian/abi/inet-avoid-abi-change-for-ip-id-hash-change.patch