kaiser: user_map __kprobes_text too
authorHugh Dickins <hughd@google.com>
Mon, 18 Dec 2017 03:29:01 +0000 (19:29 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 7 Jan 2018 01:46:49 +0000 (01:46 +0000)
In 3.2 (and earlier, and up to 3.15) Kaiser needs to user_map the
__kprobes_text as well as the __entry_text: entry_64.S places some
vital functions there, so without this you very soon triple-fault.
Many thanks to Jiri Kosina for pointing me in this direction.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/mm/kaiser.c

index ab1dfa6..fb16d79 100644 (file)
@@ -281,6 +281,8 @@ void __init kaiser_init(void)
         */
        kaiser_add_user_map_ptrs_early(__entry_text_start, __entry_text_end,
                                       __PAGE_KERNEL_RX);
+       kaiser_add_user_map_ptrs_early(__kprobes_text_start, __kprobes_text_end,
+                                      __PAGE_KERNEL_RX);
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
        kaiser_add_user_map_ptrs_early(__irqentry_text_start,
                                       __irqentry_text_end,