From: Luís Henriques <lhenriques@suse.de>
Subject: fuse: handle kABI change in struct fuse_req
Patch-mainline: Never, kABI fix
References: bsc#1197343 CVE-2022-1011
The backport of commit 0c4bcfdecb1a ("fuse: fix pipe buffer lifetime for
direct_io") requires a kABI fix as it adds a field to struct fuse_reg.
Fortunately, that struct has a hole immediately after the count field, so
using the __GENKSYMS__ magic seems appropriate. Here's the pahole output:
pahole -C fuse_req fs/fuse/fuse.ko
struct fuse_req {
struct list_head list; /* 0 16 */
struct list_head intr_entry; /* 16 16 */
refcount_t count; /* 32 4 */
/* XXX 4 bytes hole, try to pack */
u64 intr_unique; /* 40 8 */
...
Signed-off-by: Luís Henriques <lhenriques@suse.de>
---
fs/fuse/fuse_i.h | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -312,7 +312,9 @@ struct fuse_req {
/** refcount */
refcount_t count;
+#ifndef __GENKSYMS__
bool user_pages;
+#endif
/** Unique ID for the interrupt request */
u64 intr_unique;