The patch titled Subject: mseal: move can_do_mseal() to mseal.c has been added to the -mm mm-unstable branch. Its filename is mseal-move-can_do_mseal-to-msealc.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mseal-move-can_do_mseal-to-msealc.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Jeff Xu <jeffxu@xxxxxxxxxxxx> Subject: mseal: move can_do_mseal() to mseal.c Date: Fri, 6 Dec 2024 01:39:34 +0000 No code logic change. can_do_mseal() is called exclusively by mseal.c, and mseal.c is compiled only when CONFIG_64BIT flag is set in makefile. Therefore, it is unnecessary to have 32 bit stub function in the header file. Link: https://lkml.kernel.org/r/20241206013934.2782793-1-jeffxu@xxxxxxxxxx Signed-off-by: Jeff Xu <jeffxu@xxxxxxxxxxxx> Cc: Jorge Lucangeli Obes <jorgelo@xxxxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx> Cc: Pedro Falcato <pedro.falcato@xxxxxxxxx> Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/internal.h | 16 ---------------- mm/mseal.c | 8 ++++++++ 2 files changed, 8 insertions(+), 16 deletions(-) --- a/mm/internal.h~mseal-move-can_do_mseal-to-msealc +++ a/mm/internal.h @@ -1457,22 +1457,6 @@ void __meminit __init_single_page(struct unsigned long shrink_slab(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg, int priority); -#ifdef CONFIG_64BIT -static inline int can_do_mseal(unsigned long flags) -{ - if (flags) - return -EINVAL; - - return 0; -} - -#else -static inline int can_do_mseal(unsigned long flags) -{ - return -EPERM; -} -#endif - #ifdef CONFIG_SHRINKER_DEBUG static inline __printf(2, 0) int shrinker_debugfs_name_alloc( struct shrinker *shrinker, const char *fmt, va_list ap) --- a/mm/mseal.c~mseal-move-can_do_mseal-to-msealc +++ a/mm/mseal.c @@ -158,6 +158,14 @@ static int apply_mm_seal(unsigned long s return 0; } +static inline int can_do_mseal(unsigned long flags) +{ + if (flags) + return -EINVAL; + + return 0; +} + /* * mseal(2) seals the VM's meta data from * selected syscalls. _ Patches currently in -mm which might be from jeffxu@xxxxxxxxxxxx are selftest-mm-remove-seal_elf.patch mseal-move-can_do_mseal-to-msealc.patch