]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
execmem: introduce execmem_alloc_rw()
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Sun, 13 Jul 2025 07:17:24 +0000 (10:17 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 2 Aug 2025 19:06:11 +0000 (12:06 -0700)
commit838955f64ae7582f009a3538889bb9244f37ab26
tree20177dbe146ad7ca56529b42c90d25c750c22bdd
parentfcd90ad31e29d0b403f3a074a64cd7f0876175dd
execmem: introduce execmem_alloc_rw()

Some callers of execmem_alloc() require the memory to be temporarily
writable even when it is allocated from ROX cache.  These callers use
execemem_make_temp_rw() right after the call to execmem_alloc().

Wrap this sequence in execmem_alloc_rw() API.

Link: https://lkml.kernel.org/r/20250713071730.4117334-3-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/alternative.c
include/linux/execmem.h
kernel/module/main.c
mm/execmem.c