]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: kprobes: call set_memory_rox() for kprobe page
authorYang Shi <yang@os.amperecomputing.com>
Thu, 18 Sep 2025 16:23:49 +0000 (09:23 -0700)
committerWill Deacon <will@kernel.org>
Thu, 25 Sep 2025 12:56:48 +0000 (13:56 +0100)
commit195a1b7d8388c0ec2969a39324feb8bebf9bb907
treef910c0e375556c27ccbd110b00135ef5fb036ad2
parenta084c3c4a2674f156031eb04e785986c2744aca8
arm64: kprobes: call set_memory_rox() for kprobe page

The kprobe page is allocated by execmem allocator with ROX permission.
It needs to call set_memory_rox() to set proper permission for the
direct map too. It was missed.

Fixes: 10d5e97c1bf8 ("arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page")
Cc: <stable@vger.kernel.org>
Signed-off-by: Yang Shi <yang@os.amperecomputing.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/probes/kprobes.c