Blob Blame History Raw
From: Michal Kubecek <mkubecek@suse.cz>
Subject: kabi: handle addition of net::hash_mix
Patch-mainline: Never, kabi workaround
References: CVE-2019-10639 bsc#1140577

Backport of mainline commit 355b98553789 ("netns: provide pure entropy for
net_hash_mix()") adds new member hash_mix into kabi-protected struct net.
As struct net is always allocated by in-tree kernel code, we can simply
move hash_mix at the end and hide it from genksyms.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
---
 include/net/net_namespace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -54,7 +54,6 @@ struct net {
 						 */
 	spinlock_t		rules_mod_lock;
 
-	u32			hash_mix;
 	atomic64_t		cookie_gen;
 
 	struct list_head	list;		/* list of network namespaces */
@@ -156,6 +155,7 @@ struct net {
 	} ip6addrlbl_table;
 	struct uevent_sock	*uevent_sock;		/* uevent socket */
 	int			sysctl_tcp_min_snd_mss;
+	u32			hash_mix;
 	int			ip6frag_strict_short;
 #endif
 };