Skip to content

Commit a088cf8

Browse files
ardbiesheuvelctmarinas
authored andcommitted
arm64: kprobes: Drop ID map text from kprobes blacklist
The ID mapped text region is never accessed via the normal kernel mapping of text, and so it was moved into .rodata instead. This means it is no longer considered as a suitable place for kprobes by default, and the explicit blacklist is unnecessary, and actually results in an error message at boot: kprobes: Failed to populate blacklist (error -22), kprobes not restricted, be careful using them! So stop blacklisting the ID map text explicitly. Fixes: af7249b ("arm64: kernel: move identity map out of .text mapping") Reported-by: Nathan Chancellor <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 2ced0f3 commit a088cf8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

arch/arm64/kernel/probes/kprobes.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,6 @@ int __init arch_populate_kprobe_blacklist(void)
387387
(unsigned long)__irqentry_text_end);
388388
if (ret)
389389
return ret;
390-
ret = kprobe_add_area_blacklist((unsigned long)__idmap_text_start,
391-
(unsigned long)__idmap_text_end);
392-
if (ret)
393-
return ret;
394390
ret = kprobe_add_area_blacklist((unsigned long)__hyp_text_start,
395391
(unsigned long)__hyp_text_end);
396392
if (ret || is_kernel_in_hyp_mode())

0 commit comments

Comments
 (0)