pax patch
Jens Kasten <[email protected]>
| Newsgroups | gmane.linux.rsbac |
|---|---|
| Message-ID | <1255373184.24255.3.camel@jaschtschik-pc> |
hi list, here i have a pax patch which should work on the recent rsbac svn kernel patched with pax patch. http://pax.grsecurity.org/test/pax-linux-2.6.31.2-test15.patch its only a small fix. grüsse jens _______________________________________________ rsbac mailing list [email protected] http://www.rsbac.org/mailman/listinfo/rsbac
patch_after_pax.diff
(text/x-patch, 1.9 KB)
diff -u --recursive rsbac_2.6.31.2_r795/fs/exec.c rsbac_2.6.31.2_pax_r795/fs/exec.c
--- rsbac_2.6.31.2_r795/fs/exec.c 2009-10-11 20:58:27.280751933 +0200
+++ rsbac_2.6.31.2_pax_r795/fs/exec.c 2009-10-11 20:13:22.599876807 +0200
@@ -55,12 +55,23 @@
#include <linux/kmod.h>
#include <linux/fsnotify.h>
#include <linux/fs_struct.h>
+#include <linux/random.h>
+#include <linux/seq_file.h>
+#ifdef CONFIG_PAX_REFCOUNT
+#include <linux/kallsyms.h>
+#include <linux/kdebug.h>
+#endif
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>
#include "internal.h"
+#ifdef CONFIG_PAX_HOOK_ACL_FLAGS
+void (*pax_set_initial_flags_func)(struct linux_binprm *bprm);
+EXPORT_SYMBOL(pax_set_initial_flags_func);
+#endif
+
#include <rsbac/hooks.h>
int core_uses_pid;
diff -u --recursive rsbac_2.6.31.2_r795/init/do_mounts.c rsbac_2.6.31.2_pax_r795/init/do_mounts.c
--- rsbac_2.6.31.2_r795/init/do_mounts.c 2009-10-11 20:58:31.696817973 +0200
+++ rsbac_2.6.31.2_pax_r795/init/do_mounts.c 2009-10-11 20:31:20.174752354 +0200
@@ -423,8 +423,8 @@
mount_root();
out:
- sys_mount(".", "/", NULL, MS_MOVE, NULL);
- sys_chroot(".");
+ sys_mount((char __user *)".", (char __user *)"/", NULL, MS_MOVE, NULL);
+ sys_chroot((char __user *)".");
/* RSBAC: OK, most stuff initialized and root mounted: Init RSBAC. */
#ifdef CONFIG_RSBAC
diff -u --recursive rsbac_2.6.31.2_r795/mm/mprotect.c rsbac_2.6.31.2_pax_r795/mm/mprotect.c
--- rsbac_2.6.31.2_r795/mm/mprotect.c 2009-10-11 20:58:33.485751723 +0200
+++ rsbac_2.6.31.2_pax_r795/mm/mprotect.c 2009-10-11 20:32:29.689832490 +0200
@@ -24,10 +24,17 @@
#include <linux/mmu_notifier.h>
#include <linux/migrate.h>
#include <linux/perf_counter.h>
+
+#ifdef CONFIG_PAX_MPROTECT
+#include <linux/elf.h>
+#endif
+
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
+#include <asm/mmu_context.h>
+
#include <rsbac/hooks.h>
#ifndef pgprot_modify