Blob Blame History Raw
From: Michal Kubecek <mkubecek@suse.cz>
Date: Tue, 9 Jul 2019 08:37:40 +0200
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 {
 	atomic_t		fnhe_genid;
 #ifndef __GENKSYMS__
 	int sysctl_tcp_min_snd_mss;
+	u32			hash_mix;
 #endif
 };