hulk inclusion category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/20015 CVE: CVE-2026-93243 -------------------------------- Backport commit e0e763a87ea9 ("[Backport] perf: Track the perf mlock gift separately") adds atomic_long_t perf_mlock to struct user_struct right after locked_vm. When CONFIG_PERF_EVENTS is enabled, this shifts every following member and grows the structure from 136 to 144 bytes, changing the checksum of the exported free_uid() from 0x3d886965 to 0xacf17fe5 and breaking kABI for out-of-tree modules. struct user_struct has no KABI_RESERVE slot on this branch, so it cannot be recovered the way it is done on 5.10. Instead move perf_mlock to the end of the structure and wrap it in KABI_EXTEND(), which keeps the new member hidden from genksyms and therefore leaves the checksum of every symbol computed from this structure untouched. This is the same approach already used elsewhere in this tree (struct disk_stats, struct hrtimer, struct pipe_inode_info). The tail extension does not affect the original layout: all pre-existing members keep their offsets and the size of the original part stays 136 bytes, so modules built against the previous layout still work. perf_mlock is only referenced by name in kernel/events/core.c, so no other code needs to be updated. Fixes: b67fb3955b07 ("[Backport] perf: Track the perf mlock gift separately") Signed-off-by: Wupeng Ma <mawupeng1@huawei.com> --- include/linux/sched/user.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/sched/user.h b/include/linux/sched/user.h index ec262b605437c..2cc27a8f6eed8 100644 --- a/include/linux/sched/user.h +++ b/include/linux/sched/user.h @@ -7,6 +7,7 @@ #include <linux/percpu_counter.h> #include <linux/refcount.h> #include <linux/ratelimit.h> +#include <linux/kabi.h> /* * Some day this will be a full-fledged user tracking system.. @@ -28,15 +29,16 @@ struct user_struct { defined(CONFIG_SECRETMEM) atomic_long_t locked_vm; /* pinned pages charged to RLIMIT_MEMLOCK */ #endif -#ifdef CONFIG_PERF_EVENTS - atomic_long_t perf_mlock; /* perf buffer pages within perf_event_mlock_kb */ -#endif #ifdef CONFIG_WATCH_QUEUE atomic_t nr_watches; /* The number of watches this user currently has */ #endif /* Miscellaneous per-user rate limit */ struct ratelimit_state ratelimit; + +#ifdef CONFIG_PERF_EVENTS + KABI_EXTEND(atomic_long_t perf_mlock) /* perf buffer pages within perf_event_mlock_kb */ +#endif }; extern int uids_sysfs_init(void); -- 2.43.0