forked from luck/tmp_suning_uos_patched
x86: harden kernel code patching
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
b7b66baa8b
commit
00c6b2d5d7
@ -519,6 +519,7 @@ void *__kprobes text_poke(void *addr, const void *opcode, size_t len)
|
|||||||
pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
|
pages[1] = vmalloc_to_page(addr + PAGE_SIZE);
|
||||||
} else {
|
} else {
|
||||||
pages[0] = virt_to_page(addr);
|
pages[0] = virt_to_page(addr);
|
||||||
|
WARN_ON(!PageReserved(pages[0]));
|
||||||
pages[1] = virt_to_page(addr + PAGE_SIZE);
|
pages[1] = virt_to_page(addr + PAGE_SIZE);
|
||||||
}
|
}
|
||||||
BUG_ON(!pages[0]);
|
BUG_ON(!pages[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user