diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-04-25 17:07:03 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-25 19:54:07 +0200 |
commit | 00c6b2d5d7b2414bd46c620d6a8c37fa7a716f29 (patch) | |
tree | 61395a1d6e1665e3f491a0601a6de237b61de194 /arch/x86/kernel/alternative.c | |
parent | b7b66baa8bc3f8e0cda6576e31e9bde09382565d (diff) | |
download | blackbird-op-linux-00c6b2d5d7b2414bd46c620d6a8c37fa7a716f29.tar.gz blackbird-op-linux-00c6b2d5d7b2414bd46c620d6a8c37fa7a716f29.zip |
x86: harden kernel code patching
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r-- | arch/x86/kernel/alternative.c | 1 |
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) pages[1] = vmalloc_to_page(addr + PAGE_SIZE); } else { pages[0] = virt_to_page(addr); + WARN_ON(!PageReserved(pages[0])); pages[1] = virt_to_page(addr + PAGE_SIZE); } BUG_ON(!pages[0]); |