/[linux-patches]/hardened/2.6/trunk/2.6.28/4455_pax-2.6.28.8-test20-to-test23.patch
Gentoo

Contents of /hardened/2.6/trunk/2.6.28/4455_pax-2.6.28.8-test20-to-test23.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1519 - (show annotations) (download)
Wed Mar 18 19:25:21 2009 UTC (5 years, 4 months ago) by gengor
File size: 1934 byte(s)
Update 2.6.28 hardened-extras trunk/
1 From: Gordon Malm <gengor@gentoo.org>
2
3 PaX: Add changes from pax-2.6.28.8-test23 which are not
4 yet integrated into main grsecurity-2.6.28.x patch.
5
6 --- a/arch/x86/kernel/vmlinux_32.lds.S
7 +++ b/arch/x86/kernel/vmlinux_32.lds.S
8 @@ -179,15 +179,16 @@
9
10 . += __KERNEL_TEXT_OFFSET;
11
12 - . = ALIGN(4096); /* Exception table */
13 + . = ALIGN(4096);
14 + NOTES :rodata :note
15 +
16 + . = ALIGN(16); /* Exception table */
17 __ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
18 __start___ex_table = .;
19 *(__ex_table)
20 __stop___ex_table = .;
21 } :rodata
22
23 - NOTES :rodata :note
24 -
25 RO_DATA(PAGE_SIZE)
26
27 . = ALIGN(PAGE_SIZE);
28 @@ -197,23 +198,22 @@
29 *(.empty_zero_page)
30 *(.swapper_pg_pmd)
31 *(.swapper_pg_dir)
32 - }
33
34 -#ifdef CONFIG_PAX_KERNEXEC
35 +#if defined(CONFIG_PAX_KERNEXEC) && !defined(CONFIG_MODULES)
36 + . = ALIGN(PMD_SIZE);
37 +#endif
38 +
39 + }
40
41 -#ifdef CONFIG_MODULES
42 +#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_MODULES)
43 . = ALIGN(PAGE_SIZE);
44 .module.text : AT(ADDR(.module.text) - LOAD_OFFSET) {
45 MODULES_VADDR = .;
46 BYTE(0)
47 . += (6 * 1024 * 1024);
48 - . = ALIGN( PMD_SIZE) - 1;
49 - MODULES_END = .;
50 + . = ALIGN(PMD_SIZE);
51 + MODULES_END = . - 1;
52 }
53 -#else
54 - . = ALIGN(PMD_SIZE) - 1;
55 -#endif
56 -
57 #endif
58
59 /* writeable */
60 --- a/include/linux/highmem.h
61 +++ b/include/linux/highmem.h
62 @@ -126,9 +126,14 @@
63
64 static inline void sanitize_highpage(struct page *page)
65 {
66 - void *kaddr = kmap_atomic(page, KM_CLEARPAGE);
67 + void *kaddr;
68 + unsigned long flags;
69 +
70 + local_irq_save(flags);
71 + kaddr = kmap_atomic(page, KM_CLEARPAGE);
72 clear_page(kaddr);
73 kunmap_atomic(kaddr, KM_CLEARPAGE);
74 + local_irq_restore(flags);
75 }
76
77 static inline void zero_user_segments(struct page *page,
78 --- a/arch/x86/mm/pageattr-test.c
79 +++ b/arch/x86/mm/pageattr-test.c
80 @@ -36,7 +36,7 @@ enum {
81
82 static int pte_testbit(pte_t pte)
83 {
84 - return pte_flags(pte) & _PAGE_UNUSED1;
85 + return pte_flags(pte) & _PAGE_CPA_TEST;
86 }
87
88 struct split_state {

  ViewVC Help
Powered by ViewVC 1.1.20