[linux] 02/02: netfilter: nat: Avoid ABI change in 4.13.13
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Thu Nov 16 21:16:14 UTC 2017
This is an automated email from the git hooks/post-receive script.
benh pushed a commit to branch sid
in repository linux.
commit 617046eb4541312f1af391ca8d84fd39ca89c226
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Thu Nov 16 21:04:07 2017 +0000
netfilter: nat: Avoid ABI change in 4.13.13
---
debian/changelog | 1 +
...netfilter-nat-avoid-abi-change-in-4.13.13.patch | 58 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 60 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index a6b64ec..c6b5214 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -141,6 +141,7 @@ linux (4.13.13-1) UNRELEASED; urgency=medium
* [arm64] nvmem: Enable NVMEM_SUNXI_SID as module (Closes: #881567)
* [x86] rmi4: Disable RMI4_SMB (Closes: #880471)
* ALSA: timer: Avoid ABI change in 4.13.13
+ * netfilter: nat: Avoid ABI change in 4.13.13
-- Salvatore Bonaccorso <carnil at debian.org> Sat, 04 Nov 2017 09:54:41 +0100
diff --git a/debian/patches/debian/netfilter-nat-avoid-abi-change-in-4.13.13.patch b/debian/patches/debian/netfilter-nat-avoid-abi-change-in-4.13.13.patch
new file mode 100644
index 0000000..b833dca
--- /dev/null
+++ b/debian/patches/debian/netfilter-nat-avoid-abi-change-in-4.13.13.patch
@@ -0,0 +1,58 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Thu, 16 Nov 2017 21:00:59 +0000
+Subject: netfilter: nat: Avoid ABI change in 4.13.13
+Forwarded: not-needed
+
+Commit e1bf1687740c ("netfilter: nat: Revert "netfilter: nat: convert
+nat bysrc hash to rhashtable") changed the type of
+nf_conn::nat_bysource. Thankfully the two types are the same size,
+and nothing outside of nf_nat_core touches this field directly. Hide
+the change from genksyms but add compile-time assertions to make sure
+that this isn't an ABI change.
+
+---
+--- a/include/net/netfilter/nf_conntrack.h
++++ b/include/net/netfilter/nf_conntrack.h
+@@ -17,6 +17,7 @@
+ #include <linux/bitops.h>
+ #include <linux/compiler.h>
+ #include <linux/atomic.h>
++#include <linux/rhashtable.h>
+
+ #include <linux/netfilter/nf_conntrack_tcp.h>
+ #include <linux/netfilter/nf_conntrack_dccp.h>
+@@ -82,7 +83,11 @@ struct nf_conn {
+ possible_net_t ct_net;
+
+ #if IS_ENABLED(CONFIG_NF_NAT)
++#ifndef __GENKSYMS__
+ struct hlist_node nat_bysource;
++#else
++ struct rhlist_head nat_bysource;
++#endif
+ #endif
+ /* all members below initialized via memset */
+ u8 __nfct_init_offset[0];
+--- a/include/net/netfilter/nf_nat.h
++++ b/include/net/netfilter/nf_nat.h
+@@ -1,5 +1,6 @@
+ #ifndef _NF_NAT_H
+ #define _NF_NAT_H
++#include <linux/rhashtable.h>
+ #include <linux/netfilter_ipv4.h>
+ #include <linux/netfilter/nf_nat.h>
+ #include <net/netfilter/nf_conntrack_tuple.h>
+--- a/net/netfilter/nf_nat_core.c
++++ b/net/netfilter/nf_nat_core.c
+@@ -796,6 +796,11 @@ static int __init nf_nat_init(void)
+ {
+ int ret;
+
++ /* bwh: Assert that nat_bysource hasn't changed size or alignment */
++ BUILD_BUG_ON(sizeof(struct hlist_node) != sizeof(struct rhlist_head));
++ BUILD_BUG_ON(__alignof__(struct hlist_node) !=
++ __alignof__(struct rhlist_head));
++
+ /* Leave them the same for the moment. */
+ nf_nat_htable_size = nf_conntrack_htable_size;
+
diff --git a/debian/patches/series b/debian/patches/series
index e12e8aa..3f0ba37 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -149,3 +149,4 @@ debian/mac80211-avoid-abi-change-in-4.13.5.patch
debian/keys-limit-abi-change-in-4.13.10.patch
debian/swap-avoid-abi-change-in-4.13.12.patch
debian/alsa-timer-avoid-abi-change-in-4.13.13.patch
+debian/netfilter-nat-avoid-abi-change-in-4.13.13.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