* [merged mm-stable] execmem-move-execmem_force_rw-and-execmem_restore_rox-before-use.patch removed from -mm tree
@ 2025-08-02 18:54 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-08-02 18:54 UTC (permalink / raw)
To: mm-commits, rostedt, petr.pavlu, peterz, mhiramat, da.gomez, rppt,
akpm
The quilt patch titled
Subject: execmem: move execmem_force_rw() and execmem_restore_rox() before use
has been removed from the -mm tree. Its filename was
execmem-move-execmem_force_rw-and-execmem_restore_rox-before-use.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Subject: execmem: move execmem_force_rw() and execmem_restore_rox() before use
Date: Sun, 13 Jul 2025 10:17:26 +0300
to avoid static declarations.
Link: https://lkml.kernel.org/r/20250713071730.4117334-5-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Daniel Gomez <da.gomez@samsung.com>
Cc: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Petr Pavlu <petr.pavlu@suse.com>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/execmem.c | 44 +++++++++++++++++++++-----------------------
1 file changed, 21 insertions(+), 23 deletions(-)
--- a/mm/execmem.c~execmem-move-execmem_force_rw-and-execmem_restore_rox-before-use
+++ a/mm/execmem.c
@@ -137,6 +137,27 @@ err_restore:
return err;
}
+static int execmem_force_rw(void *ptr, size_t size)
+{
+ unsigned int nr = PAGE_ALIGN(size) >> PAGE_SHIFT;
+ unsigned long addr = (unsigned long)ptr;
+ int ret;
+
+ ret = set_memory_nx(addr, nr);
+ if (ret)
+ return ret;
+
+ return set_memory_rw(addr, nr);
+}
+
+int execmem_restore_rox(void *ptr, size_t size)
+{
+ unsigned int nr = PAGE_ALIGN(size) >> PAGE_SHIFT;
+ unsigned long addr = (unsigned long)ptr;
+
+ return set_memory_rox(addr, nr);
+}
+
static void execmem_cache_clean(struct work_struct *work)
{
struct maple_tree *free_areas = &execmem_cache.free_areas;
@@ -328,8 +349,6 @@ static inline void *pending_free_clear(v
return (void *)((unsigned long)ptr & ~PENDING_FREE_MASK);
}
-static int execmem_force_rw(void *ptr, size_t size);
-
static int __execmem_cache_free(struct ma_state *mas, void *ptr, gfp_t gfp_mask)
{
size_t size = mas_range_len(mas);
@@ -415,27 +434,6 @@ static bool execmem_cache_free(void *ptr
return true;
}
-static int execmem_force_rw(void *ptr, size_t size)
-{
- unsigned int nr = PAGE_ALIGN(size) >> PAGE_SHIFT;
- unsigned long addr = (unsigned long)ptr;
- int ret;
-
- ret = set_memory_nx(addr, nr);
- if (ret)
- return ret;
-
- return set_memory_rw(addr, nr);
-}
-
-int execmem_restore_rox(void *ptr, size_t size)
-{
- unsigned int nr = PAGE_ALIGN(size) >> PAGE_SHIFT;
- unsigned long addr = (unsigned long)ptr;
-
- return set_memory_rox(addr, nr);
-}
-
#else /* CONFIG_ARCH_HAS_EXECMEM_ROX */
/*
* when ROX cache is not used the permissions defined by architectures for
_
Patches currently in -mm which might be from rppt@kernel.org are
kho-add-test-for-kexec-handover.patch
kho-add-test-for-kexec-handover-fix.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-08-02 18:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-02 18:54 [merged mm-stable] execmem-move-execmem_force_rw-and-execmem_restore_rox-before-use.patch removed from -mm tree 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.