generic debug pagealloc
CONFIG_DEBUG_PAGEALLOC is now supported by x86, powerpc, sparc64, and s390. This patch implements it for the rest of the architectures by filling the pages with poison byte patterns after free_pages() and verifying the poison patterns before alloc_pages(). This generic one cannot detect invalid page accesses immediately but invalid read access may cause invalid dereference by poisoned memory and invalid write access can be detected after a long delay. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
610a77e04a
commit
6a11f75b6a
@ -250,21 +250,3 @@ asmlinkage void do_bus_error(unsigned long addr, int write_access,
|
||||
dump_dtlb();
|
||||
die("Bus Error", regs, SIGKILL);
|
||||
}
|
||||
|
||||
/*
|
||||
* This functionality is currently not possible to implement because
|
||||
* we're using segmentation to ensure a fixed mapping of the kernel
|
||||
* virtual address space.
|
||||
*
|
||||
* It would be possible to implement this, but it would require us to
|
||||
* disable segmentation at startup and load the kernel mappings into
|
||||
* the TLB like any other pages. There will be lots of trickery to
|
||||
* avoid recursive invocation of the TLB miss handler, though...
|
||||
*/
|
||||
#ifdef CONFIG_DEBUG_PAGEALLOC
|
||||
void kernel_map_pages(struct page *page, int numpages, int enable)
|
||||
{
|
||||
|
||||
}
|
||||
EXPORT_SYMBOL(kernel_map_pages);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user