diff options
author | Arjan van de Ven <arjan@infradead.org> | 2008-01-30 07:34:08 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:34:08 -0500 |
commit | edeed30589f5defe63ce6aaae56f2b7c855e4520 (patch) | |
tree | a49736ff74dcbd3feba3c8318b204fb2165f892d /include/asm-x86/cacheflush.h | |
parent | adafdf6a4e45f2d1051e10aebe13025e89dbdf6d (diff) |
x86: add testcases for RODATA and NX protections/attributes
Latest update; I now have 4 NX tests, but 2 fail so they're #if 0'd.
I also cleaned up the NX test code quite a bit, and got rid of the ugly
exception table sorting stuff.
From: Arjan van de Ven <arjan@linux.intel.com>
This patch adds testcases for the CONFIG_DEBUG_RODATA configuration option
as well as the NX CPU feature/mappings. Both testcases can move to tests/
once that patch gets merged into mainline.
(I'm half considering moving the rodata test into mm/init.c but I'll
wait with that until init.c is unified)
As part of this I had to fix a not-quite-right alignment in the vmlinux.lds.h
for the RODATA sections, which lead to 1 page less being marked read only.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/cacheflush.h')
-rw-r--r-- | include/asm-x86/cacheflush.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-x86/cacheflush.h b/include/asm-x86/cacheflush.h index 157da0206ccc..3e74aff90809 100644 --- a/include/asm-x86/cacheflush.h +++ b/include/asm-x86/cacheflush.h | |||
@@ -47,5 +47,12 @@ void clflush_cache_range(void *addr, int size); | |||
47 | #ifdef CONFIG_DEBUG_RODATA | 47 | #ifdef CONFIG_DEBUG_RODATA |
48 | void mark_rodata_ro(void); | 48 | void mark_rodata_ro(void); |
49 | #endif | 49 | #endif |
50 | #ifdef CONFIG_DEBUG_RODATA_TEST | ||
51 | void rodata_test(void); | ||
52 | #else | ||
53 | static inline void rodata_test(void) | ||
54 | { | ||
55 | } | ||
56 | #endif | ||
50 | 57 | ||
51 | #endif | 58 | #endif |