]> git.pld-linux.org Git - packages/kernel.git/blob - exec-shield-make-peace-with-grsecurity.patch
- obsolete
[packages/kernel.git] / exec-shield-make-peace-with-grsecurity.patch
1 --- exec-shield-nx-2.6.7-A0.org 2004-06-27 03:39:46.397788416 +0200
2 +++ exec-shield-nx-2.6.7-A0     2004-06-27 03:44:09.132846616 +0200
3 @@ -999,12 +999,12 @@
4   #include <linux/percpu.h>
5   
6   struct exec_domain;
7 + struct linux_binprm;
8  +extern int exec_shield;
9  +extern int exec_shield_randomize;
10  +extern int print_fatal_signals;
11   
12   /*
13 -  * cloning flags:
14  @@ -194,6 +197,8 @@ struct mm_struct {
15         struct rb_root mm_rb;
16         struct vm_area_struct * mmap_cache;     /* last find_vma result */
17 @@ -2168,23 +2168,23 @@
18   /*
19    * vma is the first one with address > vma->vm_end.  Have to extend vma.
20  @@ -1210,7 +1224,7 @@ int expand_stack(struct vm_area_struct *
21 -               return -ENOMEM;
22 -       }
23 -       
24 +       if (vma->vm_flags & VM_LOCKED)
25 +               gr_learn_resource(current, RLIMIT_MEMLOCK, (vma->vm_mm->locked_vm + grow) << PAGE_SHIFT, 1);
26 +
27  -      if (address - vma->vm_start > current->rlim[RLIMIT_STACK].rlim_cur ||
28  +      if (over_stack_limit(address - vma->vm_start) ||
29                         ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
30 -                       current->rlim[RLIMIT_AS].rlim_cur) {
31 -               anon_vma_unlock(vma);
32 +                       current->rlim[RLIMIT_AS].rlim_cur ||
33 +                       ((vma->vm_flags & VM_LOCKED) &&
34  @@ -1271,7 +1285,7 @@ int expand_stack(struct vm_area_struct *
35 -               return -ENOMEM;
36 -       }
37 -       
38 +       if (vma->vm_flags & VM_LOCKED)
39 +               gr_learn_resource(current, RLIMIT_MEMLOCK, (vma->vm_mm->locked_vm + grow) << PAGE_SHIFT, 1);
40 +
41  -      if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
42  +      if (over_stack_limit(vma->vm_end - address) ||
43                         ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
44 -                       current->rlim[RLIMIT_AS].rlim_cur) {
45 -               anon_vma_unlock(vma);
46 +                       current->rlim[RLIMIT_AS].rlim_cur ||
47 +                       ((vma->vm_flags & VM_LOCKED) &&
48  @@ -1384,6 +1398,7 @@ no_mmaps:
49   static void unmap_vma(struct mm_struct *mm, struct vm_area_struct *area)
50   {
This page took 0.026334 seconds and 3 git commands to generate.