All of lore.kernel.org
 help / color / mirror / Atom feed
* + mseal-remove-can_do_mseal.patch added to mm-unstable branch
@ 2024-12-07  5:44 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-12-07  5:44 UTC (permalink / raw)
  To: mm-commits, vbabka, rdunlap, pedro.falcato, lorenzo.stoakes,
	Liam.Howlett, keescook, jorgelo, jeffxu, akpm


The patch titled
     Subject: mseal: remove can_do_mseal()
has been added to the -mm mm-unstable branch.  Its filename is
     mseal-remove-can_do_mseal.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mseal-remove-can_do_mseal.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@chromium.org>
Subject: mseal: remove can_do_mseal()
Date: Fri, 6 Dec 2024 19:48:39 +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, remove this
function and merge the logic into do_mseal().

Link: https://lkml.kernel.org/r/20241206013934.2782793-1-jeffxu@google.com
Link: https://lkml.kernel.org/r/20241206194839.3030596-2-jeffxu@google.com
Signed-off-by: Jeff Xu <jeffxu@chromium.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jorge Lucangeli Obes <jorgelo@chromium.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/internal.h |   16 ----------------
 mm/mseal.c    |    6 +++---
 2 files changed, 3 insertions(+), 19 deletions(-)

--- a/mm/internal.h~mseal-remove-can_do_mseal
+++ 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-remove-can_do_mseal
+++ a/mm/mseal.c
@@ -217,9 +217,9 @@ int do_mseal(unsigned long start, size_t
 	unsigned long end;
 	struct mm_struct *mm = current->mm;
 
-	ret = can_do_mseal(flags);
-	if (ret)
-		return ret;
+	/* Verify flags not set. */
+	if (flags)
+		return -EINVAL;
 
 	start = untagged_addr(start);
 	if (!PAGE_ALIGNED(start))
_

Patches currently in -mm which might be from jeffxu@chromium.org are

selftest-mm-remove-seal_elf.patch
mseal-remove-can_do_mseal.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-12-07  5:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-07  5:44 + mseal-remove-can_do_mseal.patch added to mm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.