From 8969691343354bdd80eff5405a0f879edbf013d6 Mon Sep 17 00:00:00 2001 From: matthieu castet Date: Sun, 23 Jan 2011 15:45:52 +0100 Subject: x86: Fix jump label with RO/NX module protection crash If we use jump table in module init, there are marked as removed in __jump_table section after init is done. But we already applied ro permissions on the module, so we can't modify a read only section (crash in remove_jump_label_module_init). Make the __jump_table section rw. Signed-off-by: Matthieu CASTET Cc: Xiaotian Feng Cc: Jason Baron Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Peter Zijlstra Cc: Arjan van de Ven Cc: Siarhei Liakh Cc: Xuxian Jiang Cc: James Morris Cc: Rusty Russell Cc: Dave Jones Cc: Kees Cook Cc: Linus Torvalds Cc: Andrew Morton LKML-Reference: <4D3C3F20.7030203@free.fr> Signed-off-by: Ingo Molnar --- arch/x86/include/asm/jump_label.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h index f52d42e80585..574dbc22893a 100644 --- a/arch/x86/include/asm/jump_label.h +++ b/arch/x86/include/asm/jump_label.h @@ -14,7 +14,7 @@ do { \ asm goto("1:" \ JUMP_LABEL_INITIAL_NOP \ - ".pushsection __jump_table, \"a\" \n\t"\ + ".pushsection __jump_table, \"aw\" \n\t"\ _ASM_PTR "1b, %l[" #label "], %c0 \n\t" \ ".popsection \n\t" \ : : "i" (key) : : label); \ -- cgit v1.2.3