SOURCES (LINUX_2_6): kernel-pax.patch - pldized
zbyniu
zbyniu at pld-linux.org
Wed May 7 11:48:28 CEST 2008
Author: zbyniu Date: Wed May 7 09:48:28 2008 GMT
Module: SOURCES Tag: LINUX_2_6
---- Log message:
- pldized
---- Files affected:
SOURCES:
kernel-pax.patch (1.1.2.6 -> 1.1.2.7)
---- Diffs:
================================================================
Index: SOURCES/kernel-pax.patch
diff -u SOURCES/kernel-pax.patch:1.1.2.6 SOURCES/kernel-pax.patch:1.1.2.7
--- SOURCES/kernel-pax.patch:1.1.2.6 Wed May 7 11:47:37 2008
+++ SOURCES/kernel-pax.patch Wed May 7 11:48:23 2008
@@ -504,9 +504,9 @@
--- linux-2.6.24.6/arch/ia64/mm/fault.c 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24.6-pax/arch/ia64/mm/fault.c 2008-03-26 23:15:32.000000000 +0100
@@ -10,6 +10,7 @@
- #include <linux/interrupt.h>
#include <linux/kprobes.h>
#include <linux/kdebug.h>
+ #include <linux/vs_memory.h>
+#include <linux/binfmts.h>
#include <asm/pgtable.h>
@@ -19481,11 +19481,10 @@
diff -NurpX linux-2.6.24.6-pax/Documentation/dontdiff linux-2.6.24.6/include/linux/sysctl.h linux-2.6.24.6-pax/include/linux/sysctl.h
--- linux-2.6.24.6/include/linux/sysctl.h 2008-01-24 23:58:37.000000000 +0100
+++ linux-2.6.24.6-pax/include/linux/sysctl.h 2008-02-29 18:07:50.000000000 +0100
-@@ -166,7 +166,11 @@ enum
- KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
+@@ -166,6 +166,11 @@ enum
+
};
--
+#ifdef CONFIG_PAX_SOFTMODE
+enum {
+ PAX_SOFTMODE=1 /* PaX: disable/enable soft mode */
@@ -19596,23 +19595,27 @@
sys_close(fd);
if (len <= 0 || len == 32 || buf[len - 1] != '\n')
goto fail;
-@@ -145,8 +147,8 @@ dev_t name_to_dev_t(char *name)
- int part;
+@@ -147,12 +145,12 @@ dev_t name_to_dev_t(char *name)
+ int part, mount_result;
#ifdef CONFIG_SYSFS
- int mkdir_err = sys_mkdir("/sys", 0700);
-- if (sys_mount("sysfs", "/sys", "sysfs", 0, NULL) < 0)
+ int mkdir_err = sys_mkdir((char __user *)"/sys", 0700);
-+ if (sys_mount((char __user *)"sysfs", (char __user *)"/sys", (char __user *)"sysfs", 0, NULL) < 0)
+ /*
+ * When changing resume parameter for TuxOnIce, sysfs may
+ * already be mounted.
+ */
+- mount_result = sys_mount("sysfs", "/sys", "sysfs", 0, NULL);
++ mount_result = sys_mount((char __user *)"sysfs", (char __user *)"/sys", (char __user *)"sysfs", 0, NULL);
+ if (mount_result < 0 && mount_result != -EBUSY)
goto out;
#endif
-
-@@ -198,10 +200,10 @@ dev_t name_to_dev_t(char *name)
- res = try_name(s, part);
+@@ -206,10 +204,10 @@ dev_t name_to_dev_t(char *name)
done:
#ifdef CONFIG_SYSFS
-- sys_umount("/sys", 0);
-+ sys_umount((char __user *)"/sys", 0);
+ if (mount_result >= 0)
+- sys_umount("/sys", 0);
++ sys_umount((char __user *)"/sys", 0);
out:
if (!mkdir_err)
- sys_rmdir("/sys");
@@ -20801,15 +20804,6 @@
diff -NurpX linux-2.6.24.6-pax/Documentation/dontdiff linux-2.6.24.6/kernel/sysctl.c linux-2.6.24.6-pax/kernel/sysctl.c
--- linux-2.6.24.6/kernel/sysctl.c 2008-03-25 14:04:20.000000000 +0100
+++ linux-2.6.24.6-pax/kernel/sysctl.c 2008-03-25 14:04:56.000000000 +0100
-@@ -157,7 +157,7 @@ static int proc_dointvec_taint(struct ct
-
- static struct ctl_table root_table[];
- static struct ctl_table_header root_table_header =
-- { root_table, LIST_HEAD_INIT(root_table_header.ctl_entry) };
-+ { root_table, LIST_HEAD_INIT(root_table_header.ctl_entry), 0, NULL };
-
- static struct ctl_table kern_table[];
- static struct ctl_table vm_table[];
@@ -173,6 +173,21 @@ extern struct ctl_table inotify_table[];
int sysctl_legacy_va_layout;
#endif
@@ -21974,11 +21968,11 @@
+
}
out:
- mm->total_vm += len >> PAGE_SHIFT;
+ vx_vmpages_add(mm, len >> PAGE_SHIFT);
vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT);
+ track_exec_limit(mm, addr, addr + len, vm_flags);
if (vm_flags & VM_LOCKED) {
- mm->locked_vm += len >> PAGE_SHIFT;
+ vx_vmlocked_add(mm, len >> PAGE_SHIFT);
make_pages_present(addr, addr + len);
@@ -1212,6 +1383,12 @@ unmap_and_free_vma:
unmap_region(mm, vma, prev, vma->vm_start, vma->vm_end);
@@ -22295,7 +22289,7 @@
+ }
+#endif
+
- mm->total_vm -= nrpages;
+ vx_vmpages_sub(mm, nrpages);
if (vma->vm_flags & VM_LOCKED)
mm->locked_vm -= nrpages;
@@ -1763,6 +2037,16 @@ detach_vmas_to_be_unmapped(struct mm_str
@@ -22548,7 +22542,7 @@
locked += mm->locked_vm;
lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur;
lock_limit >>= PAGE_SHIFT;
-@@ -1973,22 +2400,22 @@ unsigned long do_brk(unsigned long addr,
+@@ -1973,23 +2400,23 @@ unsigned long do_brk(unsigned long addr,
/*
* Clear old maps. this also does some error checking for us
*/
@@ -22570,8 +22564,10 @@
if (mm->map_count > sysctl_max_map_count)
return -ENOMEM;
-- if (security_vm_enough_memory(len >> PAGE_SHIFT))
-+ if (security_vm_enough_memory(charged))
+- if (security_vm_enough_memory(len >> PAGE_SHIFT) ||
+- !vx_vmpages_avail(mm, len >> PAGE_SHIFT))
++ if (security_vm_enough_memory(charged) ||
++ !vx_vmpages_avail(mm, charged))
return -ENOMEM;
/* Can we just expand an old private anonymous mapping? */
@@ -22609,11 +22605,11 @@
+#endif
+
out:
-- mm->total_vm += len >> PAGE_SHIFT;
-+ mm->total_vm += charged;
+- vx_vmpages_add(mm, len >> PAGE_SHIFT);
++ vx_vmpages_add(mm, charged);
if (flags & VM_LOCKED) {
-- mm->locked_vm += len >> PAGE_SHIFT;
-+ mm->locked_vm += charged;
+- vx_vmlocked_add(mm, len >> PAGE_SHIFT);
++ vx_vmlocked_add(mm, charged);
make_pages_present(addr, addr + len);
}
+ track_exec_limit(mm, addr, addr + len, flags);
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-pax.patch?r1=1.1.2.6&r2=1.1.2.7&f=u
More information about the pld-cvs-commit
mailing list