[linux] 03/04: inet_frag: Limit ABI change in 4.9.51
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Tue Sep 26 01:01:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch stretch
in repository linux.
commit 693696cdb0ed843c662c28ed0346f7383cff5c95
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Tue Sep 26 00:16:13 2017 +0100
inet_frag: Limit ABI change in 4.9.51
---
debian/changelog | 1 +
debian/config/defines | 2 +
.../inet_frag-limit-abi-change-in-4.9.51.patch | 58 ++++++++++++++++++++++
debian/patches/series | 1 +
4 files changed, 62 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index be4d03c..d7052d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -128,6 +128,7 @@ linux (4.9.51-1) UNRELEASED; urgency=medium
* [ppc64el] Invalidate ERAT on powersave wakeup for POWER9, thanks to
Michael Neuling (Closes: #868887)
* ip6_fib: Avoid ABI change in 4.9.51
+ * inet_frag: Limit ABI change in 4.9.51
-- Ben Hutchings <ben at decadent.org.uk> Tue, 19 Sep 2017 00:38:28 +0100
diff --git a/debian/config/defines b/debian/config/defines
index 8f9a645..082c396 100644
--- a/debian/config/defines
+++ b/debian/config/defines
@@ -4,6 +4,8 @@ ignore-changes:
__cpuhp_*
bpf_analyzer
cxl_*
+ inet_frag_*
+ inet_frags_*
mm_iommu_*
register_cxl_calls
unregister_cxl_calls
diff --git a/debian/patches/debian/inet_frag-limit-abi-change-in-4.9.51.patch b/debian/patches/debian/inet_frag-limit-abi-change-in-4.9.51.patch
new file mode 100644
index 0000000..600e16c
--- /dev/null
+++ b/debian/patches/debian/inet_frag-limit-abi-change-in-4.9.51.patch
@@ -0,0 +1,58 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Tue, 26 Sep 2017 00:03:33 +0100
+Subject: inet_frag: Limit ABI change in 4.9.51
+Forwarded: not-needed
+
+Commit fb452a1aa3fd 'Revert "net: use lib/percpu_counter API for
+fragmentation mem accounting"' changed the type of inet_frag::mem
+from struct percpu_counter to atomic_t. There are few modules
+that actually depend on this, but struct inet_frag is embedded in
+various other structures that end up affecting symbol versions
+for a huge number of networking APIs.
+
+So add padding to keep the structure size unchanged, hide the type
+change from genksyms, and rename a key inet_frag function so that
+those modules that actually depend on the type of inet_frag::mem do
+see an ABI change.
+
+---
+--- a/include/net/inet_frag.h
++++ b/include/net/inet_frag.h
+@@ -1,9 +1,22 @@
+ #ifndef __NET_FRAG_H__
+ #define __NET_FRAG_H__
+
++#include <linux/percpu_counter.h>
++
+ struct netns_frags {
++ /*
++ * bwh: This change is hidden from genksyms, but we still make
++ * sure to avoid an ABI mismatch for the modules that access
++ * it (see comment below).
++ */
++#ifndef __GENKSYMS__
+ /* Keep atomic mem on separate cachelines in structs that include it */
+ atomic_t mem ____cacheline_aligned_in_smp;
++ char pad[sizeof(struct percpu_counter) -
++ sizeof(atomic_t)];
++#else
++ struct percpu_counter mem ____cacheline_aligned_in_smp;
++#endif
+ /* sysctls */
+ int timeout;
+ int high_thresh;
+@@ -107,6 +120,14 @@ static inline void inet_frags_init_net(s
+ {
+ atomic_set(&nf->mem, 0);
+ }
++/*
++ * bwh: All modules accessing inet_frag::mem through the inline
++ * functions below also call inet_frags_exit_net(). Change the
++ * function name together with that field's type, so that all loaded
++ * code agrees on whether the type is atomic_t or struct
++ * percpu_counter.
++ */
++#define inet_frags_exit_net inet_frags_exit_net_atomic
+ void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f);
+
+ void inet_frag_kill(struct inet_frag_queue *q, struct inet_frags *f);
diff --git a/debian/patches/series b/debian/patches/series
index bdd33c7..4a1f5c6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -174,3 +174,4 @@ bugfix/all/liblockdep-fix-defined-but-not-used-warning-for-init.patch
# ABI maintenance
debian/ip6_fib-avoid-abi-change-in-4.9.51.patch
+debian/inet_frag-limit-abi-change-in-4.9.51.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list