aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-04-25 11:07:03 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-25 13:54:07 -0400
commit00c6b2d5d7b2414bd46c620d6a8c37fa7a716f29 (patch)
tree61395a1d6e1665e3f491a0601a6de237b61de194 /arch/x86/kernel
parentb7b66baa8bc3f8e0cda6576e31e9bde09382565d (diff)
x86: harden kernel code patching
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/alternative.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index 60299f61843f..65c7857a90dd 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -519,6 +519,7 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
519 pages[1] = vmalloc_to_page(addr + PAGE_SIZE); 519 pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
520 } else { 520 } else {
521 pages[0] = virt_to_page(addr); 521 pages[0] = virt_to_page(addr);
522 WARN_ON(!PageReserved(pages[0]));
522 pages[1] = virt_to_page(addr + PAGE_SIZE); 523 pages[1] = virt_to_page(addr + PAGE_SIZE);
523 } 524 }
524 BUG_ON(!pages[0]); 525 BUG_ON(!pages[0]);