/[linux-patches]/hardened/2.6/trunk/2.6.28/4450_pax-2.6.28.7-test19-to-test20.patch
Gentoo

Contents of /hardened/2.6/trunk/2.6.28/4450_pax-2.6.28.7-test19-to-test20.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: 2027 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.7-test20 which are not
4 yet integrated into main grsecurity-2.6.28.x patch.
5
6 --- a/arch/x86/boot/compressed/head_32.S
7 +++ b/arch/x86/boot/compressed/head_32.S
8 @@ -80,8 +80,8 @@
9 /* Add 8 bytes for every 32K input block */
10 shrl $12, %eax
11 addl %eax, %ebx
12 - /* Add 32K + 18 bytes of extra slack */
13 - addl $(32768 + 18), %ebx
14 + /* Add 64K of extra slack */
15 + addl $65536, %ebx
16 /* Align on a 4K boundary */
17 addl $4095, %ebx
18 andl $~4095, %ebx
19 --- a/arch/x86/mm/pat.c
20 +++ b/arch/x86/mm/pat.c
21 @@ -491,6 +491,13 @@
22 return vma_prot;
23 }
24
25 +#ifndef CONFIG_STRICT_DEVMEM
26 +/* This check is done in drivers/char/mem.c in case of STRICT_DEVMEM*/
27 +static inline int range_is_allowed(unsigned long pfn, unsigned long size)
28 +{
29 + return 1;
30 +}
31 +#else
32 /* This check is needed to avoid cache aliasing when PAT is enabled */
33 static inline int range_is_allowed(unsigned long pfn, unsigned long size)
34 {
35 @@ -513,6 +520,7 @@
36 }
37 return 1;
38 }
39 +#endif /* CONFIG_STRICT_DEVMEM */
40
41 int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn,
42 unsigned long size, pgprot_t *vma_prot)
43 --- a/drivers/lguest/core.c
44 +++ b/drivers/lguest/core.c
45 @@ -80,9 +80,17 @@ static __init int map_switcher(void)
46 * (SWITCHER_ADDR). We might not get it in theory, but in practice
47 * it's worked so far. The end address needs +1 because __get_vm_area
48 * allocates an extra guard page, so we need space for that. */
49 +
50 +#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)
51 + switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
52 + VM_ALLOC | VM_KERNEXEC, SWITCHER_ADDR, SWITCHER_ADDR
53 + + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
54 +#else
55 switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE,
56 VM_ALLOC, SWITCHER_ADDR, SWITCHER_ADDR
57 + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE);
58 +#endif
59 +
60 if (!switcher_vma) {
61 err = -ENOMEM;
62 printk("lguest: could not map switcher pages high\n");

  ViewVC Help
Powered by ViewVC 1.1.20