diff -urNp linux-2.6.17.11/arch/alpha/kernel/module.c linux-2.6.17.11/arch/alpha/kernel/module.c
--- linux-2.6.17.11/arch/alpha/kernel/module.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/alpha/kernel/module.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/alpha/kernel/module.c 2006-09-01 16:20:28.000000000 -0400
@@ -177,7 +177,7 @@ apply_relocate_add(Elf64_Shdr *sechdrs,
/* The small sections were sorted to the end of the segment.
for (i = 0; i < n; i++) {
diff -urNp linux-2.6.17.11/arch/alpha/kernel/osf_sys.c linux-2.6.17.11/arch/alpha/kernel/osf_sys.c
--- linux-2.6.17.11/arch/alpha/kernel/osf_sys.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/alpha/kernel/osf_sys.c 2006-08-12 08:17:55.000000000 -0400
-@@ -1273,6 +1273,10 @@ arch_get_unmapped_area(struct file *filp
++++ linux-2.6.17.11/arch/alpha/kernel/osf_sys.c 2006-09-01 16:20:28.000000000 -0400
+@@ -1278,6 +1278,10 @@ arch_get_unmapped_area(struct file *filp
merely specific addresses, but regions of memory -- perhaps
this feature should be incorporated into all ports? */
if (addr) {
addr = arch_get_unmapped_area_1 (PAGE_ALIGN(addr), len, limit);
if (addr != (unsigned long) -ENOMEM)
-@@ -1280,8 +1284,8 @@ arch_get_unmapped_area(struct file *filp
+@@ -1285,8 +1289,8 @@ arch_get_unmapped_area(struct file *filp
}
/* Next, try allocating at TASK_UNMAPPED_BASE. */
diff -urNp linux-2.6.17.11/arch/alpha/kernel/ptrace.c linux-2.6.17.11/arch/alpha/kernel/ptrace.c
--- linux-2.6.17.11/arch/alpha/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/alpha/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
-@@ -15,6 +15,7 @@
++++ linux-2.6.17.11/arch/alpha/kernel/ptrace.c 2006-09-01 16:20:28.000000000 -0400
+@@ -16,6 +16,7 @@
#include <linux/security.h>
#include <linux/signal.h>
#include <linux/vs_pid.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
-@@ -283,6 +284,9 @@ do_sys_ptrace(long request, long pid, lo
- goto out_notsk;
+@@ -289,6 +290,9 @@ do_sys_ptrace(long request, long pid, lo
+ goto out;
}
+ if (gr_handle_ptrace(child, request))
goto out;
diff -urNp linux-2.6.17.11/arch/alpha/mm/fault.c linux-2.6.17.11/arch/alpha/mm/fault.c
--- linux-2.6.17.11/arch/alpha/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/alpha/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/alpha/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -25,6 +25,7 @@
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
diff -urNp linux-2.6.17.11/arch/arm/mm/mmap.c linux-2.6.17.11/arch/arm/mm/mmap.c
--- linux-2.6.17.11/arch/arm/mm/mmap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/arm/mm/mmap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/arm/mm/mmap.c 2006-09-01 16:20:28.000000000 -0400
@@ -62,6 +62,10 @@ arch_get_unmapped_area(struct file *filp
if (len > TASK_SIZE)
return -ENOMEM;
}
diff -urNp linux-2.6.17.11/arch/i386/boot/compressed/head.S linux-2.6.17.11/arch/i386/boot/compressed/head.S
--- linux-2.6.17.11/arch/i386/boot/compressed/head.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/boot/compressed/head.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/boot/compressed/head.S 2006-09-01 16:20:28.000000000 -0400
@@ -39,11 +39,13 @@ startup_32:
movl %eax,%gs
* Initialize eflags. Some BIOS's leave bits like NT set. This would
diff -urNp linux-2.6.17.11/arch/i386/Kconfig linux-2.6.17.11/arch/i386/Kconfig
--- linux-2.6.17.11/arch/i386/Kconfig 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/Kconfig 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/Kconfig 2006-09-01 16:20:28.000000000 -0400
@@ -948,7 +948,7 @@ config PCI
choice
prompt "PCI access mode"
config PCI_DIRECT
diff -urNp linux-2.6.17.11/arch/i386/Kconfig.cpu linux-2.6.17.11/arch/i386/Kconfig.cpu
--- linux-2.6.17.11/arch/i386/Kconfig.cpu 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/Kconfig.cpu 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/Kconfig.cpu 2006-09-01 16:20:28.000000000 -0400
@@ -251,7 +251,7 @@ config X86_PPRO_FENCE
config X86_F00F_BUG
config X86_GOOD_APIC
diff -urNp linux-2.6.17.11/arch/i386/Kconfig.debug linux-2.6.17.11/arch/i386/Kconfig.debug
--- linux-2.6.17.11/arch/i386/Kconfig.debug 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/Kconfig.debug 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/Kconfig.debug 2006-09-01 16:20:28.000000000 -0400
@@ -53,7 +53,7 @@ config DEBUG_PAGEALLOC
config DEBUG_RODATA
in order to catch accidental (and incorrect) writes to such const
diff -urNp linux-2.6.17.11/arch/i386/kernel/acpi/sleep.c linux-2.6.17.11/arch/i386/kernel/acpi/sleep.c
--- linux-2.6.17.11/arch/i386/kernel/acpi/sleep.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/acpi/sleep.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/acpi/sleep.c 2006-09-01 16:20:28.000000000 -0400
@@ -10,6 +10,7 @@
#include <linux/dmi.h>
#include <asm/smp.h>
/**
diff -urNp linux-2.6.17.11/arch/i386/kernel/alternative.c linux-2.6.17.11/arch/i386/kernel/alternative.c
--- linux-2.6.17.11/arch/i386/kernel/alternative.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/alternative.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/alternative.c 2006-09-01 16:20:28.000000000 -0400
@@ -3,6 +3,7 @@
#include <linux/list.h>
#include <asm/alternative.h>
struct smp_alt_module {
diff -urNp linux-2.6.17.11/arch/i386/kernel/apic.c linux-2.6.17.11/arch/i386/kernel/apic.c
--- linux-2.6.17.11/arch/i386/kernel/apic.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/apic.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/apic.c 2006-09-01 16:20:28.000000000 -0400
@@ -1176,7 +1176,7 @@ inline void smp_local_timer_interrupt(st
{
profile_tick(CPU_PROFILING, regs);
/*
diff -urNp linux-2.6.17.11/arch/i386/kernel/apm.c linux-2.6.17.11/arch/i386/kernel/apm.c
--- linux-2.6.17.11/arch/i386/kernel/apm.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/apm.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/apm.c 2006-09-01 16:20:28.000000000 -0400
@@ -235,7 +235,7 @@
#include "io_ports.h"
0xbc, 0x00, 0xf0, /* movw $0xf000,sp */
diff -urNp linux-2.6.17.11/arch/i386/kernel/asm-offsets.c linux-2.6.17.11/arch/i386/kernel/asm-offsets.c
--- linux-2.6.17.11/arch/i386/kernel/asm-offsets.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/asm-offsets.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/asm-offsets.c 2006-09-01 16:20:28.000000000 -0400
@@ -68,5 +68,6 @@ void foo(void)
sizeof(struct tss_struct));
}
diff -urNp linux-2.6.17.11/arch/i386/kernel/cpu/common.c linux-2.6.17.11/arch/i386/kernel/cpu/common.c
--- linux-2.6.17.11/arch/i386/kernel/cpu/common.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/cpu/common.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/cpu/common.c 2006-09-01 16:20:28.000000000 -0400
@@ -4,7 +4,6 @@
#include <linux/smp.h>
#include <linux/module.h>
set_debugreg(0, 0);
diff -urNp linux-2.6.17.11/arch/i386/kernel/crash.c linux-2.6.17.11/arch/i386/kernel/crash.c
--- linux-2.6.17.11/arch/i386/kernel/crash.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/crash.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/crash.c 2006-09-01 16:20:28.000000000 -0400
@@ -105,7 +105,7 @@ static int crash_nmi_callback(struct pt_
return 1;
local_irq_disable();
}
diff -urNp linux-2.6.17.11/arch/i386/kernel/doublefault.c linux-2.6.17.11/arch/i386/kernel/doublefault.c
--- linux-2.6.17.11/arch/i386/kernel/doublefault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/doublefault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/doublefault.c 2006-09-01 16:20:28.000000000 -0400
@@ -11,7 +11,7 @@
#define DOUBLEFAULT_STACKSIZE (1024)
};
diff -urNp linux-2.6.17.11/arch/i386/kernel/efi.c linux-2.6.17.11/arch/i386/kernel/efi.c
--- linux-2.6.17.11/arch/i386/kernel/efi.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/efi.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/efi.c 2006-09-01 16:20:28.000000000 -0400
@@ -64,82 +64,43 @@ extern void * boot_ioremap(unsigned long
static unsigned long efi_rt_eflags;
efi_status_t status;
diff -urNp linux-2.6.17.11/arch/i386/kernel/efi_stub.S linux-2.6.17.11/arch/i386/kernel/efi_stub.S
--- linux-2.6.17.11/arch/i386/kernel/efi_stub.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/efi_stub.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/efi_stub.S 2006-09-01 16:20:28.000000000 -0400
@@ -7,6 +7,7 @@
#include <linux/config.h>
efi_rt_function_ptr:
diff -urNp linux-2.6.17.11/arch/i386/kernel/entry.S linux-2.6.17.11/arch/i386/kernel/entry.S
--- linux-2.6.17.11/arch/i386/kernel/entry.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/entry.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/entry.S 2006-09-01 16:20:28.000000000 -0400
@@ -82,7 +82,7 @@ VM_MASK = 0x00020000
#define resume_kernel restore_nocheck
#endif
syscall_table_size=(.-sys_call_table)
diff -urNp linux-2.6.17.11/arch/i386/kernel/head.S linux-2.6.17.11/arch/i386/kernel/head.S
--- linux-2.6.17.11/arch/i386/kernel/head.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/head.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/head.S 2006-09-01 16:20:31.000000000 -0400
@@ -46,6 +46,16 @@
*/
#define INIT_MAP_BEYOND_END (128*1024)
movl %eax,%ds
movl %eax,%es
-@@ -378,13 +426,35 @@ rp_sidt:
- addl $8,%edi
- dec %ecx
- jne rp_sidt
-+
-+ lea ignore_int_error_code,%edx
-+ movw %dx,%ax /* selector = 0x0010 = cs */
-+ movw $0x8E00,%dx /* interrupt gate - dpl=0, present */
-+
-+ lea idt_table,%edi
-+ movl %eax,8*8(%edi)
-+ movl %edx,8*8+4(%edi)
-+ movl %eax,10*8(%edi)
-+ movl %edx,10*8+4(%edi)
-+ movl %eax,11*8(%edi)
-+ movl %edx,11*8+4(%edi)
-+ movl %eax,12*8(%edi)
-+ movl %edx,12*8+4(%edi)
-+ movl %eax,13*8(%edi)
-+ movl %edx,13*8+4(%edi)
-+ movl %eax,14*8(%edi)
-+ movl %edx,14*8+4(%edi)
-+ movl %eax,17*8(%edi)
-+ movl %edx,17*8+4(%edi)
- ret
-
+@@ -383,63 +431,71 @@ rp_sidt:
/* This is the default interrupt "handler" :-) */
ALIGN
-+ignore_int_error_code:
-+ addl $4,%esp
ignore_int:
- cld
#ifdef CONFIG_PRINTK
+- pushl %eax
+- pushl %ecx
+- pushl %edx
+- pushl %es
+- pushl %ds
+ cld
- pushl %eax
- pushl %ecx
- pushl %edx
-@@ -393,17 +463,16 @@ ignore_int:
movl $(__KERNEL_DS),%eax
movl %eax,%ds
movl %eax,%es
- pushl 24(%esp)
- pushl 32(%esp)
- pushl 40(%esp)
-+ pushl 28(%esp)
-+ pushl 28(%esp)
-+ pushl 28(%esp)
++ pushl 12(%esp)
++ pushl 12(%esp)
++ pushl 12(%esp)
++ pushl 12(%esp)
pushl $int_msg
#ifdef CONFIG_EARLY_PRINTK
call early_printk
call printk
#endif
- addl $(5*4),%esp
-+ addl $(4*4),%esp
- popl %ds
- popl %es
- popl %edx
-@@ -412,32 +481,50 @@ ignore_int:
+- popl %ds
+- popl %es
+- popl %edx
+- popl %ecx
+- popl %eax
#endif
- iret
+- iret
++1: hlt
++ jmp 1b
-/*
- * Real beginning of normal "text" segment
-ready: .byte 0
-
int_msg:
- .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
+- .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
++ .asciz "Unknown interrupt, stack: %p %p %p %p\n"
-@@ -465,10 +552,12 @@ idt_descr:
+ /*
+ * The IDT and GDT 'descriptors' are a strange 48-bit object
+@@ -465,10 +521,12 @@ idt_descr:
# boot GDT descriptor (later on used by CPU#0):
.word 0 # 32 bit align gdt_desc.address
/*
* The boot_gdt_table must mirror the equivalent in setup.S and is
* used only for booting.
-@@ -476,13 +565,13 @@ cpu_gdt_descr:
+@@ -476,13 +534,13 @@ cpu_gdt_descr:
.align L1_CACHE_BYTES
ENTRY(boot_gdt_table)
.fill GDT_ENTRY_BOOT_CS,8,0
ENTRY(cpu_gdt_table)
.quad 0x0000000000000000 /* NULL descriptor */
.quad 0x0000000000000000 /* 0x0b reserved */
-@@ -497,10 +586,10 @@ ENTRY(cpu_gdt_table)
+@@ -497,10 +555,10 @@ ENTRY(cpu_gdt_table)
.quad 0x0000000000000000 /* 0x53 reserved */
.quad 0x0000000000000000 /* 0x5b reserved */
.quad 0x0000000000000000 /* 0x80 TSS descriptor */
.quad 0x0000000000000000 /* 0x88 LDT descriptor */
-@@ -510,24 +599,30 @@ ENTRY(cpu_gdt_table)
+@@ -510,24 +568,30 @@ ENTRY(cpu_gdt_table)
* They code segments and data segments have fixed 64k limits,
* the transfer segment sizes are set at run time.
*/
+#endif
diff -urNp linux-2.6.17.11/arch/i386/kernel/i386_ksyms.c linux-2.6.17.11/arch/i386/kernel/i386_ksyms.c
--- linux-2.6.17.11/arch/i386/kernel/i386_ksyms.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/i386_ksyms.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/i386_ksyms.c 2006-09-01 16:20:28.000000000 -0400
@@ -3,12 +3,16 @@
#include <asm/checksum.h>
#include <asm/desc.h>
EXPORT_SYMBOL(__get_user_2);
diff -urNp linux-2.6.17.11/arch/i386/kernel/init_task.c linux-2.6.17.11/arch/i386/kernel/init_task.c
--- linux-2.6.17.11/arch/i386/kernel/init_task.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/init_task.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/init_task.c 2006-09-01 16:20:28.000000000 -0400
@@ -42,5 +42,5 @@ EXPORT_SYMBOL(init_task);
* per-CPU TSS segments. Threads are completely 'soft' on Linux,
* no more per-task TSS's.
diff -urNp linux-2.6.17.11/arch/i386/kernel/ioport.c linux-2.6.17.11/arch/i386/kernel/ioport.c
--- linux-2.6.17.11/arch/i386/kernel/ioport.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/ioport.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/ioport.c 2006-09-01 16:20:28.000000000 -0400
@@ -16,6 +16,7 @@
#include <linux/stddef.h>
#include <linux/slab.h>
regs->eflags = (regs->eflags & ~X86_EFLAGS_IOPL) | t->iopl;
diff -urNp linux-2.6.17.11/arch/i386/kernel/irq.c linux-2.6.17.11/arch/i386/kernel/irq.c
--- linux-2.6.17.11/arch/i386/kernel/irq.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/irq.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/irq.c 2006-09-01 16:20:28.000000000 -0400
@@ -91,7 +91,7 @@ fastcall unsigned int do_IRQ(struct pt_r
int arg1, arg2, ebx;
" xchgl %%ebx,%%esp \n"
diff -urNp linux-2.6.17.11/arch/i386/kernel/ldt.c linux-2.6.17.11/arch/i386/kernel/ldt.c
--- linux-2.6.17.11/arch/i386/kernel/ldt.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/ldt.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/ldt.c 2006-09-01 16:20:28.000000000 -0400
@@ -103,6 +103,19 @@ int init_new_context(struct task_struct
retval = copy_ldt(&mm->context, &old_mm->context);
up(&old_mm->context.sem);
if (oldmode)
diff -urNp linux-2.6.17.11/arch/i386/kernel/module.c linux-2.6.17.11/arch/i386/kernel/module.c
--- linux-2.6.17.11/arch/i386/kernel/module.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/module.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/module.c 2006-09-01 16:20:28.000000000 -0400
@@ -21,6 +21,7 @@
#include <linux/fs.h>
#include <linux/string.h>
printk(KERN_ERR "module %s: Unknown relocation: %u\n",
diff -urNp linux-2.6.17.11/arch/i386/kernel/process.c linux-2.6.17.11/arch/i386/kernel/process.c
--- linux-2.6.17.11/arch/i386/kernel/process.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/process.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/process.c 2006-09-01 16:20:28.000000000 -0400
@@ -69,7 +69,7 @@ EXPORT_SYMBOL(boot_option_idle_override)
*/
unsigned long thread_saved_pc(struct task_struct *tsk)
}
/*
-@@ -294,7 +294,7 @@ void show_regs(struct pt_regs * regs)
- printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
+@@ -296,7 +296,7 @@ void show_regs(struct pt_regs * regs)
+ 0xffff & regs->xcs,regs->eip, smp_processor_id());
print_symbol("EIP is at %s\n", regs->eip);
- if (user_mode_vm(regs))
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s (%s %.*s)\n",
regs->eflags, print_tainted(), system_utsname.release,
-@@ -343,8 +343,8 @@ int kernel_thread(int (*fn)(void *), voi
+@@ -345,8 +345,8 @@ int kernel_thread(int (*fn)(void *), voi
regs.ebx = (unsigned long) fn;
regs.edx = (unsigned long) arg;
regs.orig_eax = -1;
regs.eip = (unsigned long) kernel_thread_helper;
regs.xcs = __KERNEL_CS;
-@@ -366,7 +366,7 @@ void exit_thread(void)
+@@ -369,7 +369,7 @@ void exit_thread(void)
/* The process may have allocated an io port bitmap... nuke it. */
if (unlikely(NULL != t->io_bitmap_ptr)) {
int cpu = get_cpu();
kfree(t->io_bitmap_ptr);
t->io_bitmap_ptr = NULL;
-@@ -386,6 +386,9 @@ void flush_thread(void)
+@@ -389,6 +389,9 @@ void flush_thread(void)
{
struct task_struct *tsk = current;
memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));
/*
-@@ -418,7 +421,7 @@ int copy_thread(int nr, unsigned long cl
+@@ -421,7 +424,7 @@ int copy_thread(int nr, unsigned long cl
struct task_struct *tsk;
int err;
*childregs = *regs;
childregs->eax = 0;
childregs->esp = esp;
-@@ -461,6 +464,11 @@ int copy_thread(int nr, unsigned long cl
+@@ -464,6 +467,11 @@ int copy_thread(int nr, unsigned long cl
if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
goto out;
desc = p->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
desc->a = LDT_entry_a(&info);
desc->b = LDT_entry_b(&info);
-@@ -625,7 +633,11 @@ struct task_struct fastcall * __switch_t
+@@ -628,7 +636,11 @@ struct task_struct fastcall * __switch_t
struct thread_struct *prev = &prev_p->thread,
*next = &next_p->thread;
int cpu = smp_processor_id();
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
-@@ -648,11 +660,23 @@ struct task_struct fastcall * __switch_t
+@@ -651,11 +663,23 @@ struct task_struct fastcall * __switch_t
savesegment(fs, prev->fs);
savesegment(gs, prev->gs);
/*
* Restore %fs and %gs if needed.
*
-@@ -806,8 +830,18 @@ asmlinkage int sys_set_thread_area(struc
+@@ -809,8 +833,18 @@ asmlinkage int sys_set_thread_area(struc
struct desc_struct *desc;
int cpu, idx;
idx = info.entry_number;
/*
-@@ -839,8 +873,17 @@ asmlinkage int sys_set_thread_area(struc
+@@ -842,8 +876,17 @@ asmlinkage int sys_set_thread_area(struc
desc->a = LDT_entry_a(&info);
desc->b = LDT_entry_b(&info);
}
put_cpu();
return 0;
-@@ -896,9 +939,27 @@ asmlinkage int sys_get_thread_area(struc
+@@ -899,9 +942,27 @@ asmlinkage int sys_get_thread_area(struc
return 0;
}
+#endif
diff -urNp linux-2.6.17.11/arch/i386/kernel/ptrace.c linux-2.6.17.11/arch/i386/kernel/ptrace.c
--- linux-2.6.17.11/arch/i386/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/ptrace.c 2006-09-01 16:20:28.000000000 -0400
@@ -17,6 +17,7 @@
#include <linux/audit.h>
#include <linux/seccomp.h>
force_sig_info(SIGTRAP, &info, tsk);
diff -urNp linux-2.6.17.11/arch/i386/kernel/reboot.c linux-2.6.17.11/arch/i386/kernel/reboot.c
--- linux-2.6.17.11/arch/i386/kernel/reboot.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/reboot.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/reboot.c 2006-09-01 16:20:28.000000000 -0400
@@ -25,7 +25,7 @@
void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
mach_reboot();
diff -urNp linux-2.6.17.11/arch/i386/kernel/setup.c linux-2.6.17.11/arch/i386/kernel/setup.c
--- linux-2.6.17.11/arch/i386/kernel/setup.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/setup.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/setup.c 2006-09-01 16:20:28.000000000 -0400
@@ -88,7 +88,11 @@ struct cpuinfo_x86 new_cpu_data __initda
struct cpuinfo_x86 boot_cpu_data __read_mostly = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
EXPORT_SYMBOL(boot_cpu_data);
parse_cmdline_early(cmdline_p);
diff -urNp linux-2.6.17.11/arch/i386/kernel/signal.c linux-2.6.17.11/arch/i386/kernel/signal.c
--- linux-2.6.17.11/arch/i386/kernel/signal.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/signal.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/signal.c 2006-09-01 16:20:28.000000000 -0400
@@ -351,7 +351,17 @@ static int setup_frame(int sig, struct k
goto give_sigsegv;
}
if (test_thread_flag(TIF_RESTORE_SIGMASK))
diff -urNp linux-2.6.17.11/arch/i386/kernel/smpboot.c linux-2.6.17.11/arch/i386/kernel/smpboot.c
--- linux-2.6.17.11/arch/i386/kernel/smpboot.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/smpboot.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/smpboot.c 2006-09-01 16:20:28.000000000 -0400
@@ -1069,7 +1069,7 @@ static int __cpuinit __smp_prepare_cpu(i
/* init low mem mapping */
wait_for_completion(&done);
diff -urNp linux-2.6.17.11/arch/i386/kernel/syscall_table.S linux-2.6.17.11/arch/i386/kernel/syscall_table.S
--- linux-2.6.17.11/arch/i386/kernel/syscall_table.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/syscall_table.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/syscall_table.S 2006-09-01 16:20:28.000000000 -0400
@@ -1,3 +1,4 @@
+.section .rodata,"a",@progbits
ENTRY(sys_call_table)
.long sys_exit
diff -urNp linux-2.6.17.11/arch/i386/kernel/sysenter.c linux-2.6.17.11/arch/i386/kernel/sysenter.c
--- linux-2.6.17.11/arch/i386/kernel/sysenter.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/sysenter.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/sysenter.c 2006-09-01 16:20:28.000000000 -0400
@@ -24,7 +24,7 @@ extern asmlinkage void sysenter_entry(vo
void enable_sep_cpu(void)
{
}
diff -urNp linux-2.6.17.11/arch/i386/kernel/sys_i386.c linux-2.6.17.11/arch/i386/kernel/sys_i386.c
--- linux-2.6.17.11/arch/i386/kernel/sys_i386.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/sys_i386.c 2006-08-12 08:17:55.000000000 -0400
-@@ -99,6 +99,191 @@ out:
++++ linux-2.6.17.11/arch/i386/kernel/sys_i386.c 2006-09-01 16:20:28.000000000 -0400
+@@ -100,6 +100,191 @@ out:
return err;
}
unsigned long n;
diff -urNp linux-2.6.17.11/arch/i386/kernel/traps.c linux-2.6.17.11/arch/i386/kernel/traps.c
--- linux-2.6.17.11/arch/i386/kernel/traps.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/traps.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/traps.c 2006-09-01 16:20:31.000000000 -0400
@@ -28,6 +28,7 @@
#include <linux/utsname.h>
#include <linux/kprobes.h>
if (ud2 != 0x0b0f)
goto no_bug;
- if (__get_user(line, (unsigned short __user *)(eip + 2)))
-+ if (__get_user(line, (unsigned short __user *)(eip + 3)))
++ if (__get_user(line, (unsigned short __user *)(eip + 7)))
goto bug;
- if (__get_user(file, (char * __user *)(eip + 4)) ||
- (unsigned long)file < PAGE_OFFSET || __get_user(c, file))
-+ if (__get_user(file, (char * __user *)(eip + 8)) || file < _text + __KERNEL_TEXT_OFFSET)
++ if (__get_user(file, (char * __user *)(eip + 3)) || file < _text + __KERNEL_TEXT_OFFSET)
+ goto bug;
+ if (__get_user(c, file))
file = "<bad filename>";
/*
diff -urNp linux-2.6.17.11/arch/i386/kernel/vm86.c linux-2.6.17.11/arch/i386/kernel/vm86.c
--- linux-2.6.17.11/arch/i386/kernel/vm86.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/vm86.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/vm86.c 2006-09-01 16:20:28.000000000 -0400
@@ -123,7 +123,7 @@ struct pt_regs * fastcall save_v86_state
do_exit(SIGSEGV);
}
tsk->thread.sysenter_cs = 0;
diff -urNp linux-2.6.17.11/arch/i386/kernel/vmlinux.lds.S linux-2.6.17.11/arch/i386/kernel/vmlinux.lds.S
--- linux-2.6.17.11/arch/i386/kernel/vmlinux.lds.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/kernel/vmlinux.lds.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/kernel/vmlinux.lds.S 2006-09-01 16:20:28.000000000 -0400
@@ -4,10 +4,19 @@
#define LOAD_OFFSET __PAGE_OFFSET
*(.bss.page_aligned)
diff -urNp linux-2.6.17.11/arch/i386/lib/checksum.S linux-2.6.17.11/arch/i386/lib/checksum.S
--- linux-2.6.17.11/arch/i386/lib/checksum.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/lib/checksum.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/lib/checksum.S 2006-09-01 16:20:28.000000000 -0400
@@ -27,7 +27,8 @@
#include <linux/config.h>
popl %ebx
diff -urNp linux-2.6.17.11/arch/i386/lib/getuser.S linux-2.6.17.11/arch/i386/lib/getuser.S
--- linux-2.6.17.11/arch/i386/lib/getuser.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/lib/getuser.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/lib/getuser.S 2006-09-01 16:20:28.000000000 -0400
@@ -9,6 +9,7 @@
* return value.
*/
ret
diff -urNp linux-2.6.17.11/arch/i386/lib/mmx.c linux-2.6.17.11/arch/i386/lib/mmx.c
--- linux-2.6.17.11/arch/i386/lib/mmx.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/lib/mmx.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/lib/mmx.c 2006-09-01 16:20:28.000000000 -0400
@@ -48,14 +48,30 @@ void *_mmx_memcpy(void *to, const void *
" prefetch 256(%0)\n"
"2: \n"
}
diff -urNp linux-2.6.17.11/arch/i386/lib/putuser.S linux-2.6.17.11/arch/i386/lib/putuser.S
--- linux-2.6.17.11/arch/i386/lib/putuser.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/lib/putuser.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/lib/putuser.S 2006-09-01 16:20:28.000000000 -0400
@@ -9,6 +9,7 @@
* return value.
*/
diff -urNp linux-2.6.17.11/arch/i386/lib/usercopy.c linux-2.6.17.11/arch/i386/lib/usercopy.c
--- linux-2.6.17.11/arch/i386/lib/usercopy.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/lib/usercopy.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/lib/usercopy.c 2006-09-01 16:20:28.000000000 -0400
@@ -33,6 +33,7 @@ do { \
int __d0, __d1, __d2; \
might_sleep(); \
+EXPORT_SYMBOL(set_fs);
diff -urNp linux-2.6.17.11/arch/i386/mach-voyager/voyager_smp.c linux-2.6.17.11/arch/i386/mach-voyager/voyager_smp.c
--- linux-2.6.17.11/arch/i386/mach-voyager/voyager_smp.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mach-voyager/voyager_smp.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mach-voyager/voyager_smp.c 2006-09-01 16:20:28.000000000 -0400
@@ -1295,7 +1295,7 @@ smp_local_timer_interrupt(struct pt_regs
per_cpu(prof_counter, cpu);
}
if( ((1<<cpu) & voyager_extended_vic_processors) == 0)
diff -urNp linux-2.6.17.11/arch/i386/mm/boot_ioremap.c linux-2.6.17.11/arch/i386/mm/boot_ioremap.c
--- linux-2.6.17.11/arch/i386/mm/boot_ioremap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mm/boot_ioremap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mm/boot_ioremap.c 2006-09-01 16:20:28.000000000 -0400
@@ -8,53 +8,37 @@
*/
diff -urNp linux-2.6.17.11/arch/i386/mm/extable.c linux-2.6.17.11/arch/i386/mm/extable.c
--- linux-2.6.17.11/arch/i386/mm/extable.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mm/extable.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mm/extable.c 2006-09-01 16:20:28.000000000 -0400
@@ -12,7 +12,7 @@ int fixup_exception(struct pt_regs *regs
const struct exception_table_entry *fixup;
extern u32 pnp_bios_is_utter_crap;
diff -urNp linux-2.6.17.11/arch/i386/mm/fault.c linux-2.6.17.11/arch/i386/mm/fault.c
--- linux-2.6.17.11/arch/i386/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -22,6 +22,9 @@
#include <linux/highmem.h>
#include <linux/module.h>
+#endif
diff -urNp linux-2.6.17.11/arch/i386/mm/hugetlbpage.c linux-2.6.17.11/arch/i386/mm/hugetlbpage.c
--- linux-2.6.17.11/arch/i386/mm/hugetlbpage.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mm/hugetlbpage.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mm/hugetlbpage.c 2006-09-01 16:20:28.000000000 -0400
@@ -121,7 +121,12 @@ static unsigned long hugetlb_get_unmappe
{
struct mm_struct *mm = current->mm;
}
diff -urNp linux-2.6.17.11/arch/i386/mm/init.c linux-2.6.17.11/arch/i386/mm/init.c
--- linux-2.6.17.11/arch/i386/mm/init.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mm/init.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mm/init.c 2006-09-01 16:20:28.000000000 -0400
@@ -41,6 +41,7 @@
#include <asm/tlb.h>
#include <asm/tlbflush.h>
-#endif
}
- #ifdef CONFIG_SOFTWARE_SUSPEND
+ #ifdef CONFIG_SUSPEND_SHARED
@@ -423,7 +393,6 @@ void zap_low_mappings (void)
flush_tlb_all();
}
(unsigned long)(&__init_end));
diff -urNp linux-2.6.17.11/arch/i386/mm/mmap.c linux-2.6.17.11/arch/i386/mm/mmap.c
--- linux-2.6.17.11/arch/i386/mm/mmap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mm/mmap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mm/mmap.c 2006-09-01 16:20:28.000000000 -0400
@@ -34,12 +34,18 @@
* Leave an at least ~128 MB hole.
*/
}
diff -urNp linux-2.6.17.11/arch/i386/mm/pageattr.c linux-2.6.17.11/arch/i386/mm/pageattr.c
--- linux-2.6.17.11/arch/i386/mm/pageattr.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/mm/pageattr.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/mm/pageattr.c 2006-09-01 16:20:28.000000000 -0400
@@ -14,6 +14,7 @@
#include <asm/tlbflush.h>
#include <asm/pgalloc.h>
if (!split)
diff -urNp linux-2.6.17.11/arch/i386/oprofile/backtrace.c linux-2.6.17.11/arch/i386/oprofile/backtrace.c
--- linux-2.6.17.11/arch/i386/oprofile/backtrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/oprofile/backtrace.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/oprofile/backtrace.c 2006-09-01 16:20:28.000000000 -0400
@@ -116,7 +116,7 @@ x86_backtrace(struct pt_regs * const reg
head = (struct frame_head *)regs->ebp;
#endif
return;
diff -urNp linux-2.6.17.11/arch/i386/power/cpu.c linux-2.6.17.11/arch/i386/power/cpu.c
--- linux-2.6.17.11/arch/i386/power/cpu.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/i386/power/cpu.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/i386/power/cpu.c 2006-09-01 16:20:28.000000000 -0400
@@ -62,7 +62,7 @@ static void do_fpu_end(void)
static void fix_processor_context(void)
{
diff -urNp linux-2.6.17.11/arch/ia64/ia32/binfmt_elf32.c linux-2.6.17.11/arch/ia64/ia32/binfmt_elf32.c
--- linux-2.6.17.11/arch/ia64/ia32/binfmt_elf32.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/ia64/ia32/binfmt_elf32.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/ia64/ia32/binfmt_elf32.c 2006-09-01 16:20:28.000000000 -0400
@@ -46,6 +46,17 @@ randomize_stack_top(unsigned long stack_
#define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack))
diff -urNp linux-2.6.17.11/arch/ia64/ia32/ia32priv.h linux-2.6.17.11/arch/ia64/ia32/ia32priv.h
--- linux-2.6.17.11/arch/ia64/ia32/ia32priv.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/ia64/ia32/ia32priv.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/ia64/ia32/ia32priv.h 2006-09-01 16:20:28.000000000 -0400
@@ -305,7 +305,14 @@ struct old_linux32_dirent {
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386
diff -urNp linux-2.6.17.11/arch/ia64/kernel/module.c linux-2.6.17.11/arch/ia64/kernel/module.c
--- linux-2.6.17.11/arch/ia64/kernel/module.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/ia64/kernel/module.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/ia64/kernel/module.c 2006-09-01 16:20:28.000000000 -0400
@@ -322,7 +322,7 @@ module_alloc (unsigned long size)
void
module_free (struct module *mod, void *module_region)
}
diff -urNp linux-2.6.17.11/arch/ia64/kernel/ptrace.c linux-2.6.17.11/arch/ia64/kernel/ptrace.c
--- linux-2.6.17.11/arch/ia64/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/ia64/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
-@@ -18,6 +18,7 @@
++++ linux-2.6.17.11/arch/ia64/kernel/ptrace.c 2006-09-01 16:20:28.000000000 -0400
+@@ -19,6 +19,7 @@
#include <linux/audit.h>
#include <linux/signal.h>
#include <linux/vs_pid.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
-@@ -1447,6 +1448,9 @@ sys_ptrace (long request, pid_t pid, uns
+@@ -1451,6 +1452,9 @@ sys_ptrace (long request, pid_t pid, uns
if (pid == 1) /* no messing around with init! */
goto out_tsk;
goto out_tsk;
diff -urNp linux-2.6.17.11/arch/ia64/kernel/sys_ia64.c linux-2.6.17.11/arch/ia64/kernel/sys_ia64.c
--- linux-2.6.17.11/arch/ia64/kernel/sys_ia64.c 2006-08-23 19:30:00.000000000 -0400
-+++ linux-2.6.17.11/arch/ia64/kernel/sys_ia64.c 2006-08-23 19:30:12.000000000 -0400
++++ linux-2.6.17.11/arch/ia64/kernel/sys_ia64.c 2006-09-01 16:20:28.000000000 -0400
@@ -38,6 +38,13 @@ arch_get_unmapped_area (struct file *fil
if (REGION_NUMBER(addr) == RGN_HPAGE)
addr = 0;
return -ENOMEM;
diff -urNp linux-2.6.17.11/arch/ia64/mm/fault.c linux-2.6.17.11/arch/ia64/mm/fault.c
--- linux-2.6.17.11/arch/ia64/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/ia64/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
-@@ -10,6 +10,7 @@
- #include <linux/smp_lock.h>
++++ linux-2.6.17.11/arch/ia64/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
+@@ -11,6 +11,7 @@
#include <linux/interrupt.h>
#include <linux/kprobes.h>
+ #include <linux/vs_memory.h>
+#include <linux/binfmts.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
-@@ -51,6 +52,23 @@ mapped_kernel_page_is_present (unsigned
+@@ -52,6 +53,23 @@ mapped_kernel_page_is_present (unsigned
return pte_present(pte);
}
void __kprobes
ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *regs)
{
-@@ -116,9 +134,23 @@ ia64_do_page_fault (unsigned long addres
+@@ -117,9 +135,23 @@ ia64_do_page_fault (unsigned long addres
| (((isr >> IA64_ISR_W_BIT) & 1UL) << VM_WRITE_BIT)
| (((isr >> IA64_ISR_R_BIT) & 1UL) << VM_READ_BIT));
* If for any reason at all we couldn't handle the fault, make
diff -urNp linux-2.6.17.11/arch/ia64/mm/init.c linux-2.6.17.11/arch/ia64/mm/init.c
--- linux-2.6.17.11/arch/ia64/mm/init.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/ia64/mm/init.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/ia64/mm/init.c 2006-09-01 16:20:28.000000000 -0400
@@ -20,8 +20,8 @@
#include <linux/swap.h>
#include <linux/proc_fs.h>
#include <asm/io.h>
diff -urNp linux-2.6.17.11/arch/mips/kernel/binfmt_elfn32.c linux-2.6.17.11/arch/mips/kernel/binfmt_elfn32.c
--- linux-2.6.17.11/arch/mips/kernel/binfmt_elfn32.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/mips/kernel/binfmt_elfn32.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/mips/kernel/binfmt_elfn32.c 2006-09-01 16:20:28.000000000 -0400
@@ -50,6 +50,17 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
#include <linux/elfcore.h>
diff -urNp linux-2.6.17.11/arch/mips/kernel/binfmt_elfo32.c linux-2.6.17.11/arch/mips/kernel/binfmt_elfo32.c
--- linux-2.6.17.11/arch/mips/kernel/binfmt_elfo32.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/mips/kernel/binfmt_elfo32.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/mips/kernel/binfmt_elfo32.c 2006-09-01 16:20:28.000000000 -0400
@@ -52,6 +52,17 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#undef ELF_ET_DYN_BASE
#define ELF_ET_DYN_BASE (TASK32_SIZE / 3 * 2)
#include <linux/elfcore.h>
diff -urNp linux-2.6.17.11/arch/mips/kernel/syscall.c linux-2.6.17.11/arch/mips/kernel/syscall.c
--- linux-2.6.17.11/arch/mips/kernel/syscall.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/mips/kernel/syscall.c 2006-08-12 08:17:55.000000000 -0400
-@@ -89,6 +89,11 @@ unsigned long arch_get_unmapped_area(str
++++ linux-2.6.17.11/arch/mips/kernel/syscall.c 2006-09-01 16:20:28.000000000 -0400
+@@ -90,6 +90,11 @@ unsigned long arch_get_unmapped_area(str
do_color_align = 0;
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
if (addr) {
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
-@@ -99,7 +104,7 @@ unsigned long arch_get_unmapped_area(str
+@@ -100,7 +105,7 @@ unsigned long arch_get_unmapped_area(str
(!vmm || addr + len <= vmm->vm_start))
return addr;
}
else
diff -urNp linux-2.6.17.11/arch/mips/mm/fault.c linux-2.6.17.11/arch/mips/mm/fault.c
--- linux-2.6.17.11/arch/mips/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/mips/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/mips/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -27,6 +27,23 @@
#include <asm/ptrace.h>
#include <asm/highmem.h> /* For VMALLOC_END */
* and the problem, and then passes it off to one of the appropriate
diff -urNp linux-2.6.17.11/arch/parisc/kernel/module.c linux-2.6.17.11/arch/parisc/kernel/module.c
--- linux-2.6.17.11/arch/parisc/kernel/module.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/parisc/kernel/module.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/parisc/kernel/module.c 2006-09-01 16:20:28.000000000 -0400
@@ -72,16 +72,38 @@
/* three functions to determine where in the module core
me->arch.unwind_section, table, end, gp);
diff -urNp linux-2.6.17.11/arch/parisc/kernel/ptrace.c linux-2.6.17.11/arch/parisc/kernel/ptrace.c
--- linux-2.6.17.11/arch/parisc/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/parisc/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/parisc/kernel/ptrace.c 2006-09-01 16:20:28.000000000 -0400
@@ -18,6 +18,7 @@
#include <linux/security.h>
#include <linux/compat.h>
#include <asm/pgtable.h>
diff -urNp linux-2.6.17.11/arch/parisc/kernel/sys_parisc.c linux-2.6.17.11/arch/parisc/kernel/sys_parisc.c
--- linux-2.6.17.11/arch/parisc/kernel/sys_parisc.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/parisc/kernel/sys_parisc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/parisc/kernel/sys_parisc.c 2006-09-01 16:20:28.000000000 -0400
@@ -105,7 +105,7 @@ unsigned long arch_get_unmapped_area(str
if (len > TASK_SIZE)
return -ENOMEM;
addr = get_shared_area(filp->f_mapping, addr, len, pgoff);
diff -urNp linux-2.6.17.11/arch/parisc/kernel/traps.c linux-2.6.17.11/arch/parisc/kernel/traps.c
--- linux-2.6.17.11/arch/parisc/kernel/traps.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/parisc/kernel/traps.c 2006-08-12 08:17:55.000000000 -0400
-@@ -711,9 +711,7 @@ void handle_interruption(int code, struc
++++ linux-2.6.17.11/arch/parisc/kernel/traps.c 2006-09-01 16:20:28.000000000 -0400
+@@ -712,9 +712,7 @@ void handle_interruption(int code, struc
down_read(¤t->mm->mmap_sem);
vma = find_vma(current->mm,regs->iaoq[0]);
diff -urNp linux-2.6.17.11/arch/parisc/mm/fault.c linux-2.6.17.11/arch/parisc/mm/fault.c
--- linux-2.6.17.11/arch/parisc/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/parisc/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/parisc/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -16,6 +16,8 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
* If for any reason at all we couldn't handle the fault, make
diff -urNp linux-2.6.17.11/arch/powerpc/kernel/module_32.c linux-2.6.17.11/arch/powerpc/kernel/module_32.c
--- linux-2.6.17.11/arch/powerpc/kernel/module_32.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/powerpc/kernel/module_32.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/powerpc/kernel/module_32.c 2006-09-01 16:20:28.000000000 -0400
@@ -123,7 +123,7 @@ int module_frob_arch_sections(Elf32_Ehdr
me->arch.core_plt_section = i;
}
while (entry->jump[0]) {
diff -urNp linux-2.6.17.11/arch/powerpc/mm/fault.c linux-2.6.17.11/arch/powerpc/mm/fault.c
--- linux-2.6.17.11/arch/powerpc/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/powerpc/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/powerpc/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -29,6 +29,7 @@
#include <linux/highmem.h>
#include <linux/module.h>
}
diff -urNp linux-2.6.17.11/arch/powerpc/mm/mmap.c linux-2.6.17.11/arch/powerpc/mm/mmap.c
--- linux-2.6.17.11/arch/powerpc/mm/mmap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/powerpc/mm/mmap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/powerpc/mm/mmap.c 2006-09-01 16:20:28.000000000 -0400
@@ -74,10 +74,22 @@ void arch_pick_mmap_layout(struct mm_str
*/
if (mmap_is_legacy()) {
}
diff -urNp linux-2.6.17.11/arch/ppc/mm/fault.c linux-2.6.17.11/arch/ppc/mm/fault.c
--- linux-2.6.17.11/arch/ppc/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/ppc/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/ppc/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -26,6 +26,11 @@
#include <linux/interrupt.h>
#include <linux/highmem.h>
}
diff -urNp linux-2.6.17.11/arch/s390/kernel/module.c linux-2.6.17.11/arch/s390/kernel/module.c
--- linux-2.6.17.11/arch/s390/kernel/module.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/s390/kernel/module.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/s390/kernel/module.c 2006-09-01 16:20:28.000000000 -0400
@@ -164,11 +164,11 @@ module_frob_arch_sections(Elf_Ehdr *hdr,
/* Increase core size by size of got & plt and set start
*(unsigned int *) loc = val;
diff -urNp linux-2.6.17.11/arch/sparc/kernel/ptrace.c linux-2.6.17.11/arch/sparc/kernel/ptrace.c
--- linux-2.6.17.11/arch/sparc/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
-@@ -19,6 +19,7 @@
++++ linux-2.6.17.11/arch/sparc/kernel/ptrace.c 2006-09-01 16:20:28.000000000 -0400
+@@ -20,6 +20,7 @@
#include <linux/security.h>
#include <linux/signal.h>
#include <linux/vs_pid.h>
#include <asm/pgtable.h>
#include <asm/system.h>
-@@ -300,6 +301,11 @@ asmlinkage void do_ptrace(struct pt_regs
- goto out;
+@@ -305,6 +306,11 @@ asmlinkage void do_ptrace(struct pt_regs
+ goto out_tsk;
}
+ if (gr_handle_ptrace(child, request)) {
if (ptrace_attach(child)) {
diff -urNp linux-2.6.17.11/arch/sparc/kernel/sys_sparc.c linux-2.6.17.11/arch/sparc/kernel/sys_sparc.c
--- linux-2.6.17.11/arch/sparc/kernel/sys_sparc.c 2006-08-23 19:30:00.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc/kernel/sys_sparc.c 2006-08-23 19:30:12.000000000 -0400
-@@ -56,7 +56,7 @@ unsigned long arch_get_unmapped_area(str
++++ linux-2.6.17.11/arch/sparc/kernel/sys_sparc.c 2006-09-01 16:20:28.000000000 -0400
+@@ -57,7 +57,7 @@ unsigned long arch_get_unmapped_area(str
if (ARCH_SUN4C_SUN4 && len > 0x20000000)
return -ENOMEM;
if (!addr)
addr = COLOUR_ALIGN(addr);
diff -urNp linux-2.6.17.11/arch/sparc/Makefile linux-2.6.17.11/arch/sparc/Makefile
--- linux-2.6.17.11/arch/sparc/Makefile 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc/Makefile 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/sparc/Makefile 2006-09-01 16:20:28.000000000 -0400
@@ -34,7 +34,7 @@ libs-y += arch/sparc/prom/ arch/sparc/li
# Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
INIT_Y := $(patsubst %/, %/built-in.o, $(init-y))
NET_Y := $(patsubst %/, %/built-in.o, $(net-y))
diff -urNp linux-2.6.17.11/arch/sparc/mm/fault.c linux-2.6.17.11/arch/sparc/mm/fault.c
--- linux-2.6.17.11/arch/sparc/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/sparc/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -21,6 +21,10 @@
#include <linux/smp_lock.h>
#include <linux/interrupt.h>
goto bad_area;
diff -urNp linux-2.6.17.11/arch/sparc/mm/init.c linux-2.6.17.11/arch/sparc/mm/init.c
--- linux-2.6.17.11/arch/sparc/mm/init.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc/mm/init.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/sparc/mm/init.c 2006-09-01 16:20:28.000000000 -0400
@@ -333,17 +333,17 @@ void __init paging_init(void)
/* Initialize the protection map with non-constant, MMU dependent values. */
protection_map[14] = PAGE_SHARED;
diff -urNp linux-2.6.17.11/arch/sparc/mm/srmmu.c linux-2.6.17.11/arch/sparc/mm/srmmu.c
--- linux-2.6.17.11/arch/sparc/mm/srmmu.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc/mm/srmmu.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/sparc/mm/srmmu.c 2006-09-01 16:20:28.000000000 -0400
@@ -2161,6 +2161,13 @@ void __init ld_mmu_srmmu(void)
BTFIXUPSET_INT(page_shared, pgprot_val(SRMMU_PAGE_SHARED));
BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
diff -urNp linux-2.6.17.11/arch/sparc64/kernel/ptrace.c linux-2.6.17.11/arch/sparc64/kernel/ptrace.c
--- linux-2.6.17.11/arch/sparc64/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc64/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
-@@ -22,6 +22,7 @@
++++ linux-2.6.17.11/arch/sparc64/kernel/ptrace.c 2006-09-01 16:20:28.000000000 -0400
+@@ -23,6 +23,7 @@
#include <linux/audit.h>
#include <linux/signal.h>
#include <linux/vs_pid.h>
#include <asm/asi.h>
#include <asm/pgtable.h>
-@@ -213,6 +214,11 @@ asmlinkage void do_ptrace(struct pt_regs
- goto out;
+@@ -218,6 +219,11 @@ asmlinkage void do_ptrace(struct pt_regs
+ goto out_tsk;
}
+ if (gr_handle_ptrace(child, (long)request)) {
if (ptrace_attach(child)) {
diff -urNp linux-2.6.17.11/arch/sparc64/kernel/sys_sparc.c linux-2.6.17.11/arch/sparc64/kernel/sys_sparc.c
--- linux-2.6.17.11/arch/sparc64/kernel/sys_sparc.c 2006-08-23 19:30:00.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc64/kernel/sys_sparc.c 2006-08-23 19:30:12.000000000 -0400
-@@ -140,6 +140,10 @@ unsigned long arch_get_unmapped_area(str
++++ linux-2.6.17.11/arch/sparc64/kernel/sys_sparc.c 2006-09-01 16:20:28.000000000 -0400
+@@ -141,6 +141,10 @@ unsigned long arch_get_unmapped_area(str
if (filp || (flags & MAP_SHARED))
do_color_align = 1;
if (addr) {
if (do_color_align)
addr = COLOUR_ALIGN(addr, pgoff);
-@@ -153,9 +157,9 @@ unsigned long arch_get_unmapped_area(str
+@@ -154,9 +158,9 @@ unsigned long arch_get_unmapped_area(str
}
if (len > mm->cached_hole_size) {
mm->cached_hole_size = 0;
}
-@@ -175,8 +179,8 @@ full_search:
+@@ -176,8 +180,8 @@ full_search:
vma = find_vma(mm, VA_EXCLUDE_END);
}
if (unlikely(task_size < addr)) {
mm->cached_hole_size = 0;
goto full_search;
}
-@@ -379,6 +383,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -380,6 +384,12 @@ void arch_pick_mmap_layout(struct mm_str
current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY ||
sysctl_legacy_va_layout) {
mm->mmap_base = TASK_UNMAPPED_BASE + random_factor;
mm->get_unmapped_area = arch_get_unmapped_area;
mm->unmap_area = arch_unmap_area;
} else {
-@@ -393,6 +403,12 @@ void arch_pick_mmap_layout(struct mm_str
+@@ -394,6 +404,12 @@ void arch_pick_mmap_layout(struct mm_str
gap = (task_size / 6 * 5);
mm->mmap_base = PAGE_ALIGN(task_size - gap - random_factor);
}
diff -urNp linux-2.6.17.11/arch/sparc64/mm/fault.c linux-2.6.17.11/arch/sparc64/mm/fault.c
--- linux-2.6.17.11/arch/sparc64/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/sparc64/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/sparc64/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -19,6 +19,10 @@
#include <linux/init.h>
#include <linux/interrupt.h>
* was no match. So in such a case we (carefully) read the
diff -urNp linux-2.6.17.11/arch/v850/kernel/module.c linux-2.6.17.11/arch/v850/kernel/module.c
--- linux-2.6.17.11/arch/v850/kernel/module.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/v850/kernel/module.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/v850/kernel/module.c 2006-09-01 16:20:28.000000000 -0400
@@ -150,8 +150,8 @@ static uint32_t do_plt_call (void *locat
tramp[1] = ((val >> 16) & 0xffff) + 0x610000; /* ...; jmp r1 */
entry = (void *)sechdrs[mod->arch.init_plt_section].sh_addr;
diff -urNp linux-2.6.17.11/arch/x86_64/boot/compressed/head.S linux-2.6.17.11/arch/x86_64/boot/compressed/head.S
--- linux-2.6.17.11/arch/x86_64/boot/compressed/head.S 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/boot/compressed/head.S 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/x86_64/boot/compressed/head.S 2006-09-01 16:20:28.000000000 -0400
@@ -41,11 +41,13 @@ startup_32:
movl %eax,%gs
* Initialize eflags. Some BIOS's leave bits like NT set. This would
diff -urNp linux-2.6.17.11/arch/x86_64/ia32/ia32_binfmt.c linux-2.6.17.11/arch/x86_64/ia32/ia32_binfmt.c
--- linux-2.6.17.11/arch/x86_64/ia32/ia32_binfmt.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/ia32/ia32_binfmt.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/x86_64/ia32/ia32_binfmt.c 2006-09-01 16:20:28.000000000 -0400
@@ -186,6 +186,17 @@ struct elf_prpsinfo
//#include <asm/ia32.h>
#include <linux/elf.h>
diff -urNp linux-2.6.17.11/arch/x86_64/ia32/mmap32.c linux-2.6.17.11/arch/x86_64/ia32/mmap32.c
--- linux-2.6.17.11/arch/x86_64/ia32/mmap32.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/ia32/mmap32.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/x86_64/ia32/mmap32.c 2006-09-01 16:20:28.000000000 -0400
@@ -68,10 +68,22 @@ void ia32_pick_mmap_layout(struct mm_str
(current->personality & ADDR_COMPAT_LAYOUT) ||
current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY) {
}
diff -urNp linux-2.6.17.11/arch/x86_64/kernel/process.c linux-2.6.17.11/arch/x86_64/kernel/process.c
--- linux-2.6.17.11/arch/x86_64/kernel/process.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/kernel/process.c 2006-08-12 08:17:55.000000000 -0400
-@@ -830,9 +830,3 @@ int dump_task_regs(struct task_struct *t
++++ linux-2.6.17.11/arch/x86_64/kernel/process.c 2006-09-01 16:20:28.000000000 -0400
+@@ -831,9 +831,3 @@ int dump_task_regs(struct task_struct *t
return 1;
}
-}
diff -urNp linux-2.6.17.11/arch/x86_64/kernel/ptrace.c linux-2.6.17.11/arch/x86_64/kernel/ptrace.c
--- linux-2.6.17.11/arch/x86_64/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/x86_64/kernel/ptrace.c 2006-09-01 16:20:28.000000000 -0400
@@ -19,6 +19,7 @@
#include <linux/audit.h>
#include <linux/seccomp.h>
#include <asm/pgtable.h>
diff -urNp linux-2.6.17.11/arch/x86_64/kernel/setup64.c linux-2.6.17.11/arch/x86_64/kernel/setup64.c
--- linux-2.6.17.11/arch/x86_64/kernel/setup64.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/kernel/setup64.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/x86_64/kernel/setup64.c 2006-09-01 16:20:28.000000000 -0400
@@ -38,7 +38,6 @@ struct desc_ptr idt_descr = { 256 * 16 -
char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
}
diff -urNp linux-2.6.17.11/arch/x86_64/kernel/sys_x86_64.c linux-2.6.17.11/arch/x86_64/kernel/sys_x86_64.c
--- linux-2.6.17.11/arch/x86_64/kernel/sys_x86_64.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/kernel/sys_x86_64.c 2006-08-12 08:17:55.000000000 -0400
-@@ -65,8 +65,8 @@ out:
++++ linux-2.6.17.11/arch/x86_64/kernel/sys_x86_64.c 2006-09-01 16:20:28.000000000 -0400
+@@ -66,8 +66,8 @@ out:
return error;
}
{
if (!test_thread_flag(TIF_IA32) && (flags & MAP_32BIT)) {
/* This is usually used needed to map code in small
-@@ -79,7 +79,7 @@ static void find_start_end(unsigned long
+@@ -80,7 +80,7 @@ static void find_start_end(unsigned long
*begin = 0x40000000;
*end = 0x80000000;
} else {
*end = TASK_SIZE;
}
}
-@@ -93,11 +93,15 @@ arch_get_unmapped_area(struct file *filp
+@@ -94,11 +94,15 @@ arch_get_unmapped_area(struct file *filp
unsigned long start_addr;
unsigned long begin, end;
vma = find_vma(mm, addr);
diff -urNp linux-2.6.17.11/arch/x86_64/mm/fault.c linux-2.6.17.11/arch/x86_64/mm/fault.c
--- linux-2.6.17.11/arch/x86_64/mm/fault.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/mm/fault.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/x86_64/mm/fault.c 2006-09-01 16:20:28.000000000 -0400
@@ -24,6 +24,7 @@
#include <linux/compiler.h>
#include <linux/module.h>
tsk->thread.error_code = error_code | (address >= TASK_SIZE);
diff -urNp linux-2.6.17.11/arch/x86_64/mm/mmap.c linux-2.6.17.11/arch/x86_64/mm/mmap.c
--- linux-2.6.17.11/arch/x86_64/mm/mmap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/arch/x86_64/mm/mmap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/arch/x86_64/mm/mmap.c 2006-09-01 16:20:28.000000000 -0400
@@ -24,6 +24,12 @@ void arch_pick_mmap_layout(struct mm_str
unsigned rnd = get_random_int() & 0xfffffff;
mm->mmap_base += ((unsigned long)rnd) << PAGE_SHIFT;
}
diff -urNp linux-2.6.17.11/Documentation/dontdiff linux-2.6.17.11/Documentation/dontdiff
--- linux-2.6.17.11/Documentation/dontdiff 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/Documentation/dontdiff 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/Documentation/dontdiff 2006-09-01 16:20:28.000000000 -0400
@@ -55,7 +55,7 @@ aic7*seq.h*
aicasm
aicdb.h*
bbootsect
diff -urNp linux-2.6.17.11/drivers/char/agp/frontend.c linux-2.6.17.11/drivers/char/agp/frontend.c
--- linux-2.6.17.11/drivers/char/agp/frontend.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/char/agp/frontend.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/char/agp/frontend.c 2006-09-01 16:20:28.000000000 -0400
@@ -841,7 +841,7 @@ static int agpioc_reserve_wrap(struct ag
if (copy_from_user(&reserve, arg, sizeof(struct agp_region)))
return -EFAULT;
client = agp_find_client_by_pid(reserve.pid);
diff -urNp linux-2.6.17.11/drivers/char/keyboard.c linux-2.6.17.11/drivers/char/keyboard.c
--- linux-2.6.17.11/drivers/char/keyboard.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/char/keyboard.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/char/keyboard.c 2006-09-01 16:20:28.000000000 -0400
@@ -618,6 +618,16 @@ static void k_spec(struct vc_data *vc, u
kbd->kbdmode == VC_MEDIUMRAW) &&
value != KVAL(K_SAK))
diff -urNp linux-2.6.17.11/drivers/char/mem.c linux-2.6.17.11/drivers/char/mem.c
--- linux-2.6.17.11/drivers/char/mem.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/char/mem.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/char/mem.c 2006-09-01 16:20:28.000000000 -0400
@@ -28,6 +28,7 @@
#include <linux/backing-dev.h>
#include <linux/bootmem.h>
static struct class *mem_class;
diff -urNp linux-2.6.17.11/drivers/char/random.c linux-2.6.17.11/drivers/char/random.c
--- linux-2.6.17.11/drivers/char/random.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/char/random.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/char/random.c 2006-09-01 16:20:28.000000000 -0400
@@ -249,8 +249,13 @@
/*
* Configuration information
+#endif
diff -urNp linux-2.6.17.11/drivers/char/vt_ioctl.c linux-2.6.17.11/drivers/char/vt_ioctl.c
--- linux-2.6.17.11/drivers/char/vt_ioctl.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/char/vt_ioctl.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/char/vt_ioctl.c 2006-09-01 16:20:28.000000000 -0400
@@ -96,6 +96,12 @@ do_kdsk_ioctl(int cmd, struct kbentry __
case KDSKBENT:
if (!perm)
for (j = i+1; j < MAX_NR_FUNC && !func_table[j]; j++)
diff -urNp linux-2.6.17.11/drivers/ieee1394/hosts.c linux-2.6.17.11/drivers/ieee1394/hosts.c
--- linux-2.6.17.11/drivers/ieee1394/hosts.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/ieee1394/hosts.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/ieee1394/hosts.c 2006-09-01 16:20:28.000000000 -0400
@@ -75,6 +75,7 @@ static int dummy_isoctl(struct hpsb_iso
}
.isoctl = dummy_isoctl
diff -urNp linux-2.6.17.11/drivers/ieee1394/ohci1394.c linux-2.6.17.11/drivers/ieee1394/ohci1394.c
--- linux-2.6.17.11/drivers/ieee1394/ohci1394.c 2006-08-23 19:30:00.000000000 -0400
-+++ linux-2.6.17.11/drivers/ieee1394/ohci1394.c 2006-08-23 19:30:12.000000000 -0400
++++ linux-2.6.17.11/drivers/ieee1394/ohci1394.c 2006-09-01 16:20:28.000000000 -0400
@@ -162,9 +162,9 @@ printk(level "%s: " fmt "\n" , OHCI1394_
printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, ohci->host->id , ## args)
static void dma_trm_reset(struct dma_trm_ctx *d);
diff -urNp linux-2.6.17.11/drivers/mtd/devices/doc2001.c linux-2.6.17.11/drivers/mtd/devices/doc2001.c
--- linux-2.6.17.11/drivers/mtd/devices/doc2001.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/mtd/devices/doc2001.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/mtd/devices/doc2001.c 2006-09-01 16:20:28.000000000 -0400
@@ -423,6 +423,8 @@ static int doc_read_ecc (struct mtd_info
/* Don't allow read past end of device */
if (from >= this->totlen)
if (from + len > ((from | 0x1ff) + 1))
diff -urNp linux-2.6.17.11/drivers/net/pcnet32.c linux-2.6.17.11/drivers/net/pcnet32.c
--- linux-2.6.17.11/drivers/net/pcnet32.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/net/pcnet32.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/net/pcnet32.c 2006-09-01 16:20:28.000000000 -0400
@@ -81,7 +81,7 @@ static int cards_found;
/*
* VLB I/O addresses
static int pcnet32_debug = 0;
diff -urNp linux-2.6.17.11/drivers/pci/proc.c linux-2.6.17.11/drivers/pci/proc.c
--- linux-2.6.17.11/drivers/pci/proc.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/pci/proc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/pci/proc.c 2006-09-01 16:20:28.000000000 -0400
@@ -473,7 +473,15 @@ static int __init pci_proc_init(void)
{
struct proc_dir_entry *entry;
entry->proc_fops = &proc_bus_pci_dev_operations;
diff -urNp linux-2.6.17.11/drivers/pnp/pnpbios/bioscalls.c linux-2.6.17.11/drivers/pnp/pnpbios/bioscalls.c
--- linux-2.6.17.11/drivers/pnp/pnpbios/bioscalls.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/pnp/pnpbios/bioscalls.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/pnp/pnpbios/bioscalls.c 2006-09-01 16:20:28.000000000 -0400
@@ -65,7 +65,7 @@ set_base(gdt[(selname) >> 3], (u32)(addr
set_limit(gdt[(selname) >> 3], size); \
} while(0)
/* If we get here and this is set then the PnP BIOS faulted on us. */
diff -urNp linux-2.6.17.11/drivers/video/i810/i810_main.c linux-2.6.17.11/drivers/video/i810/i810_main.c
--- linux-2.6.17.11/drivers/video/i810/i810_main.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/video/i810/i810_main.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/drivers/video/i810/i810_main.c 2006-09-01 16:20:28.000000000 -0400
@@ -1508,7 +1508,7 @@ static int i810fb_cursor(struct fb_info
int size = ((cursor->image.width + 7) >> 3) *
cursor->image.height;
return -ENOMEM;
diff -urNp linux-2.6.17.11/drivers/video/vesafb.c linux-2.6.17.11/drivers/video/vesafb.c
--- linux-2.6.17.11/drivers/video/vesafb.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/drivers/video/vesafb.c 2006-08-12 08:17:55.000000000 -0400
-@@ -259,7 +259,7 @@ static int __init vesafb_probe(struct pl
++++ linux-2.6.17.11/drivers/video/vesafb.c 2006-09-01 16:20:28.000000000 -0400
+@@ -267,7 +267,7 @@ static int __init vesafb_probe(struct pl
size_remap = size_total;
vesafb_fix.smem_len = size_remap;
diff -urNp linux-2.6.17.11/fs/binfmt_aout.c linux-2.6.17.11/fs/binfmt_aout.c
--- linux-2.6.17.11/fs/binfmt_aout.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/binfmt_aout.c 2006-08-12 08:17:55.000000000 -0400
-@@ -24,6 +24,7 @@
++++ linux-2.6.17.11/fs/binfmt_aout.c 2006-09-01 16:20:28.000000000 -0400
+@@ -25,6 +25,7 @@
#include <linux/personality.h>
#include <linux/init.h>
#include <linux/vs_memory.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-@@ -123,10 +124,12 @@ static int aout_core_dump(long signr, st
+@@ -124,10 +125,12 @@ static int aout_core_dump(long signr, st
/* If the size of the dump file exceeds the rlimit, then see what would happen
if we wrote the stack, but not the data area. */
#ifdef __sparc__
if ((dump.u_dsize+dump.u_ssize+1) * PAGE_SIZE >
current->signal->rlim[RLIMIT_CORE].rlim_cur)
dump.u_dsize = 0;
-@@ -134,10 +137,12 @@ static int aout_core_dump(long signr, st
+@@ -135,10 +138,12 @@ static int aout_core_dump(long signr, st
/* Make sure we have enough room to write the stack and data areas. */
#ifdef __sparc__
if ((dump.u_ssize+1) * PAGE_SIZE >
current->signal->rlim[RLIMIT_CORE].rlim_cur)
dump.u_ssize = 0;
-@@ -287,6 +292,8 @@ static int load_aout_binary(struct linux
+@@ -288,6 +293,8 @@ static int load_aout_binary(struct linux
rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur;
if (rlim >= RLIM_INFINITY)
rlim = ~0;
if (ex.a_data + ex.a_bss > rlim)
return -ENOMEM;
-@@ -319,6 +326,28 @@ static int load_aout_binary(struct linux
+@@ -320,6 +327,28 @@ static int load_aout_binary(struct linux
current->mm->mmap = NULL;
compute_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
#ifdef __sparc__
if (N_MAGIC(ex) == NMAGIC) {
loff_t pos = fd_offset;
-@@ -414,7 +443,7 @@ static int load_aout_binary(struct linux
+@@ -415,7 +444,7 @@ static int load_aout_binary(struct linux
down_write(¤t->mm->mmap_sem);
error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
up_write(¤t->mm->mmap_sem);
diff -urNp linux-2.6.17.11/fs/binfmt_elf.c linux-2.6.17.11/fs/binfmt_elf.c
--- linux-2.6.17.11/fs/binfmt_elf.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/binfmt_elf.c 2006-08-12 08:17:55.000000000 -0400
-@@ -38,11 +38,16 @@
++++ linux-2.6.17.11/fs/binfmt_elf.c 2006-09-01 16:20:28.000000000 -0400
+@@ -40,11 +40,16 @@
#include <linux/random.h>
#include <linux/vs_memory.h>
#include <linux/vs_cvirt.h>
#include <linux/elf.h>
static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
-@@ -90,6 +95,8 @@ static struct linux_binfmt elf_format =
+@@ -92,6 +97,8 @@ static struct linux_binfmt elf_format =
static int set_brk(unsigned long start, unsigned long end)
{
start = ELF_PAGEALIGN(start);
end = ELF_PAGEALIGN(end);
if (end > start) {
-@@ -100,7 +107,7 @@ static int set_brk(unsigned long start,
+@@ -102,7 +109,7 @@ static int set_brk(unsigned long start,
if (BAD_ADDR(addr))
return addr;
}
return 0;
}
-@@ -316,10 +323,9 @@ static unsigned long load_elf_interp(str
+@@ -318,10 +325,9 @@ static unsigned long load_elf_interp(str
{
struct elf_phdr *elf_phdata;
struct elf_phdr *eppnt;
int retval, i, size;
/* First of all, some simple consistency checks */
-@@ -358,59 +364,80 @@ static unsigned long load_elf_interp(str
+@@ -360,59 +366,80 @@ static unsigned long load_elf_interp(str
goto out_close;
}
}
/*
-@@ -447,7 +474,7 @@ out:
+@@ -449,7 +476,7 @@ out:
static unsigned long load_aout_interp(struct exec * interp_ex,
struct file * interpreter)
{
char __user * addr;
loff_t offset;
-@@ -491,6 +518,180 @@ out:
+@@ -493,6 +520,180 @@ out:
return elf_entry;
}
/*
* These are the functions used to load ELF style executables and shared
* libraries. There is no binary dependent code anywhere else.
-@@ -527,7 +728,7 @@ static int load_elf_binary(struct linux_
+@@ -529,7 +730,7 @@ static int load_elf_binary(struct linux_
char * elf_interpreter = NULL;
unsigned int interpreter_type = INTERPRETER_NONE;
unsigned char ibcs2_interpreter = 0;
struct elf_phdr * elf_ppnt, *elf_phdata;
unsigned long elf_bss, elf_brk;
int elf_exec_fileno;
-@@ -545,6 +746,7 @@ static int load_elf_binary(struct linux_
+@@ -547,6 +748,7 @@ static int load_elf_binary(struct linux_
struct elfhdr interp_elf_ex;
struct exec interp_ex;
} *loc;
loc = kmalloc(sizeof(*loc), GFP_KERNEL);
if (!loc) {
-@@ -770,14 +972,88 @@ static int load_elf_binary(struct linux_
+@@ -772,14 +974,88 @@ static int load_elf_binary(struct linux_
current->mm->end_code = 0;
current->mm->mmap = NULL;
current->flags &= ~PF_FORKNOEXEC;
if ( !(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
current->flags |= PF_RANDOMIZE;
arch_pick_mmap_layout(current->mm);
-@@ -849,6 +1125,15 @@ static int load_elf_binary(struct linux_
+@@ -851,6 +1127,15 @@ static int load_elf_binary(struct linux_
base, as well as whatever program they might try to exec. This
is because the brk will follow the loader, and is not movable. */
load_bias = ELF_PAGESTART(ELF_ET_DYN_BASE - vaddr);
}
error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
-@@ -876,9 +1161,9 @@ static int load_elf_binary(struct linux_
+@@ -878,9 +1163,9 @@ static int load_elf_binary(struct linux_
* allowed task size. Note that p_filesz must always be
* <= p_memsz so it is only necessary to check p_memsz.
*/
/* set_brk can never work. Avoid overflows. */
send_sig(SIGKILL, current, 0);
goto out_free_dentry;
-@@ -905,6 +1190,12 @@ static int load_elf_binary(struct linux_
+@@ -907,6 +1192,12 @@ static int load_elf_binary(struct linux_
start_data += load_bias;
end_data += load_bias;
/* Calling set_brk effectively mmaps the pages that we need
* for the bss and break sections. We must do this before
* mapping in the interpreter, to make sure it doesn't wind
-@@ -933,7 +1224,7 @@ static int load_elf_binary(struct linux_
+@@ -935,7 +1226,7 @@ static int load_elf_binary(struct linux_
printk(KERN_ERR "Unable to load interpreter %.128s\n",
elf_interpreter);
force_sig(SIGSEGV, current);
goto out_free_dentry;
}
reloc_func_desc = interp_load_addr;
-@@ -1157,7 +1448,7 @@ static int dump_seek(struct file *file,
+@@ -1159,7 +1450,7 @@ static int dump_seek(struct file *file,
*
* I think we should skip something. But I am not sure how. H.J.
*/
{
/* Do not dump I/O mapped devices or special mappings */
if (vma->vm_flags & (VM_IO | VM_RESERVED))
-@@ -1168,7 +1459,7 @@ static int maydump(struct vm_area_struct
+@@ -1170,7 +1461,7 @@ static int maydump(struct vm_area_struct
return vma->vm_file->f_dentry->d_inode->i_nlink == 0;
/* If it hasn't been written to, don't write it out */
return 0;
return 1;
-@@ -1222,8 +1513,11 @@ static int writenote(struct memelfnote *
+@@ -1224,8 +1515,11 @@ static int writenote(struct memelfnote *
#undef DUMP_SEEK
#define DUMP_WRITE(addr, nr) \
#define DUMP_SEEK(off) \
if (!dump_seek(file, (off))) \
goto end_coredump;
-@@ -1573,7 +1867,7 @@ static int elf_core_dump(long signr, str
+@@ -1575,7 +1869,7 @@ static int elf_core_dump(long signr, str
phdr.p_offset = offset;
phdr.p_vaddr = vma->vm_start;
phdr.p_paddr = 0;
phdr.p_memsz = sz;
offset += phdr.p_filesz;
phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0;
-@@ -1606,7 +1900,7 @@ static int elf_core_dump(long signr, str
+@@ -1608,7 +1902,7 @@ static int elf_core_dump(long signr, str
for (vma = current->mm->mmap; vma != NULL; vma = vma->vm_next) {
unsigned long addr;
continue;
for (addr = vma->vm_start;
-@@ -1625,6 +1919,7 @@ static int elf_core_dump(long signr, str
+@@ -1627,6 +1921,7 @@ static int elf_core_dump(long signr, str
void *kaddr;
flush_cache_page(vma, addr, page_to_pfn(page));
kaddr = kmap(page);
PAGE_SIZE)) {
diff -urNp linux-2.6.17.11/fs/binfmt_flat.c linux-2.6.17.11/fs/binfmt_flat.c
--- linux-2.6.17.11/fs/binfmt_flat.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/binfmt_flat.c 2006-08-12 08:17:55.000000000 -0400
-@@ -552,7 +552,9 @@ static int load_flat_file(struct linux_b
++++ linux-2.6.17.11/fs/binfmt_flat.c 2006-09-01 16:20:28.000000000 -0400
+@@ -553,7 +553,9 @@ static int load_flat_file(struct linux_b
realdatastart = (unsigned long) -ENOMEM;
printk("Unable to allocate RAM for process data, errno %d\n",
(int)-datapos);
ret = realdatastart;
goto err;
}
-@@ -574,8 +576,10 @@ static int load_flat_file(struct linux_b
+@@ -575,8 +577,10 @@ static int load_flat_file(struct linux_b
}
if (result >= (unsigned long)-4096) {
printk("Unable to read data+bss, errno %d\n", (int)-result);
ret = result;
goto err;
}
-@@ -639,8 +643,10 @@ static int load_flat_file(struct linux_b
+@@ -640,8 +644,10 @@ static int load_flat_file(struct linux_b
}
if (result >= (unsigned long)-4096) {
printk("Unable to read code+data+bss, errno %d\n",(int)-result);
}
diff -urNp linux-2.6.17.11/fs/binfmt_misc.c linux-2.6.17.11/fs/binfmt_misc.c
--- linux-2.6.17.11/fs/binfmt_misc.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/binfmt_misc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/binfmt_misc.c 2006-09-01 16:20:28.000000000 -0400
@@ -112,9 +112,11 @@ static int load_misc_binary(struct linux
struct files_struct *files = NULL;
fmt = check_file(bprm);
diff -urNp linux-2.6.17.11/fs/buffer.c linux-2.6.17.11/fs/buffer.c
--- linux-2.6.17.11/fs/buffer.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/buffer.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/buffer.c 2006-09-01 16:20:28.000000000 -0400
@@ -42,6 +42,7 @@
#include <linux/bitops.h>
#include <linux/mpage.h>
goto out;
diff -urNp linux-2.6.17.11/fs/compat.c linux-2.6.17.11/fs/compat.c
--- linux-2.6.17.11/fs/compat.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/compat.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/compat.c 2006-09-01 16:20:28.000000000 -0400
@@ -46,6 +46,7 @@
#include <linux/rwsem.h>
#include <linux/acct.h>
for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
diff -urNp linux-2.6.17.11/fs/dcache.c linux-2.6.17.11/fs/dcache.c
--- linux-2.6.17.11/fs/dcache.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/dcache.c 2006-08-12 08:17:55.000000000 -0400
-@@ -1389,7 +1389,7 @@ already_unhashed:
++++ linux-2.6.17.11/fs/dcache.c 2006-09-01 16:20:28.000000000 -0400
+@@ -1399,7 +1399,7 @@ already_unhashed:
*
* "buflen" should be positive. Caller holds the dcache_lock.
*/
{
diff -urNp linux-2.6.17.11/fs/exec.c linux-2.6.17.11/fs/exec.c
--- linux-2.6.17.11/fs/exec.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/exec.c 2006-08-12 08:17:55.000000000 -0400
-@@ -49,6 +49,8 @@
++++ linux-2.6.17.11/fs/exec.c 2006-09-01 16:20:28.000000000 -0400
+@@ -51,6 +51,8 @@
#include <linux/cn_proc.h>
#include <linux/vs_cvirt.h>
#include <linux/vs_memory.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
-@@ -67,6 +69,15 @@ EXPORT_SYMBOL(suid_dumpable);
+@@ -69,6 +71,15 @@ EXPORT_SYMBOL(suid_dumpable);
static struct linux_binfmt *formats;
static DEFINE_RWLOCK(binfmt_lock);
int register_binfmt(struct linux_binfmt * fmt)
{
struct linux_binfmt ** tmp = &formats;
-@@ -312,6 +323,10 @@ void install_arg_page(struct vm_area_str
+@@ -314,6 +325,10 @@ void install_arg_page(struct vm_area_str
if (unlikely(anon_vma_prepare(vma)))
goto out;
flush_dcache_page(page);
pte = get_locked_pte(mm, address, &ptl);
if (!pte)
-@@ -321,9 +336,21 @@ void install_arg_page(struct vm_area_str
+@@ -323,9 +338,21 @@ void install_arg_page(struct vm_area_str
goto out;
}
inc_mm_counter(mm, anon_rss);
page_add_new_anon_rmap(page, vma, address);
pte_unmap_unlock(pte, ptl);
-@@ -346,6 +373,10 @@ int setup_arg_pages(struct linux_binprm
+@@ -348,6 +375,10 @@ int setup_arg_pages(struct linux_binprm
int i, ret;
long arg_size;
#ifdef CONFIG_STACK_GROWSUP
/* Move the argument and environment strings to the bottom of the
* stack space.
-@@ -404,11 +435,19 @@ int setup_arg_pages(struct linux_binprm
+@@ -406,11 +437,19 @@ int setup_arg_pages(struct linux_binprm
bprm->loader += stack_base;
bprm->exec += stack_base;
down_write(&mm->mmap_sem);
{
-@@ -430,13 +469,50 @@ int setup_arg_pages(struct linux_binprm
+@@ -432,14 +471,51 @@ int setup_arg_pages(struct linux_binprm
else
mpnt->vm_flags = VM_STACK_FLAGS;
mpnt->vm_flags |= mm->def_flags;
+
return ret;
}
- mm->stack_vm = mm->total_vm = vma_pages(mpnt);
+ vx_vmpages_sub(mm, mm->total_vm - vma_pages(mpnt));
+ mm->stack_vm = mm->total_vm;
+
+#ifdef CONFIG_PAX_SEGMEXEC
+ if (mpnt_m) {
}
for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
-@@ -444,6 +520,14 @@ int setup_arg_pages(struct linux_binprm
+@@ -447,6 +523,14 @@ int setup_arg_pages(struct linux_binprm
if (page) {
bprm->page[i] = NULL;
install_arg_page(mpnt, page, stack_base);
}
stack_base += PAGE_SIZE;
}
-@@ -1147,6 +1231,11 @@ int do_execve(char * filename,
+@@ -1150,6 +1234,11 @@ int do_execve(char * filename,
struct file *file;
int retval;
int i;
retval = -ENOMEM;
bprm = kzalloc(sizeof(*bprm), GFP_KERNEL);
-@@ -1158,10 +1247,29 @@ int do_execve(char * filename,
+@@ -1161,10 +1250,29 @@ int do_execve(char * filename,
if (IS_ERR(file))
goto out_kfree;
bprm->file = file;
bprm->filename = filename;
bprm->interp = filename;
-@@ -1203,8 +1311,38 @@ int do_execve(char * filename,
+@@ -1206,8 +1314,38 @@ int do_execve(char * filename,
if (retval < 0)
goto out;
free_arg_pages(bprm);
/* execve success */
-@@ -1214,6 +1352,14 @@ int do_execve(char * filename,
+@@ -1217,6 +1355,14 @@ int do_execve(char * filename,
return retval;
}
out:
/* Something went wrong, return the inode and free the argument pages*/
for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
-@@ -1374,6 +1520,114 @@ static void format_corename(char *corena
+@@ -1377,6 +1523,114 @@ static void format_corename(char *corena
*out_ptr = 0;
}
static void zap_threads (struct mm_struct *mm)
{
struct task_struct *g, *p;
-@@ -1491,6 +1745,10 @@ int do_coredump(long signr, int exit_cod
+@@ -1494,6 +1748,10 @@ int do_coredump(long signr, int exit_cod
*/
clear_thread_flag(TIF_SIGPENDING);
diff -urNp linux-2.6.17.11/fs/fcntl.c linux-2.6.17.11/fs/fcntl.c
--- linux-2.6.17.11/fs/fcntl.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/fcntl.c 2006-08-12 08:17:55.000000000 -0400
-@@ -18,6 +18,7 @@
++++ linux-2.6.17.11/fs/fcntl.c 2006-09-01 16:20:28.000000000 -0400
+@@ -19,6 +19,7 @@
#include <linux/signal.h>
#include <linux/rcupdate.h>
#include <linux/vs_limit.h>
#include <asm/poll.h>
#include <asm/siginfo.h>
-@@ -63,6 +64,7 @@ static int locate_fd(struct files_struct
+@@ -64,6 +65,7 @@ static int locate_fd(struct files_struct
struct fdtable *fdt;
error = -EINVAL;
if (orig_start >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
goto out;
-@@ -83,6 +85,7 @@ repeat:
+@@ -84,6 +86,7 @@ repeat:
}
error = -EMFILE;
+ gr_learn_resource(current, RLIMIT_NOFILE, newfd, 0);
if (newfd >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)
goto out;
-
-@@ -141,6 +144,8 @@ asmlinkage long sys_dup2(unsigned int ol
+ if (!vx_files_avail(1))
+@@ -145,6 +148,8 @@ asmlinkage long sys_dup2(unsigned int ol
struct files_struct * files = current->files;
struct fdtable *fdt;
spin_lock(&files->file_lock);
if (!(file = fcheck(oldfd)))
goto out_unlock;
-@@ -427,7 +432,8 @@ static inline int sigio_perm(struct task
+@@ -434,7 +439,8 @@ static inline int sigio_perm(struct task
return (((fown->euid == 0) ||
(fown->euid == p->suid) || (fown->euid == p->uid) ||
(fown->uid == p->suid) || (fown->uid == p->uid)) &&
static void send_sigio_to_task(struct task_struct *p,
diff -urNp linux-2.6.17.11/fs/Kconfig linux-2.6.17.11/fs/Kconfig
--- linux-2.6.17.11/fs/Kconfig 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/Kconfig 2006-08-12 08:17:55.000000000 -0400
-@@ -794,7 +794,7 @@ config PROC_FS
++++ linux-2.6.17.11/fs/Kconfig 2006-09-01 16:20:28.000000000 -0400
+@@ -796,7 +796,7 @@ config PROC_FS
config PROC_KCORE
bool "/proc/kcore support" if !ARM
bool "/proc/vmcore support (EXPERIMENTAL)"
diff -urNp linux-2.6.17.11/fs/namei.c linux-2.6.17.11/fs/namei.c
--- linux-2.6.17.11/fs/namei.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/namei.c 2006-08-12 08:17:55.000000000 -0400
-@@ -32,6 +32,7 @@
++++ linux-2.6.17.11/fs/namei.c 2006-09-01 16:20:28.000000000 -0400
+@@ -36,6 +36,7 @@
#include <linux/vserver/inode.h>
#include <linux/vs_tag.h>
#include <linux/vserver/debug.h>
#include <asm/namei.h>
#include <asm/uaccess.h>
-@@ -611,6 +612,13 @@ static inline int do_follow_link(struct
+@@ -635,6 +636,13 @@ static inline int do_follow_link(struct
err = security_inode_follow_link(path->dentry, nd);
if (err)
goto loop;
current->link_count++;
current->total_link_count++;
nd->depth++;
-@@ -954,11 +962,18 @@ return_reval:
+@@ -997,11 +1005,18 @@ return_reval:
break;
}
return_base:
path_release(nd);
return_err:
return err;
-@@ -1601,6 +1616,17 @@ int open_namei(int dfd, const char *path
+@@ -1661,6 +1676,17 @@ int open_namei(int dfd, const char *path
nd, flag);
if (error)
return error;
goto ok;
}
-@@ -1641,9 +1667,16 @@ do_last:
+@@ -1701,9 +1727,16 @@ do_last:
/* Negative dentry, just create the file */
if (!path.dentry->d_inode) {
mutex_unlock(&dir->d_inode->i_mutex);
dput(nd->dentry);
nd->dentry = path.dentry;
-@@ -1658,6 +1691,23 @@ do_last:
+@@ -1718,6 +1751,23 @@ do_last:
/*
* It already exists.
*/
mutex_unlock(&dir->d_inode->i_mutex);
error = -EEXIST;
-@@ -1711,6 +1761,13 @@ do_link:
+@@ -1784,6 +1834,13 @@ do_link:
error = security_inode_follow_link(path.dentry, nd);
if (error)
goto exit_dput;
error = __do_follow_link(&path, nd);
if (error) {
/* Does someone understand code flow here? Or it is only
-@@ -1837,6 +1894,22 @@ asmlinkage long sys_mknodat(int dfd, con
+@@ -1911,6 +1968,22 @@ asmlinkage long sys_mknodat(int dfd, con
if (!IS_POSIXACL(nd.dentry->d_inode))
mode &= ~current->fs->umask;
if (!IS_ERR(dentry)) {
switch (mode & S_IFMT) {
case 0: case S_IFREG:
error = vfs_create(nd.dentry->d_inode,dentry,mode,&nd);
-@@ -1854,6 +1927,10 @@ asmlinkage long sys_mknodat(int dfd, con
+@@ -1929,6 +2002,10 @@ asmlinkage long sys_mknodat(int dfd, con
default:
error = -EINVAL;
}
dput(dentry);
}
mutex_unlock(&nd.dentry->d_inode->i_mutex);
-@@ -1908,9 +1985,19 @@ asmlinkage long sys_mkdirat(int dfd, con
+@@ -1984,10 +2061,19 @@ asmlinkage long sys_mkdirat(int dfd, con
dentry = lookup_create(&nd, 1);
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
+ error = 0;
if (!IS_POSIXACL(nd.dentry->d_inode))
mode &= ~current->fs->umask;
-- error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
+- error = vfs_mkdir(nd.dentry->d_inode, dentry,
+- mode, &nd);
+
+ if (!gr_acl_handle_mkdir(dentry, nd.dentry, nd.mnt))
+ error = -EACCES;
+
+ if (!error)
-+ error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
-+
++ error = vfs_mkdir(nd.dentry->d_inode, dentry,
++ mode, &nd);
+ if (!error)
+ gr_handle_create(dentry, nd.mnt);
+
dput(dentry);
}
mutex_unlock(&nd.dentry->d_inode->i_mutex);
-@@ -1994,6 +2081,8 @@ static long do_rmdir(int dfd, const char
+@@ -2072,6 +2158,8 @@ static long do_rmdir(int dfd, const char
char * name;
struct dentry *dentry;
struct nameidata nd;
name = getname(pathname);
if(IS_ERR(name))
-@@ -2018,7 +2107,21 @@ static long do_rmdir(int dfd, const char
+@@ -2096,7 +2184,21 @@ static long do_rmdir(int dfd, const char
dentry = lookup_hash(&nd);
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
-- error = vfs_rmdir(nd.dentry->d_inode, dentry);
+- error = vfs_rmdir(nd.dentry->d_inode, dentry, &nd);
+ error = 0;
+ if (dentry->d_inode) {
+ if (dentry->d_inode->i_nlink <= 1) {
+ }
+
+ if (!error)
-+ error = vfs_rmdir(nd.dentry->d_inode, dentry);
++ error = vfs_rmdir(nd.dentry->d_inode, dentry, &nd);
+ if (!error && (saved_dev || saved_ino))
+ gr_handle_delete(saved_ino, saved_dev);
dput(dentry);
}
mutex_unlock(&nd.dentry->d_inode->i_mutex);
-@@ -2077,6 +2180,8 @@ static long do_unlinkat(int dfd, const c
+@@ -2156,6 +2258,8 @@ static long do_unlinkat(int dfd, const c
struct dentry *dentry;
struct nameidata nd;
struct inode *inode = NULL;
name = getname(pathname);
if(IS_ERR(name))
-@@ -2092,13 +2197,26 @@ static long do_unlinkat(int dfd, const c
+@@ -2171,13 +2275,26 @@ static long do_unlinkat(int dfd, const c
dentry = lookup_hash(&nd);
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
+ error = -EACCES;
+
atomic_inc(&inode->i_count);
-- error = vfs_unlink(nd.dentry->d_inode, dentry);
+- error = vfs_unlink(nd.dentry->d_inode, dentry, &nd);
+ }
+ if (!error)
-+ error = vfs_unlink(nd.dentry->d_inode, dentry);
++ error = vfs_unlink(nd.dentry->d_inode, dentry, &nd);
+ if (!error && (saved_ino || saved_dev))
+ gr_handle_delete(saved_ino, saved_dev);
exit2:
dput(dentry);
}
-@@ -2176,7 +2294,15 @@ asmlinkage long sys_symlinkat(const char
+@@ -2256,8 +2373,15 @@ asmlinkage long sys_symlinkat(const char
dentry = lookup_create(&nd, 0);
error = PTR_ERR(dentry);
if (!IS_ERR(dentry)) {
-- error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
+- error = vfs_symlink(nd.dentry->d_inode, dentry,
+- from, S_IALLUGO, &nd);
+ error = 0;
+ if (!gr_acl_handle_symlink(dentry, nd.dentry, nd.mnt, from))
+ error = -EACCES;
+
+ if (!error)
-+ error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
-+
++ error = vfs_symlink(nd.dentry->d_inode, dentry,
++ from, S_IALLUGO, &nd);
+ if (!error)
+ gr_handle_create(dentry, nd.mnt);
dput(dentry);
}
mutex_unlock(&nd.dentry->d_inode->i_mutex);
-@@ -2268,7 +2394,20 @@ asmlinkage long sys_linkat(int olddfd, c
+@@ -2350,8 +2474,20 @@ asmlinkage long sys_linkat(int olddfd, c
new_dentry = lookup_create(&nd, 0);
error = PTR_ERR(new_dentry);
if (!IS_ERR(new_dentry)) {
-- error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry);
+- error = vfs_link(old_nd.dentry, nd.dentry->d_inode,
+- new_dentry, &nd);
+ error = 0;
+ if (gr_handle_hardlink(old_nd.dentry, old_nd.mnt,
+ old_nd.dentry->d_inode,
+ old_nd.dentry, old_nd.mnt, to))
+ error = -EACCES;
+ if (!error)
-+ error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry);
-+
++ error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry,
++ &nd);
+ if (!error)
+ gr_handle_create(new_dentry, nd.mnt);
+
dput(new_dentry);
}
mutex_unlock(&nd.dentry->d_inode->i_mutex);
-@@ -2494,8 +2633,16 @@ static int do_rename(int olddfd, const c
+@@ -2580,8 +2716,16 @@ static int do_rename(int olddfd, const c
if (new_dentry == trap)
goto exit5;
exit4:
diff -urNp linux-2.6.17.11/fs/namespace.c linux-2.6.17.11/fs/namespace.c
--- linux-2.6.17.11/fs/namespace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/namespace.c 2006-08-12 08:17:55.000000000 -0400
-@@ -23,6 +23,8 @@
++++ linux-2.6.17.11/fs/namespace.c 2006-09-01 16:20:28.000000000 -0400
+@@ -25,6 +25,8 @@
#include <linux/mount.h>
#include <linux/vserver/namespace.h>
#include <linux/vserver/tag.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include "pnode.h"
-@@ -600,6 +602,8 @@ static int do_umount(struct vfsmount *mn
- DQUOT_OFF(sb);
+@@ -655,6 +657,8 @@ static int do_umount(struct vfsmount *mn
+ DQUOT_OFF(sb->s_dqh);
retval = do_remount_sb(sb, MS_RDONLY, NULL, 0);
unlock_kernel();
+
}
up_write(&sb->s_umount);
return retval;
-@@ -620,6 +624,9 @@ static int do_umount(struct vfsmount *mn
+@@ -675,6 +679,9 @@ static int do_umount(struct vfsmount *mn
security_sb_umount_busy(mnt);
up_write(&namespace_sem);
release_mounts(&umount_list);
return retval;
}
-@@ -1346,6 +1353,11 @@ long do_mount(char *dev_name, char *dir_
+@@ -1425,6 +1432,11 @@ long do_mount(char *dev_name, char *dir_
if (retval)
goto dput_out;
+
if (flags & MS_REMOUNT)
retval = do_remount(&nd, flags & ~MS_REMOUNT, mnt_flags,
- data_page);
-@@ -1360,6 +1372,9 @@ long do_mount(char *dev_name, char *dir_
+ data_page, tag);
+@@ -1439,6 +1451,9 @@ long do_mount(char *dev_name, char *dir_
dev_name, data_page);
dput_out:
path_release(&nd);
return retval;
}
-@@ -1612,6 +1627,9 @@ asmlinkage long sys_pivot_root(const cha
+@@ -1691,6 +1706,9 @@ asmlinkage long sys_pivot_root(const cha
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
error = __user_walk(new_root, LOOKUP_FOLLOW | LOOKUP_DIRECTORY,
diff -urNp linux-2.6.17.11/fs/open.c linux-2.6.17.11/fs/open.c
--- linux-2.6.17.11/fs/open.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/open.c 2006-08-12 08:17:55.000000000 -0400
-@@ -28,6 +28,7 @@
- #include <linux/vserver/vs_limit.h.h>
- #include <linux/vserver/vs_dlimit.h>
- #include <linux/tag.h>
++++ linux-2.6.17.11/fs/open.c 2006-09-01 16:20:28.000000000 -0400
+@@ -31,6 +31,7 @@
+ #include <linux/vs_limit.h>
+ #include <linux/vs_dlimit.h>
+ #include <linux/vserver/tag.h>
+#include <linux/grsecurity.h>
#include <asm/unistd.h>
-@@ -207,6 +208,9 @@ int do_truncate(struct dentry *dentry, l
+@@ -212,6 +213,9 @@ int do_truncate(struct dentry *dentry, l
if (length < 0)
return -EINVAL;
newattrs.ia_size = length;
newattrs.ia_valid = ATTR_SIZE | time_attrs;
if (filp) {
-@@ -407,6 +411,12 @@ asmlinkage long sys_utime(char __user *
+@@ -412,6 +416,12 @@ asmlinkage long sys_utime(char __user *
(error = vfs_permission(&nd, MAY_WRITE)) != 0)
goto dput_and_out;
}
mutex_lock(&inode->i_mutex);
error = notify_change(nd.dentry, &newattrs);
mutex_unlock(&inode->i_mutex);
-@@ -460,6 +470,12 @@ long do_utimes(int dfd, char __user *fil
+@@ -465,6 +475,12 @@ long do_utimes(int dfd, char __user *fil
(error = vfs_permission(&nd, MAY_WRITE)) != 0)
goto dput_and_out;
}
mutex_lock(&inode->i_mutex);
error = notify_change(nd.dentry, &newattrs);
mutex_unlock(&inode->i_mutex);
-@@ -526,6 +542,10 @@ asmlinkage long sys_faccessat(int dfd, c
- if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode)
+@@ -532,6 +548,10 @@ asmlinkage long sys_faccessat(int dfd, c
+ && (IS_RDONLY(nd.dentry->d_inode) || MNT_IS_RDONLY(nd.mnt))
&& !special_file(nd.dentry->d_inode->i_mode))
res = -EROFS;
+
path_release(&nd);
}
-@@ -554,6 +574,8 @@ asmlinkage long sys_chdir(const char __u
+@@ -560,6 +580,8 @@ asmlinkage long sys_chdir(const char __u
if (error)
goto dput_and_out;
set_fs_pwd(current->fs, nd.mnt, nd.dentry);
dput_and_out:
-@@ -584,6 +606,13 @@ asmlinkage long sys_fchdir(unsigned int
+@@ -590,6 +612,13 @@ asmlinkage long sys_fchdir(unsigned int
goto out_putf;
error = file_permission(file, MAY_EXEC);
if (!error)
set_fs_pwd(current->fs, mnt, dentry);
out_putf:
-@@ -609,8 +638,16 @@ asmlinkage long sys_chroot(const char __
+@@ -615,8 +644,16 @@ asmlinkage long sys_chroot(const char __
if (!capable(CAP_SYS_CHROOT))
goto dput_and_out;
error = 0;
dput_and_out:
path_release(&nd);
-@@ -641,9 +678,22 @@ asmlinkage long sys_fchmod(unsigned int
+@@ -647,9 +684,22 @@ asmlinkage long sys_fchmod(unsigned int
err = -EPERM;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
goto out_putf;
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
err = notify_change(dentry, &newattrs);
-@@ -676,9 +726,21 @@ asmlinkage long sys_fchmodat(int dfd, co
+@@ -682,9 +732,21 @@ asmlinkage long sys_fchmodat(int dfd, co
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
goto dput_and_out;
newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
error = notify_change(nd.dentry, &newattrs);
-@@ -695,7 +757,7 @@ asmlinkage long sys_chmod(const char __u
- return sys_fchmodat(AT_FDCWD, filename, mode);
- }
-
--static int chown_common(struct dentry * dentry, uid_t user, gid_t group)
-+static int chown_common(struct dentry * dentry, uid_t user, gid_t group, struct vfsmount *mnt)
- {
- struct inode * inode;
- int error;
-@@ -712,6 +774,12 @@ static int chown_common(struct dentry *
+@@ -719,6 +781,12 @@ static int chown_common(struct dentry *
error = -EPERM;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
goto out;
newattrs.ia_valid = ATTR_CTIME;
if (user != (uid_t) -1) {
newattrs.ia_valid |= ATTR_UID;
-@@ -737,7 +805,7 @@ asmlinkage long sys_chown(const char __u
-
- error = user_path_walk(filename, &nd);
- if (!error) {
-- error = chown_common(nd.dentry, user, group);
-+ error = chown_common(nd.dentry, user, group, nd.mnt);
- path_release(&nd);
- }
- return error;
-@@ -756,7 +824,7 @@ asmlinkage long sys_fchownat(int dfd, co
- follow = (flag & AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;
- error = __user_walk_fd(dfd, filename, follow, &nd);
- if (!error) {
-- error = chown_common(nd.dentry, user, group);
-+ error = chown_common(nd.dentry, user, group, nd.mnt);
- path_release(&nd);
- }
- out:
-@@ -770,7 +838,7 @@ asmlinkage long sys_lchown(const char __
-
- error = user_path_walk_link(filename, &nd);
- if (!error) {
-- error = chown_common(nd.dentry, user, group);
-+ error = chown_common(nd.dentry, user, group, nd.mnt);
- path_release(&nd);
- }
- return error;
-@@ -787,7 +855,7 @@ asmlinkage long sys_fchown(unsigned int
- struct dentry * dentry;
- dentry = file->f_dentry;
- audit_inode(NULL, dentry->d_inode, 0);
-- error = chown_common(dentry, user, group);
-+ error = chown_common(dentry, user, group, file->f_vfsmnt);
- fput(file);
- }
- return error;
-@@ -995,6 +1063,7 @@ repeat:
+@@ -1002,6 +1070,7 @@ repeat:
* N.B. For clone tasks sharing a files structure, this test
* will limit the total number of files that can be opened.
*/
diff -urNp linux-2.6.17.11/fs/pipe.c linux-2.6.17.11/fs/pipe.c
--- linux-2.6.17.11/fs/pipe.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/pipe.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/pipe.c 2006-09-01 16:20:28.000000000 -0400
@@ -842,7 +842,7 @@ void free_pipe_info(struct inode *inode)
inode->i_pipe = NULL;
}
return 1;
diff -urNp linux-2.6.17.11/fs/proc/array.c linux-2.6.17.11/fs/proc/array.c
--- linux-2.6.17.11/fs/proc/array.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/proc/array.c 2006-08-12 08:17:55.000000000 -0400
-@@ -293,6 +293,21 @@ static inline char *task_cap(struct task
- cap_t(p->cap_effective));
++++ linux-2.6.17.11/fs/proc/array.c 2006-09-01 16:20:28.000000000 -0400
+@@ -306,6 +306,21 @@ static inline char *task_cap(struct task
+ (unsigned)vx_info_mbcap(vxi, p->cap_effective));
}
+#if defined(CONFIG_PAX_NOEXEC) || defined(CONFIG_PAX_ASLR)
int proc_pid_status(struct task_struct *task, char * buffer)
{
char * orig = buffer;
-@@ -311,9 +326,20 @@ int proc_pid_status(struct task_struct *
+@@ -370,9 +385,20 @@ int proc_pid_status(struct task_struct *
#if defined(CONFIG_S390)
buffer = task_show_regs(task, buffer);
#endif
static int do_task_stat(struct task_struct *task, char * buffer, int whole)
{
unsigned long vsize, eip, esp, wchan = ~0UL;
-@@ -398,6 +424,19 @@ static int do_task_stat(struct task_stru
+@@ -461,6 +487,19 @@ static int do_task_stat(struct task_stru
stime = task->stime;
}
/* scale priority and nice values from timeslices to -20..20 */
/* to make it look like a "normal" Unix priority/nice value */
priority = task_prio(task);
-@@ -437,9 +476,15 @@ static int do_task_stat(struct task_stru
+@@ -511,9 +550,15 @@ static int do_task_stat(struct task_stru
vsize,
mm ? get_mm_rss(mm) : 0,
rsslim,
esp,
eip,
/* The signal information here is obsolete.
-@@ -485,3 +530,14 @@ int proc_pid_statm(struct task_struct *t
+@@ -559,3 +604,14 @@ int proc_pid_statm(struct task_struct *t
return sprintf(buffer,"%d %d %d %d %d %d %d\n",
size, resident, shared, text, lib, data, 0);
}
+
diff -urNp linux-2.6.17.11/fs/proc/base.c linux-2.6.17.11/fs/proc/base.c
--- linux-2.6.17.11/fs/proc/base.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/proc/base.c 2006-08-12 08:17:55.000000000 -0400
-@@ -72,6 +72,7 @@
- #include <linux/cpuset.h>
- #include <linux/audit.h>
- #include <linux/poll.h>
++++ linux-2.6.17.11/fs/proc/base.c 2006-09-01 16:20:28.000000000 -0400
+@@ -75,6 +75,7 @@
+ #include <linux/vs_context.h>
+ #include <linux/vs_network.h>
+ #include <linux/vs_pid.h>
+#include <linux/grsecurity.h>
#include "internal.h"
/*
-@@ -125,6 +126,9 @@ enum pid_directory_inos {
+@@ -130,6 +131,9 @@ enum pid_directory_inos {
#ifdef CONFIG_AUDITSYSCALL
PROC_TGID_LOGINUID,
#endif
PROC_TGID_OOM_SCORE,
PROC_TGID_OOM_ADJUST,
PROC_TID_INO,
-@@ -204,6 +208,9 @@ static struct pid_entry tgid_base_stuff[
+@@ -211,6 +215,9 @@ static struct pid_entry tgid_base_stuff[
E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO),
E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO),
E(PROC_TGID_MOUNTSTATS, "mountstats", S_IFREG|S_IRUSR),
#ifdef CONFIG_MMU
E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO),
#endif
-@@ -410,7 +417,7 @@ static int proc_task_root_link(struct in
+@@ -421,7 +428,7 @@ static int proc_task_root_link(struct in
(task->parent == current && \
(task->ptrace & PT_PTRACED) && \
(task->state == TASK_STOPPED || task->state == TASK_TRACED) && \
static int proc_pid_environ(struct task_struct *task, char * buffer)
{
-@@ -591,9 +598,25 @@ static int proc_check_root(struct inode
+@@ -607,9 +614,25 @@ static int proc_check_root(struct inode
static int proc_permission(struct inode *inode, int mask, struct nameidata *nd)
{
}
static int proc_setattr(struct dentry *dentry, struct iattr *attr)
-@@ -1396,6 +1419,9 @@ static struct inode *proc_pid_make_inode
- inode->i_uid = task->euid;
- inode->i_gid = task->egid;
+@@ -1423,6 +1446,9 @@ static struct inode *proc_pid_make_inode
}
+ /* procfs is xid tagged */
+ inode->i_tag = (tag_t)vx_task_xid(task);
+#ifdef CONFIG_GRKERNSEC_PROC_USERGROUP
+ inode->i_gid = CONFIG_GRKERNSEC_PROC_GID;
+#endif
security_task_to_inode(task, inode);
out:
-@@ -1424,7 +1450,9 @@ static int pid_revalidate(struct dentry
- if (pid_alive(task)) {
+@@ -1455,7 +1481,9 @@ static int pid_revalidate(struct dentry
+
if (proc_type(inode) == PROC_TGID_INO || proc_type(inode) == PROC_TID_INO || task_dumpable(task)) {
inode->i_uid = task->euid;
+#ifndef CONFIG_GRKERNSEC_PROC_USERGROUP
} else {
inode->i_uid = 0;
inode->i_gid = 0;
-@@ -1756,6 +1784,12 @@ static struct dentry *proc_pident_lookup
+@@ -1791,6 +1819,12 @@ static struct dentry *proc_pident_lookup
inode->i_fop = &proc_info_file_operations;
ei->op.proc_read = proc_pid_status;
break;
case PROC_TID_STAT:
inode->i_fop = &proc_info_file_operations;
ei->op.proc_read = proc_tid_stat;
-@@ -2069,6 +2103,22 @@ struct dentry *proc_pid_lookup(struct in
- if (!task)
- goto out;
+@@ -2140,11 +2174,34 @@ struct dentry *proc_pid_lookup(struct in
+ if (!proc_pid_visible(task, tgid))
+ goto out_drop_task;
+ if (gr_check_hidden_task(task)) {
+ put_task_struct(task);
+#endif
+
inode = proc_pid_make_inode(dir->i_sb, task, PROC_TGID_INO);
+ if (!inode)
+ goto out_drop_task;
-
-@@ -2076,7 +2126,15 @@ struct dentry *proc_pid_lookup(struct in
- put_task_struct(task);
- goto out;
- }
-+
+#ifdef CONFIG_GRKERNSEC_PROC_USER
+ inode->i_mode = S_IFDIR|S_IRUSR|S_IXUSR;
+#elif defined(CONFIG_GRKERNSEC_PROC_USERGROUP)
inode->i_op = &proc_tgid_base_inode_operations;
inode->i_fop = &proc_tgid_base_operations;
inode->i_flags|=S_IMMUTABLE;
-@@ -2168,6 +2226,9 @@ out:
+@@ -2243,6 +2300,9 @@ out:
static int get_tgid_list(int index, unsigned long version, unsigned int *tgids)
{
struct task_struct *p;
int nr_tgids = 0;
index--;
-@@ -2188,6 +2249,18 @@ static int get_tgid_list(int index, unsi
- int tgid = p->pid;
- if (!pid_alive(p))
+@@ -2267,6 +2327,18 @@ static int get_tgid_list(int index, unsi
+ /* check for context visibility */
+ if (!proc_pid_visible(p, tgid))
continue;
+ if (gr_pid_is_chrooted(p))
+ continue;
+#endif
if (--index >= 0)
continue;
- tgids[nr_tgids] = tgid;
+ tgids[nr_tgids] = vx_map_tgid(tgid);
diff -urNp linux-2.6.17.11/fs/proc/inode.c linux-2.6.17.11/fs/proc/inode.c
--- linux-2.6.17.11/fs/proc/inode.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/proc/inode.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/proc/inode.c 2006-09-01 16:20:28.000000000 -0400
@@ -169,7 +169,11 @@ struct inode *proc_get_inode(struct supe
if (de->mode) {
inode->i_mode = de->mode;
inode->i_gid = de->gid;
+#endif
}
- if (de->size)
- inode->i_size = de->size;
+ if (de->vx_flags)
+ PROC_I(inode)->vx_flags = de->vx_flags;
diff -urNp linux-2.6.17.11/fs/proc/internal.h linux-2.6.17.11/fs/proc/internal.h
--- linux-2.6.17.11/fs/proc/internal.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/proc/internal.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/proc/internal.h 2006-09-01 16:20:28.000000000 -0400
@@ -36,6 +36,9 @@ extern int proc_tid_stat(struct task_str
extern int proc_tgid_stat(struct task_struct *, char *);
extern int proc_pid_status(struct task_struct *, char *);
diff -urNp linux-2.6.17.11/fs/proc/proc_misc.c linux-2.6.17.11/fs/proc/proc_misc.c
--- linux-2.6.17.11/fs/proc/proc_misc.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/proc/proc_misc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/proc/proc_misc.c 2006-09-01 16:20:28.000000000 -0400
@@ -651,6 +651,8 @@ void create_seq_entry(char *name, mode_t
void __init proc_misc_init(void)
{
proc_root_kcore->proc_fops = &proc_kcore_operations;
diff -urNp linux-2.6.17.11/fs/proc/root.c linux-2.6.17.11/fs/proc/root.c
--- linux-2.6.17.11/fs/proc/root.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/proc/root.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/proc/root.c 2006-09-01 16:20:28.000000000 -0400
@@ -53,7 +53,13 @@ void __init proc_root_init(void)
return;
}
+#else
proc_bus = proc_mkdir("bus", NULL);
+#endif
+ proc_vx_init();
}
- static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat
diff -urNp linux-2.6.17.11/fs/proc/task_mmu.c linux-2.6.17.11/fs/proc/task_mmu.c
--- linux-2.6.17.11/fs/proc/task_mmu.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/proc/task_mmu.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/proc/task_mmu.c 2006-09-01 16:20:28.000000000 -0400
@@ -43,15 +43,27 @@ char *task_mem(struct mm_struct *mm, cha
"VmStk:\t%8lu kB\n"
"VmExe:\t%8lu kB\n"
m->version = (vma != get_gate_vma(task))? vma->vm_start: 0;
diff -urNp linux-2.6.17.11/fs/readdir.c linux-2.6.17.11/fs/readdir.c
--- linux-2.6.17.11/fs/readdir.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/readdir.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/readdir.c 2006-09-01 16:20:28.000000000 -0400
@@ -16,6 +16,8 @@
#include <linux/security.h>
#include <linux/syscalls.h>
diff -urNp linux-2.6.17.11/fs/xfs/linux-2.6/xfs_file.c linux-2.6.17.11/fs/xfs/linux-2.6/xfs_file.c
--- linux-2.6.17.11/fs/xfs/linux-2.6/xfs_file.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/fs/xfs/linux-2.6/xfs_file.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/fs/xfs/linux-2.6/xfs_file.c 2006-09-01 16:20:28.000000000 -0400
@@ -461,6 +461,11 @@ xfs_file_mmap(
vattr_t vattr;
int error;
#ifdef CONFIG_XFS_DMAPI
diff -urNp linux-2.6.17.11/grsecurity/gracl_alloc.c linux-2.6.17.11/grsecurity/gracl_alloc.c
--- linux-2.6.17.11/grsecurity/gracl_alloc.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_alloc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl_alloc.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,91 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/gracl.c linux-2.6.17.11/grsecurity/gracl.c
--- linux-2.6.17.11/grsecurity/gracl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,3547 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+
diff -urNp linux-2.6.17.11/grsecurity/gracl_cap.c linux-2.6.17.11/grsecurity/gracl_cap.c
--- linux-2.6.17.11/grsecurity/gracl_cap.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_cap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl_cap.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,110 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+
diff -urNp linux-2.6.17.11/grsecurity/gracl_fs.c linux-2.6.17.11/grsecurity/gracl_fs.c
--- linux-2.6.17.11/grsecurity/gracl_fs.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_fs.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl_fs.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,423 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/gracl_ip.c linux-2.6.17.11/grsecurity/gracl_ip.c
--- linux-2.6.17.11/grsecurity/gracl_ip.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_ip.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl_ip.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,313 @@
+#include <linux/kernel.h>
+#include <asm/uaccess.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/gracl_learn.c linux-2.6.17.11/grsecurity/gracl_learn.c
--- linux-2.6.17.11/grsecurity/gracl_learn.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_learn.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl_learn.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,204 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+};
diff -urNp linux-2.6.17.11/grsecurity/gracl_res.c linux-2.6.17.11/grsecurity/gracl_res.c
--- linux-2.6.17.11/grsecurity/gracl_res.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_res.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl_res.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,45 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/gracl_segv.c linux-2.6.17.11/grsecurity/gracl_segv.c
--- linux-2.6.17.11/grsecurity/gracl_segv.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_segv.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/gracl_segv.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,295 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/gracl_shm.c linux-2.6.17.11/grsecurity/gracl_shm.c
--- linux-2.6.17.11/grsecurity/gracl_shm.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/gracl_shm.c 2006-08-12 08:17:55.000000000 -0400
-@@ -0,0 +1,33 @@
++++ linux-2.6.17.11/grsecurity/gracl_shm.c 2006-09-01 16:20:28.000000000 -0400
+@@ -0,0 +1,34 @@
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/gracl.h>
+#include <linux/grsecurity.h>
+#include <linux/grinternal.h>
++#include <linux/vs_pid.h>
+
+int
+gr_handle_shmat(const pid_t shm_cprid, const pid_t shm_lapid,
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_chdir.c linux-2.6.17.11/grsecurity/grsec_chdir.c
--- linux-2.6.17.11/grsecurity/grsec_chdir.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_chdir.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_chdir.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,19 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_chroot.c linux-2.6.17.11/grsecurity/grsec_chroot.c
--- linux-2.6.17.11/grsecurity/grsec_chroot.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_chroot.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_chroot.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,332 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#endif
diff -urNp linux-2.6.17.11/grsecurity/grsec_disabled.c linux-2.6.17.11/grsecurity/grsec_disabled.c
--- linux-2.6.17.11/grsecurity/grsec_disabled.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_disabled.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_disabled.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,418 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+#endif
diff -urNp linux-2.6.17.11/grsecurity/grsec_exec.c linux-2.6.17.11/grsecurity/grsec_exec.c
--- linux-2.6.17.11/grsecurity/grsec_exec.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_exec.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_exec.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,88 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_fifo.c linux-2.6.17.11/grsecurity/grsec_fifo.c
--- linux-2.6.17.11/grsecurity/grsec_fifo.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_fifo.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_fifo.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,22 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_fork.c linux-2.6.17.11/grsecurity/grsec_fork.c
--- linux-2.6.17.11/grsecurity/grsec_fork.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_fork.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_fork.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,15 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_init.c linux-2.6.17.11/grsecurity/grsec_init.c
--- linux-2.6.17.11/grsecurity/grsec_init.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_init.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_init.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,236 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_ipc.c linux-2.6.17.11/grsecurity/grsec_ipc.c
--- linux-2.6.17.11/grsecurity/grsec_ipc.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_ipc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_ipc.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,81 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_link.c linux-2.6.17.11/grsecurity/grsec_link.c
--- linux-2.6.17.11/grsecurity/grsec_link.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_link.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_link.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,39 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_log.c linux-2.6.17.11/grsecurity/grsec_log.c
--- linux-2.6.17.11/grsecurity/grsec_log.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_log.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_log.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,265 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_mem.c linux-2.6.17.11/grsecurity/grsec_mem.c
--- linux-2.6.17.11/grsecurity/grsec_mem.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_mem.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_mem.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,71 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_mount.c linux-2.6.17.11/grsecurity/grsec_mount.c
--- linux-2.6.17.11/grsecurity/grsec_mount.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_mount.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_mount.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,34 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_rand.c linux-2.6.17.11/grsecurity/grsec_rand.c
--- linux-2.6.17.11/grsecurity/grsec_rand.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_rand.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_rand.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,26 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_sig.c linux-2.6.17.11/grsecurity/grsec_sig.c
--- linux-2.6.17.11/grsecurity/grsec_sig.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_sig.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_sig.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,59 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
diff -urNp linux-2.6.17.11/grsecurity/grsec_sock.c linux-2.6.17.11/grsecurity/grsec_sock.c
--- linux-2.6.17.11/grsecurity/grsec_sock.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_sock.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_sock.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,263 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_sysctl.c linux-2.6.17.11/grsecurity/grsec_sysctl.c
--- linux-2.6.17.11/grsecurity/grsec_sysctl.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_sysctl.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_sysctl.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,466 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_textrel.c linux-2.6.17.11/grsecurity/grsec_textrel.c
--- linux-2.6.17.11/grsecurity/grsec_textrel.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_textrel.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_textrel.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,16 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_time.c linux-2.6.17.11/grsecurity/grsec_time.c
--- linux-2.6.17.11/grsecurity/grsec_time.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_time.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_time.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,13 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsec_tpe.c linux-2.6.17.11/grsecurity/grsec_tpe.c
--- linux-2.6.17.11/grsecurity/grsec_tpe.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsec_tpe.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsec_tpe.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,37 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/grsum.c linux-2.6.17.11/grsecurity/grsum.c
--- linux-2.6.17.11/grsecurity/grsum.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/grsum.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/grsum.c 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,59 @@
+#include <linux/kernel.h>
+#include <linux/sched.h>
+}
diff -urNp linux-2.6.17.11/grsecurity/Kconfig linux-2.6.17.11/grsecurity/Kconfig
--- linux-2.6.17.11/grsecurity/Kconfig 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/Kconfig 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/Kconfig 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,890 @@
+#
+# grecurity configuration
+endmenu
diff -urNp linux-2.6.17.11/grsecurity/Makefile linux-2.6.17.11/grsecurity/Makefile
--- linux-2.6.17.11/grsecurity/Makefile 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/grsecurity/Makefile 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/grsecurity/Makefile 2006-09-01 16:20:28.000000000 -0400
@@ -0,0 +1,20 @@
+# grsecurity's ACL system was originally written in 2001 by Michael Dalton
+# during 2001-2005 it has been completely redesigned by Brad Spengler
+
diff -urNp linux-2.6.17.11/include/asm-alpha/a.out.h linux-2.6.17.11/include/asm-alpha/a.out.h
--- linux-2.6.17.11/include/asm-alpha/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-alpha/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-alpha/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -98,7 +98,7 @@ struct exec
set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \
? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
#endif
diff -urNp linux-2.6.17.11/include/asm-alpha/elf.h linux-2.6.17.11/include/asm-alpha/elf.h
--- linux-2.6.17.11/include/asm-alpha/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-alpha/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-alpha/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -91,6 +91,17 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_N
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x1000000)
linker to call DT_FINI functions for shared libraries that have
diff -urNp linux-2.6.17.11/include/asm-alpha/kmap_types.h linux-2.6.17.11/include/asm-alpha/kmap_types.h
--- linux-2.6.17.11/include/asm-alpha/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-alpha/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-alpha/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -25,7 +25,8 @@ D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
#undef D
diff -urNp linux-2.6.17.11/include/asm-alpha/page.h linux-2.6.17.11/include/asm-alpha/page.h
--- linux-2.6.17.11/include/asm-alpha/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-alpha/page.h 2006-08-12 08:17:55.000000000 -0400
-@@ -93,6 +93,16 @@ typedef unsigned long pgprot_t;
++++ linux-2.6.17.11/include/asm-alpha/page.h 2006-09-01 16:20:29.000000000 -0400
+@@ -95,6 +95,16 @@ typedef unsigned long pgprot_t;
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#include <asm-generic/memory_model.h>
diff -urNp linux-2.6.17.11/include/asm-alpha/pgtable.h linux-2.6.17.11/include/asm-alpha/pgtable.h
--- linux-2.6.17.11/include/asm-alpha/pgtable.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-alpha/pgtable.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-alpha/pgtable.h 2006-09-01 16:20:29.000000000 -0400
@@ -102,6 +102,17 @@ struct vm_area_struct;
#define PAGE_SHARED __pgprot(_PAGE_VALID | __ACCESS_BITS)
#define PAGE_COPY __pgprot(_PAGE_VALID | __ACCESS_BITS | _PAGE_FOW)
#define _PAGE_NORMAL(x) __pgprot(_PAGE_VALID | __ACCESS_BITS | (x))
diff -urNp linux-2.6.17.11/include/asm-arm/a.out.h linux-2.6.17.11/include/asm-arm/a.out.h
--- linux-2.6.17.11/include/asm-arm/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-arm/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-arm/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -28,7 +28,7 @@ struct exec
#define M_ARM 103
diff -urNp linux-2.6.17.11/include/asm-arm/elf.h linux-2.6.17.11/include/asm-arm/elf.h
--- linux-2.6.17.11/include/asm-arm/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-arm/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-arm/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -56,6 +56,17 @@ typedef struct user_fp elf_fpregset_t;
#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
have no such handler. */
diff -urNp linux-2.6.17.11/include/asm-arm/kmap_types.h linux-2.6.17.11/include/asm-arm/kmap_types.h
--- linux-2.6.17.11/include/asm-arm/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-arm/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-arm/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -18,6 +18,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-arm26/kmap_types.h linux-2.6.17.11/include/asm-arm26/kmap_types.h
--- linux-2.6.17.11/include/asm-arm26/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-arm26/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-arm26/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -6,7 +6,8 @@
*/
enum km_type {
#endif
diff -urNp linux-2.6.17.11/include/asm-cris/kmap_types.h linux-2.6.17.11/include/asm-cris/kmap_types.h
--- linux-2.6.17.11/include/asm-cris/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-cris/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-cris/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -19,6 +19,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-frv/kmap_types.h linux-2.6.17.11/include/asm-frv/kmap_types.h
--- linux-2.6.17.11/include/asm-frv/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-frv/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-frv/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -23,6 +23,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-h8300/kmap_types.h linux-2.6.17.11/include/asm-h8300/kmap_types.h
--- linux-2.6.17.11/include/asm-h8300/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-h8300/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-h8300/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -15,6 +15,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-i386/alternative.h linux-2.6.17.11/include/asm-i386/alternative.h
--- linux-2.6.17.11/include/asm-i386/alternative.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/alternative.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/alternative.h 2006-09-01 16:20:29.000000000 -0400
@@ -47,7 +47,7 @@ extern void alternatives_smp_switch(int
" .byte 662b-661b\n" /* sourcelen */ \
" .byte 664f-663f\n" /* replacementlen */ \
".previous" : args)
diff -urNp linux-2.6.17.11/include/asm-i386/a.out.h linux-2.6.17.11/include/asm-i386/a.out.h
--- linux-2.6.17.11/include/asm-i386/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -19,7 +19,11 @@ struct exec
#ifdef __KERNEL__
diff -urNp linux-2.6.17.11/include/asm-i386/auxvec.h linux-2.6.17.11/include/asm-i386/auxvec.h
--- linux-2.6.17.11/include/asm-i386/auxvec.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/auxvec.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/auxvec.h 2006-09-01 16:20:29.000000000 -0400
@@ -5,7 +5,9 @@
* Architecture-neutral AT_ values in 0-17, leave some room
* for more of them, start the x86-specific ones at 32.
#endif
diff -urNp linux-2.6.17.11/include/asm-i386/bug.h linux-2.6.17.11/include/asm-i386/bug.h
--- linux-2.6.17.11/include/asm-i386/bug.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/bug.h 2006-08-12 08:17:55.000000000 -0400
-@@ -12,10 +12,10 @@
++++ linux-2.6.17.11/include/asm-i386/bug.h 2006-09-01 16:20:31.000000000 -0400
+@@ -12,10 +12,9 @@
#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
- "\t.long %c1\n" \
+#define BUG() \
+ __asm__ __volatile__( "ud2\n\t" \
-+ "testl %c0, %%eax\n\t" \
-+ "testl %c1, %%eax\n\t" \
++ "ljmp %0, %1\n\t" \
: : "i" (__LINE__), "i" (__FILE__))
#else
#define BUG() __asm__ __volatile__("ud2\n")
diff -urNp linux-2.6.17.11/include/asm-i386/checksum.h linux-2.6.17.11/include/asm-i386/checksum.h
--- linux-2.6.17.11/include/asm-i386/checksum.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/checksum.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/checksum.h 2006-09-01 16:20:29.000000000 -0400
@@ -30,6 +30,12 @@ asmlinkage unsigned int csum_partial(con
asmlinkage unsigned int csum_partial_copy_generic(const unsigned char *src, unsigned char *dst,
int len, int sum, int *src_err_ptr, int *dst_err_ptr);
*err_ptr = -EFAULT;
diff -urNp linux-2.6.17.11/include/asm-i386/desc.h linux-2.6.17.11/include/asm-i386/desc.h
--- linux-2.6.17.11/include/asm-i386/desc.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/desc.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/desc.h 2006-09-01 16:20:29.000000000 -0400
@@ -10,11 +10,13 @@
#include <linux/preempt.h>
#endif
diff -urNp linux-2.6.17.11/include/asm-i386/elf.h linux-2.6.17.11/include/asm-i386/elf.h
--- linux-2.6.17.11/include/asm-i386/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/elf.h 2006-08-12 08:17:55.000000000 -0400
-@@ -71,7 +71,22 @@ typedef struct user_fxsr_struct elf_fpxr
- the loader. We need to make sure that it is out of the way of the program
- that it will "exec", and that there is sufficient room for the brk. */
++++ linux-2.6.17.11/include/asm-i386/elf.h 2006-09-01 16:20:29.000000000 -0400
+@@ -73,6 +73,17 @@ typedef struct user_fxsr_struct elf_fpxr
+
+ #define ELF_ET_DYN_BASE ((TASK_UNMAPPED_BASE) * 2)
-+#ifdef CONFIG_PAX_SEGMEXEC
-+#define ELF_ET_DYN_BASE ((current->mm->pax_flags & MF_PAX_SEGMEXEC) ? SEGMEXEC_TASK_SIZE/3*2 : TASK_SIZE/3*2)
-+#else
- #define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
-+#endif
-+
+#ifdef CONFIG_PAX_ASLR
+#define PAX_ELF_ET_DYN_BASE(tsk) 0x10000000UL
+
+#define PAX_DELTA_STACK_LSB(tsk) PAGE_SHIFT
+#define PAX_DELTA_STACK_LEN(tsk) ((tsk)->mm->pax_flags & MF_PAX_SEGMEXEC ? 15 : 16)
+#endif
-
++
/* regs is struct pt_regs, pr_reg is elf_gregset_t (which is
now struct_user_regs, they are different) */
+
@@ -131,7 +146,14 @@ extern int dump_task_extended_fpu (struc
#define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL))
+#endif
diff -urNp linux-2.6.17.11/include/asm-i386/i387.h linux-2.6.17.11/include/asm-i386/i387.h
--- linux-2.6.17.11/include/asm-i386/i387.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/i387.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/i387.h 2006-09-01 16:20:29.000000000 -0400
@@ -40,13 +40,8 @@ extern void kernel_fpu_begin(void);
#define kernel_fpu_end() do { stts(); preempt_enable(); } while(0)
* These must be called with preempt disabled
diff -urNp linux-2.6.17.11/include/asm-i386/kmap_types.h linux-2.6.17.11/include/asm-i386/kmap_types.h
--- linux-2.6.17.11/include/asm-i386/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -23,7 +23,8 @@ D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
#undef D
diff -urNp linux-2.6.17.11/include/asm-i386/mach-default/apm.h linux-2.6.17.11/include/asm-i386/mach-default/apm.h
--- linux-2.6.17.11/include/asm-i386/mach-default/apm.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/mach-default/apm.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/mach-default/apm.h 2006-09-01 16:20:29.000000000 -0400
@@ -36,7 +36,7 @@ static inline void apm_bios_call_asm(u32
__asm__ __volatile__(APM_DO_ZERO_SEGS
"pushl %%edi\n\t"
"popl %%edi\n\t"
diff -urNp linux-2.6.17.11/include/asm-i386/mach-default/do_timer.h linux-2.6.17.11/include/asm-i386/mach-default/do_timer.h
--- linux-2.6.17.11/include/asm-i386/mach-default/do_timer.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/mach-default/do_timer.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/mach-default/do_timer.h 2006-09-01 16:20:29.000000000 -0400
@@ -18,7 +18,7 @@ static inline void do_timer_interrupt_ho
{
do_timer(regs);
* In the SMP case we use the local APIC timer interrupt to do the
diff -urNp linux-2.6.17.11/include/asm-i386/mach-visws/do_timer.h linux-2.6.17.11/include/asm-i386/mach-visws/do_timer.h
--- linux-2.6.17.11/include/asm-i386/mach-visws/do_timer.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/mach-visws/do_timer.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/mach-visws/do_timer.h 2006-09-01 16:20:29.000000000 -0400
@@ -11,7 +11,7 @@ static inline void do_timer_interrupt_ho
do_timer(regs);
* In the SMP case we use the local APIC timer interrupt to do the
diff -urNp linux-2.6.17.11/include/asm-i386/mach-voyager/do_timer.h linux-2.6.17.11/include/asm-i386/mach-voyager/do_timer.h
--- linux-2.6.17.11/include/asm-i386/mach-voyager/do_timer.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/mach-voyager/do_timer.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/mach-voyager/do_timer.h 2006-09-01 16:20:29.000000000 -0400
@@ -5,7 +5,7 @@ static inline void do_timer_interrupt_ho
{
do_timer(regs);
voyager_timer_interrupt(regs);
diff -urNp linux-2.6.17.11/include/asm-i386/mman.h linux-2.6.17.11/include/asm-i386/mman.h
--- linux-2.6.17.11/include/asm-i386/mman.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/mman.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/mman.h 2006-09-01 16:20:29.000000000 -0400
@@ -11,6 +11,10 @@
#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
diff -urNp linux-2.6.17.11/include/asm-i386/mmu_context.h linux-2.6.17.11/include/asm-i386/mmu_context.h
--- linux-2.6.17.11/include/asm-i386/mmu_context.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/mmu_context.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/mmu_context.h 2006-09-01 16:20:29.000000000 -0400
@@ -46,6 +46,18 @@ static inline void switch_mm(struct mm_s
*/
if (unlikely(prev->context.ldt != next->context.ldt))
#endif
diff -urNp linux-2.6.17.11/include/asm-i386/mmu.h linux-2.6.17.11/include/asm-i386/mmu.h
--- linux-2.6.17.11/include/asm-i386/mmu.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/mmu.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/mmu.h 2006-09-01 16:20:29.000000000 -0400
@@ -12,6 +12,17 @@ typedef struct {
int size;
struct semaphore sem;
#endif
diff -urNp linux-2.6.17.11/include/asm-i386/module.h linux-2.6.17.11/include/asm-i386/module.h
--- linux-2.6.17.11/include/asm-i386/module.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/module.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/module.h 2006-09-01 16:20:29.000000000 -0400
@@ -72,6 +72,12 @@ struct mod_arch_specific
#define MODULE_STACKSIZE ""
#endif
#endif /* _ASM_I386_MODULE_H */
diff -urNp linux-2.6.17.11/include/asm-i386/page.h linux-2.6.17.11/include/asm-i386/page.h
--- linux-2.6.17.11/include/asm-i386/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/page.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/page.h 2006-09-01 16:20:31.000000000 -0400
@@ -52,13 +52,14 @@ typedef struct { unsigned long long pgpr
#define pmd_val(x) ((x).pmd)
#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
#define __pmd(x) ((pmd_t) { (x) } )
-+#define __pte(x) ({ pte_t __pte = {(x), (x) >> 32}; __pte;})
++#define __pte(x) ({ pte_t __pte = {(x), (x) >> 32}; __pte; })
#define HPAGE_SHIFT 21
#else
typedef struct { unsigned long pte_low; } pte_t;
#include <asm-generic/memory_model.h>
diff -urNp linux-2.6.17.11/include/asm-i386/pgalloc.h linux-2.6.17.11/include/asm-i386/pgalloc.h
--- linux-2.6.17.11/include/asm-i386/pgalloc.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/pgalloc.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/pgalloc.h 2006-09-01 16:20:29.000000000 -0400
@@ -3,11 +3,17 @@
#include <linux/config.h>
set_pmd(pmd, __pmd(_PAGE_TABLE + \
diff -urNp linux-2.6.17.11/include/asm-i386/pgtable.h linux-2.6.17.11/include/asm-i386/pgtable.h
--- linux-2.6.17.11/include/asm-i386/pgtable.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/pgtable.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/pgtable.h 2006-09-01 16:20:29.000000000 -0400
@@ -34,7 +34,6 @@ struct vm_area_struct;
*/
#define ZERO_PAGE(vaddr) (virt_to_page(empty_zero_page))
#endif /* CONFIG_FLATMEM */
diff -urNp linux-2.6.17.11/include/asm-i386/processor.h linux-2.6.17.11/include/asm-i386/processor.h
--- linux-2.6.17.11/include/asm-i386/processor.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/processor.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/processor.h 2006-09-01 16:20:29.000000000 -0400
@@ -19,7 +19,6 @@
#include <linux/cache.h>
#include <linux/config.h>
diff -urNp linux-2.6.17.11/include/asm-i386/ptrace.h linux-2.6.17.11/include/asm-i386/ptrace.h
--- linux-2.6.17.11/include/asm-i386/ptrace.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/ptrace.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/ptrace.h 2006-09-01 16:20:29.000000000 -0400
@@ -65,17 +65,18 @@ struct task_struct;
extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
}
diff -urNp linux-2.6.17.11/include/asm-i386/system.h linux-2.6.17.11/include/asm-i386/system.h
--- linux-2.6.17.11/include/asm-i386/system.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/system.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/system.h 2006-09-01 16:20:29.000000000 -0400
@@ -5,6 +5,7 @@
#include <linux/kernel.h>
#include <asm/segment.h>
void default_idle(void);
diff -urNp linux-2.6.17.11/include/asm-i386/uaccess.h linux-2.6.17.11/include/asm-i386/uaccess.h
--- linux-2.6.17.11/include/asm-i386/uaccess.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-i386/uaccess.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-i386/uaccess.h 2006-09-01 16:20:29.000000000 -0400
@@ -10,6 +10,8 @@
#include <linux/prefetch.h>
#include <linux/string.h>
unsigned long __must_check __copy_to_user_ll(void __user *to,
diff -urNp linux-2.6.17.11/include/asm-ia64/elf.h linux-2.6.17.11/include/asm-ia64/elf.h
--- linux-2.6.17.11/include/asm-ia64/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ia64/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ia64/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -163,6 +163,16 @@ typedef elf_greg_t elf_gregset_t[ELF_NGR
typedef struct ia64_fpreg elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
struct pt_regs; /* forward declaration... */
diff -urNp linux-2.6.17.11/include/asm-ia64/kmap_types.h linux-2.6.17.11/include/asm-ia64/kmap_types.h
--- linux-2.6.17.11/include/asm-ia64/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ia64/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ia64/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -23,7 +23,8 @@ D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
#undef D
diff -urNp linux-2.6.17.11/include/asm-ia64/page.h linux-2.6.17.11/include/asm-ia64/page.h
--- linux-2.6.17.11/include/asm-ia64/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ia64/page.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ia64/page.h 2006-09-01 16:20:29.000000000 -0400
@@ -229,4 +229,13 @@ get_order (unsigned long size)
(((current->personality & READ_IMPLIES_EXEC) != 0) \
? VM_EXEC : 0))
#endif /* _ASM_IA64_PAGE_H */
diff -urNp linux-2.6.17.11/include/asm-ia64/pgtable.h linux-2.6.17.11/include/asm-ia64/pgtable.h
--- linux-2.6.17.11/include/asm-ia64/pgtable.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ia64/pgtable.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ia64/pgtable.h 2006-09-01 16:20:29.000000000 -0400
@@ -144,6 +144,17 @@
#define PAGE_READONLY __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_R)
#define PAGE_COPY __pgprot(__ACCESS_BITS | _PAGE_PL_3 | _PAGE_AR_R)
#define PAGE_KERNELRX __pgprot(__ACCESS_BITS | _PAGE_PL_0 | _PAGE_AR_RX)
diff -urNp linux-2.6.17.11/include/asm-ia64/processor.h linux-2.6.17.11/include/asm-ia64/processor.h
--- linux-2.6.17.11/include/asm-ia64/processor.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ia64/processor.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ia64/processor.h 2006-09-01 16:20:29.000000000 -0400
@@ -284,7 +284,7 @@ struct thread_struct {
.on_ustack = 0, \
.ksp = 0, \
INIT_THREAD_IA32 \
diff -urNp linux-2.6.17.11/include/asm-ia64/ustack.h linux-2.6.17.11/include/asm-ia64/ustack.h
--- linux-2.6.17.11/include/asm-ia64/ustack.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ia64/ustack.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ia64/ustack.h 2006-09-01 16:20:29.000000000 -0400
@@ -11,6 +11,6 @@
#define MAX_USER_STACK_SIZE (RGN_MAP_LIMIT/2)
/* Make a default stack size of 2GB */
#endif /* _ASM_IA64_USTACK_H */
diff -urNp linux-2.6.17.11/include/asm-m32r/kmap_types.h linux-2.6.17.11/include/asm-m32r/kmap_types.h
--- linux-2.6.17.11/include/asm-m32r/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-m32r/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-m32r/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -25,7 +25,8 @@ D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
#undef D
diff -urNp linux-2.6.17.11/include/asm-m68k/kmap_types.h linux-2.6.17.11/include/asm-m68k/kmap_types.h
--- linux-2.6.17.11/include/asm-m68k/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-m68k/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-m68k/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -15,6 +15,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-m68knommu/kmap_types.h linux-2.6.17.11/include/asm-m68knommu/kmap_types.h
--- linux-2.6.17.11/include/asm-m68knommu/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-m68knommu/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-m68knommu/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -15,6 +15,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-mips/a.out.h linux-2.6.17.11/include/asm-mips/a.out.h
--- linux-2.6.17.11/include/asm-mips/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-mips/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-mips/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -36,10 +36,10 @@ struct exec
#ifdef __KERNEL__
#endif
diff -urNp linux-2.6.17.11/include/asm-mips/elf.h linux-2.6.17.11/include/asm-mips/elf.h
--- linux-2.6.17.11/include/asm-mips/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-mips/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-mips/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -372,4 +372,15 @@ extern int dump_task_fpu(struct task_str
#define ELF_ET_DYN_BASE (TASK_SIZE / 3 * 2)
#endif
#endif /* _ASM_ELF_H */
diff -urNp linux-2.6.17.11/include/asm-mips/kmap_types.h linux-2.6.17.11/include/asm-mips/kmap_types.h
--- linux-2.6.17.11/include/asm-mips/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-mips/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-mips/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -23,7 +23,8 @@ D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
#undef D
diff -urNp linux-2.6.17.11/include/asm-mips/page.h linux-2.6.17.11/include/asm-mips/page.h
--- linux-2.6.17.11/include/asm-mips/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-mips/page.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-mips/page.h 2006-09-01 16:20:31.000000000 -0400
@@ -79,15 +79,17 @@ static inline void copy_user_page(void *
#ifdef CONFIG_CPU_MIPS32
typedef struct { unsigned long pte_low, pte_high; } pte_t;
#define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32))
-+ #define __pte(x) ({ pte_t __pte = {(x), (x) >> 32}; __pte;})
++ #define __pte(x) ({ pte_t __pte = {(x), (x) >> 32}; __pte; })
#else
typedef struct { unsigned long long pte; } pte_t;
#define pte_val(x) ((x).pte)
diff -urNp linux-2.6.17.11/include/asm-parisc/a.out.h linux-2.6.17.11/include/asm-parisc/a.out.h
--- linux-2.6.17.11/include/asm-parisc/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-parisc/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-parisc/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -22,7 +22,7 @@ struct exec
/* XXX: STACK_TOP actually should be STACK_BOTTOM for parisc.
* prumpf */
diff -urNp linux-2.6.17.11/include/asm-parisc/elf.h linux-2.6.17.11/include/asm-parisc/elf.h
--- linux-2.6.17.11/include/asm-parisc/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-parisc/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-parisc/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -337,6 +337,17 @@ struct pt_regs; /* forward declaration..
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE + 0x01000000)
but it's not easy, and we've already done it here. */
diff -urNp linux-2.6.17.11/include/asm-parisc/kmap_types.h linux-2.6.17.11/include/asm-parisc/kmap_types.h
--- linux-2.6.17.11/include/asm-parisc/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-parisc/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-parisc/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -23,7 +23,8 @@ D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
#undef D
diff -urNp linux-2.6.17.11/include/asm-parisc/page.h linux-2.6.17.11/include/asm-parisc/page.h
--- linux-2.6.17.11/include/asm-parisc/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-parisc/page.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-parisc/page.h 2006-09-01 16:20:29.000000000 -0400
@@ -189,6 +189,15 @@ extern int npmem_ranges;
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#include <asm-generic/memory_model.h>
diff -urNp linux-2.6.17.11/include/asm-parisc/pgtable.h linux-2.6.17.11/include/asm-parisc/pgtable.h
--- linux-2.6.17.11/include/asm-parisc/pgtable.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-parisc/pgtable.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-parisc/pgtable.h 2006-09-01 16:20:29.000000000 -0400
@@ -220,6 +220,17 @@ extern void *vmalloc_start;
#define PAGE_EXECREAD __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_READ | _PAGE_EXEC |_PAGE_ACCESSED)
#define PAGE_COPY PAGE_EXECREAD
#define PAGE_KERNEL_UNC __pgprot(_PAGE_KERNEL | _PAGE_NO_CACHE)
diff -urNp linux-2.6.17.11/include/asm-powerpc/a.out.h linux-2.6.17.11/include/asm-powerpc/a.out.h
--- linux-2.6.17.11/include/asm-powerpc/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-powerpc/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-powerpc/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -23,12 +23,12 @@ struct exec
#define STACK_TOP_USER64 TASK_SIZE_USER64
#define STACK_TOP_USER32 TASK_SIZE_USER32
#endif /* __KERNEL__ */
diff -urNp linux-2.6.17.11/include/asm-powerpc/elf.h linux-2.6.17.11/include/asm-powerpc/elf.h
--- linux-2.6.17.11/include/asm-powerpc/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-powerpc/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-powerpc/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -176,6 +176,26 @@ typedef elf_vrreg_t elf_vrregset_t32[ELF
#define ELF_ET_DYN_BASE (0x08000000)
/* Common routine for both 32-bit and 64-bit processes */
diff -urNp linux-2.6.17.11/include/asm-powerpc/kmap_types.h linux-2.6.17.11/include/asm-powerpc/kmap_types.h
--- linux-2.6.17.11/include/asm-powerpc/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-powerpc/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-powerpc/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -26,6 +26,7 @@ enum km_type {
KM_SOFTIRQ1,
KM_PPC_SYNC_PAGE,
diff -urNp linux-2.6.17.11/include/asm-powerpc/page_64.h linux-2.6.17.11/include/asm-powerpc/page_64.h
--- linux-2.6.17.11/include/asm-powerpc/page_64.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-powerpc/page_64.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-powerpc/page_64.h 2006-09-01 16:20:29.000000000 -0400
@@ -170,6 +170,15 @@ extern unsigned int HPAGE_SHIFT;
(test_thread_flag(TIF_32BIT) ? \
VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64)
#endif /* __KERNEL__ */
diff -urNp linux-2.6.17.11/include/asm-ppc/page.h linux-2.6.17.11/include/asm-ppc/page.h
--- linux-2.6.17.11/include/asm-ppc/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ppc/page.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ppc/page.h 2006-09-01 16:20:29.000000000 -0400
@@ -175,6 +175,15 @@ extern __inline__ int get_order(unsigned
/* We do define AT_SYSINFO_EHDR but don't use the gate mecanism */
#define __HAVE_ARCH_GATE_AREA 1
#endif /* _PPC_PAGE_H */
diff -urNp linux-2.6.17.11/include/asm-ppc/pgtable.h linux-2.6.17.11/include/asm-ppc/pgtable.h
--- linux-2.6.17.11/include/asm-ppc/pgtable.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-ppc/pgtable.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-ppc/pgtable.h 2006-09-01 16:20:29.000000000 -0400
@@ -441,11 +441,21 @@ extern unsigned long ioremap_bot, iorema
#define PAGE_NONE __pgprot(_PAGE_BASE)
#ifndef __ASSEMBLY__
diff -urNp linux-2.6.17.11/include/asm-s390/kmap_types.h linux-2.6.17.11/include/asm-s390/kmap_types.h
--- linux-2.6.17.11/include/asm-s390/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-s390/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-s390/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -16,6 +16,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-sh/kmap_types.h linux-2.6.17.11/include/asm-sh/kmap_types.h
--- linux-2.6.17.11/include/asm-sh/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sh/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sh/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -25,7 +25,8 @@ D(9) KM_IRQ0,
D(10) KM_IRQ1,
D(11) KM_SOFTIRQ0,
#undef D
diff -urNp linux-2.6.17.11/include/asm-sparc/a.out.h linux-2.6.17.11/include/asm-sparc/a.out.h
--- linux-2.6.17.11/include/asm-sparc/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -91,7 +91,7 @@ struct relocation_info /* used when head
#include <asm/page.h>
diff -urNp linux-2.6.17.11/include/asm-sparc/elf.h linux-2.6.17.11/include/asm-sparc/elf.h
--- linux-2.6.17.11/include/asm-sparc/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -145,6 +145,17 @@ typedef struct {
#define ELF_ET_DYN_BASE (TASK_UNMAPPED_BASE)
on Sparc. */
diff -urNp linux-2.6.17.11/include/asm-sparc/kmap_types.h linux-2.6.17.11/include/asm-sparc/kmap_types.h
--- linux-2.6.17.11/include/asm-sparc/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -15,6 +15,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-sparc/page.h linux-2.6.17.11/include/asm-sparc/page.h
--- linux-2.6.17.11/include/asm-sparc/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc/page.h 2006-08-12 08:17:55.000000000 -0400
-@@ -161,6 +161,15 @@ extern unsigned long pfn_base;
++++ linux-2.6.17.11/include/asm-sparc/page.h 2006-09-01 16:20:29.000000000 -0400
+@@ -163,6 +163,15 @@ extern unsigned long pfn_base;
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#include <asm-generic/memory_model.h>
diff -urNp linux-2.6.17.11/include/asm-sparc/pgtable.h linux-2.6.17.11/include/asm-sparc/pgtable.h
--- linux-2.6.17.11/include/asm-sparc/pgtable.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc/pgtable.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc/pgtable.h 2006-09-01 16:20:29.000000000 -0400
@@ -50,6 +50,13 @@ BTFIXUPDEF_INT(page_none)
BTFIXUPDEF_INT(page_shared)
BTFIXUPDEF_INT(page_copy)
#ifdef MODULE
diff -urNp linux-2.6.17.11/include/asm-sparc/pgtsrmmu.h linux-2.6.17.11/include/asm-sparc/pgtsrmmu.h
--- linux-2.6.17.11/include/asm-sparc/pgtsrmmu.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc/pgtsrmmu.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc/pgtsrmmu.h 2006-09-01 16:20:29.000000000 -0400
@@ -115,6 +115,16 @@
SRMMU_EXEC | SRMMU_REF)
#define SRMMU_PAGE_RDONLY __pgprot(SRMMU_VALID | SRMMU_CACHE | \
diff -urNp linux-2.6.17.11/include/asm-sparc/uaccess.h linux-2.6.17.11/include/asm-sparc/uaccess.h
--- linux-2.6.17.11/include/asm-sparc/uaccess.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc/uaccess.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc/uaccess.h 2006-09-01 16:20:29.000000000 -0400
@@ -41,7 +41,7 @@
* No one can read/write anything from userland in the kernel space by setting
* large size and address near to PAGE_OFFSET - a fault will break his intentions.
#define access_ok(type, addr, size) \
diff -urNp linux-2.6.17.11/include/asm-sparc64/a.out.h linux-2.6.17.11/include/asm-sparc64/a.out.h
--- linux-2.6.17.11/include/asm-sparc64/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc64/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc64/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -98,7 +98,7 @@ struct relocation_info /* used when head
#define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE)
#define STACK_TOP64 (0x0000080000000000UL - (1UL << 32UL))
#endif
diff -urNp linux-2.6.17.11/include/asm-sparc64/elf.h linux-2.6.17.11/include/asm-sparc64/elf.h
--- linux-2.6.17.11/include/asm-sparc64/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc64/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc64/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -142,6 +142,16 @@ typedef struct {
#define ELF_ET_DYN_BASE 0x0000010000000000UL
#endif
instruction set this cpu supports. */
diff -urNp linux-2.6.17.11/include/asm-sparc64/kmap_types.h linux-2.6.17.11/include/asm-sparc64/kmap_types.h
--- linux-2.6.17.11/include/asm-sparc64/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc64/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-sparc64/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -19,6 +19,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-sparc64/page.h linux-2.6.17.11/include/asm-sparc64/page.h
--- linux-2.6.17.11/include/asm-sparc64/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-sparc64/page.h 2006-08-12 08:17:55.000000000 -0400
-@@ -142,6 +142,15 @@ typedef unsigned long pgprot_t;
++++ linux-2.6.17.11/include/asm-sparc64/page.h 2006-09-01 16:20:29.000000000 -0400
+@@ -144,6 +144,15 @@ typedef unsigned long pgprot_t;
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#include <asm-generic/page.h>
diff -urNp linux-2.6.17.11/include/asm-v850/kmap_types.h linux-2.6.17.11/include/asm-v850/kmap_types.h
--- linux-2.6.17.11/include/asm-v850/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-v850/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-v850/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -13,6 +13,7 @@ enum km_type {
KM_PTE1,
KM_IRQ0,
diff -urNp linux-2.6.17.11/include/asm-x86_64/a.out.h linux-2.6.17.11/include/asm-x86_64/a.out.h
--- linux-2.6.17.11/include/asm-x86_64/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -21,7 +21,7 @@ struct exec
#ifdef __KERNEL__
#endif /* __A_OUT_GNU_H__ */
diff -urNp linux-2.6.17.11/include/asm-x86_64/elf.h linux-2.6.17.11/include/asm-x86_64/elf.h
--- linux-2.6.17.11/include/asm-x86_64/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -90,6 +90,17 @@ typedef struct user_i387_struct elf_fpre
#define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
getting dumped. */
diff -urNp linux-2.6.17.11/include/asm-x86_64/ia32.h linux-2.6.17.11/include/asm-x86_64/ia32.h
--- linux-2.6.17.11/include/asm-x86_64/ia32.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/ia32.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/ia32.h 2006-09-01 16:20:29.000000000 -0400
@@ -157,7 +157,13 @@ struct ustat32 {
char f_fpack[6];
};
struct user_desc;
diff -urNp linux-2.6.17.11/include/asm-x86_64/kmap_types.h linux-2.6.17.11/include/asm-x86_64/kmap_types.h
--- linux-2.6.17.11/include/asm-x86_64/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -13,6 +13,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/asm-x86_64/page.h linux-2.6.17.11/include/asm-x86_64/page.h
--- linux-2.6.17.11/include/asm-x86_64/page.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/page.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/page.h 2006-09-01 16:20:29.000000000 -0400
@@ -134,6 +134,15 @@ typedef struct { unsigned long pgprot; }
(((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
diff -urNp linux-2.6.17.11/include/asm-x86_64/pgalloc.h linux-2.6.17.11/include/asm-x86_64/pgalloc.h
--- linux-2.6.17.11/include/asm-x86_64/pgalloc.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/pgalloc.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/pgalloc.h 2006-09-01 16:20:29.000000000 -0400
@@ -7,7 +7,7 @@
#include <linux/mm.h>
#define pgd_populate(mm, pgd, pud) \
diff -urNp linux-2.6.17.11/include/asm-x86_64/pgtable.h linux-2.6.17.11/include/asm-x86_64/pgtable.h
--- linux-2.6.17.11/include/asm-x86_64/pgtable.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/pgtable.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/pgtable.h 2006-09-01 16:20:29.000000000 -0400
@@ -180,6 +180,10 @@ static inline pte_t ptep_get_and_clear_f
#define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_NX)
static inline pte_t pte_mkwrite(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
diff -urNp linux-2.6.17.11/include/asm-x86_64/system.h linux-2.6.17.11/include/asm-x86_64/system.h
--- linux-2.6.17.11/include/asm-x86_64/system.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-x86_64/system.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-x86_64/system.h 2006-09-01 16:20:29.000000000 -0400
@@ -366,6 +366,6 @@ static inline unsigned long __cmpxchg(vo
void cpu_idle_wait(void);
#endif
diff -urNp linux-2.6.17.11/include/asm-xtensa/kmap_types.h linux-2.6.17.11/include/asm-xtensa/kmap_types.h
--- linux-2.6.17.11/include/asm-xtensa/kmap_types.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/asm-xtensa/kmap_types.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/asm-xtensa/kmap_types.h 2006-09-01 16:20:29.000000000 -0400
@@ -25,6 +25,7 @@ enum km_type {
KM_IRQ1,
KM_SOFTIRQ0,
diff -urNp linux-2.6.17.11/include/linux/a.out.h linux-2.6.17.11/include/linux/a.out.h
--- linux-2.6.17.11/include/linux/a.out.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/a.out.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/a.out.h 2006-09-01 16:20:29.000000000 -0400
@@ -7,6 +7,16 @@
#include <asm/a.out.h>
#endif
diff -urNp linux-2.6.17.11/include/linux/binfmts.h linux-2.6.17.11/include/linux/binfmts.h
--- linux-2.6.17.11/include/linux/binfmts.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/binfmts.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/binfmts.h 2006-09-01 16:20:29.000000000 -0400
@@ -7,10 +7,10 @@ struct pt_regs;
/*
#endif /* _LINUX_BINFMTS_H */
diff -urNp linux-2.6.17.11/include/linux/capability.h linux-2.6.17.11/include/linux/capability.h
--- linux-2.6.17.11/include/linux/capability.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/capability.h 2006-08-12 08:17:55.000000000 -0400
-@@ -358,6 +358,7 @@ static inline kernel_cap_t cap_invert(ke
++++ linux-2.6.17.11/include/linux/capability.h 2006-09-01 16:20:29.000000000 -0400
+@@ -364,6 +364,7 @@ static inline kernel_cap_t cap_invert(ke
#define cap_is_fs_cap(c) (CAP_TO_MASK(c) & CAP_FS_MASK)
int capable(int cap);
#endif /* __KERNEL__ */
diff -urNp linux-2.6.17.11/include/linux/elf.h linux-2.6.17.11/include/linux/elf.h
--- linux-2.6.17.11/include/linux/elf.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/elf.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/elf.h 2006-09-01 16:20:29.000000000 -0400
@@ -5,6 +5,10 @@
#include <linux/auxvec.h>
#include <asm/elf.h>
diff -urNp linux-2.6.17.11/include/linux/gracl.h linux-2.6.17.11/include/linux/gracl.h
--- linux-2.6.17.11/include/linux/gracl.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/include/linux/gracl.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/gracl.h 2006-09-01 16:20:29.000000000 -0400
@@ -0,0 +1,316 @@
+#ifndef GR_ACL_H
+#define GR_ACL_H
+
diff -urNp linux-2.6.17.11/include/linux/gralloc.h linux-2.6.17.11/include/linux/gralloc.h
--- linux-2.6.17.11/include/linux/gralloc.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/include/linux/gralloc.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/gralloc.h 2006-09-01 16:20:29.000000000 -0400
@@ -0,0 +1,8 @@
+#ifndef __GRALLOC_H
+#define __GRALLOC_H
+#endif
diff -urNp linux-2.6.17.11/include/linux/grdefs.h linux-2.6.17.11/include/linux/grdefs.h
--- linux-2.6.17.11/include/linux/grdefs.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/include/linux/grdefs.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/grdefs.h 2006-09-01 16:20:29.000000000 -0400
@@ -0,0 +1,131 @@
+#ifndef GRDEFS_H
+#define GRDEFS_H
+#endif
diff -urNp linux-2.6.17.11/include/linux/grinternal.h linux-2.6.17.11/include/linux/grinternal.h
--- linux-2.6.17.11/include/linux/grinternal.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/include/linux/grinternal.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/grinternal.h 2006-09-01 16:20:29.000000000 -0400
@@ -0,0 +1,211 @@
+#ifndef __GRINTERNAL_H
+#define __GRINTERNAL_H
+#endif
diff -urNp linux-2.6.17.11/include/linux/grmsg.h linux-2.6.17.11/include/linux/grmsg.h
--- linux-2.6.17.11/include/linux/grmsg.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/include/linux/grmsg.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/grmsg.h 2006-09-01 16:20:29.000000000 -0400
@@ -0,0 +1,108 @@
+#define DEFAULTSECMSG "%.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u, parent %.256s[%.16s:%d] uid/euid:%u/%u gid/egid:%u/%u"
+#define GR_ACL_PROCACCT_MSG "%.256s[%.16s:%d] IP:%u.%u.%u.%u TTY:%.64s uid/euid:%u/%u gid/egid:%u/%u run time:[%ud %uh %um %us] cpu time:[%ud %uh %um %us] %s with exit code %ld, parent %.256s[%.16s:%d] IP:%u.%u.%u.%u TTY:%.64s uid/euid:%u/%u gid/egid:%u/%u"
+#define GR_TEXTREL_AUDIT_MSG "text relocation in %s, VMA:0x%08lx 0x%08lx by "
diff -urNp linux-2.6.17.11/include/linux/grsecurity.h linux-2.6.17.11/include/linux/grsecurity.h
--- linux-2.6.17.11/include/linux/grsecurity.h 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/include/linux/grsecurity.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/grsecurity.h 2006-09-01 16:20:29.000000000 -0400
@@ -0,0 +1,196 @@
+#ifndef GR_SECURITY_H
+#define GR_SECURITY_H
+#endif
diff -urNp linux-2.6.17.11/include/linux/highmem.h linux-2.6.17.11/include/linux/highmem.h
--- linux-2.6.17.11/include/linux/highmem.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/highmem.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/highmem.h 2006-09-01 16:20:29.000000000 -0400
@@ -70,9 +70,9 @@ alloc_zeroed_user_highpage(struct vm_are
static inline void clear_highpage(struct page *page)
/*
diff -urNp linux-2.6.17.11/include/linux/mman.h linux-2.6.17.11/include/linux/mman.h
--- linux-2.6.17.11/include/linux/mman.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/mman.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/mman.h 2006-09-01 16:20:29.000000000 -0400
@@ -59,6 +59,11 @@ static inline unsigned long
calc_vm_flag_bits(unsigned long flags)
{
_calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED );
diff -urNp linux-2.6.17.11/include/linux/mm.h linux-2.6.17.11/include/linux/mm.h
--- linux-2.6.17.11/include/linux/mm.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/mm.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/mm.h 2006-09-01 16:20:29.000000000 -0400
@@ -38,6 +38,7 @@ extern int sysctl_legacy_va_layout;
#include <asm/pgtable.h>
#include <asm/processor.h>
#endif /* _LINUX_MM_H */
diff -urNp linux-2.6.17.11/include/linux/module.h linux-2.6.17.11/include/linux/module.h
--- linux-2.6.17.11/include/linux/module.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/module.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/module.h 2006-09-01 16:20:29.000000000 -0400
@@ -273,16 +273,16 @@ struct module
int (*init)(void);
struct mod_arch_specific arch;
diff -urNp linux-2.6.17.11/include/linux/moduleloader.h linux-2.6.17.11/include/linux/moduleloader.h
--- linux-2.6.17.11/include/linux/moduleloader.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/moduleloader.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/moduleloader.h 2006-09-01 16:20:29.000000000 -0400
@@ -17,9 +17,21 @@ int module_frob_arch_sections(Elf_Ehdr *
sections. Returns NULL on failure. */
void *module_alloc(unsigned long size);
int apply_relocate(Elf_Shdr *sechdrs,
diff -urNp linux-2.6.17.11/include/linux/random.h linux-2.6.17.11/include/linux/random.h
--- linux-2.6.17.11/include/linux/random.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/random.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/random.h 2006-09-01 16:20:29.000000000 -0400
@@ -62,6 +62,8 @@ extern __u32 secure_tcpv6_sequence_numbe
extern u64 secure_dccp_sequence_number(__u32 saddr, __u32 daddr,
__u16 sport, __u16 dport);
#endif
diff -urNp linux-2.6.17.11/include/linux/sched.h linux-2.6.17.11/include/linux/sched.h
--- linux-2.6.17.11/include/linux/sched.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/sched.h 2006-08-12 08:17:55.000000000 -0400
-@@ -40,6 +40,7 @@
++++ linux-2.6.17.11/include/linux/sched.h 2006-09-01 16:20:29.000000000 -0400
+@@ -41,6 +41,7 @@
#include <linux/auxvec.h> /* For AT_VECTOR_SIZE */
struct exec_domain;
/*
* cloning flags:
-@@ -350,8 +351,34 @@ struct mm_struct {
+@@ -357,8 +358,34 @@ struct mm_struct {
/* aio bits */
rwlock_t ioctx_list_lock;
struct kioctx *ioctx_list;
struct sighand_struct {
atomic_t count;
struct k_sigaction action[_NSIG];
-@@ -449,6 +476,15 @@ struct signal_struct {
+@@ -456,6 +483,15 @@ struct signal_struct {
struct key *session_keyring; /* keyring inherited over fork */
struct key *process_keyring; /* keyring private to this process */
#endif
};
/* Context switch must be unlocked if interrupts are to be enabled */
-@@ -881,6 +917,17 @@ struct task_struct {
+@@ -898,6 +934,17 @@ struct task_struct {
struct compat_robust_list_head __user *compat_robust_list;
#endif
atomic_t fs_excl; /* holding fs exclusive resources */
struct rcu_head rcu;
-@@ -1393,6 +1440,12 @@ extern void arch_pick_mmap_layout(struct
+@@ -1416,6 +1463,12 @@ extern void arch_pick_mmap_layout(struct
static inline void arch_pick_mmap_layout(struct mm_struct *mm)
{
mm->mmap_base = TASK_UNMAPPED_BASE;
}
diff -urNp linux-2.6.17.11/include/linux/shm.h linux-2.6.17.11/include/linux/shm.h
--- linux-2.6.17.11/include/linux/shm.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/shm.h 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/include/linux/shm.h 2006-09-01 16:20:29.000000000 -0400
@@ -86,6 +86,10 @@ struct shmid_kernel /* private to the ke
pid_t shm_cprid;
pid_t shm_lprid;
/* shm_mode upper byte flags */
diff -urNp linux-2.6.17.11/include/linux/sysctl.h linux-2.6.17.11/include/linux/sysctl.h
--- linux-2.6.17.11/include/linux/sysctl.h 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/include/linux/sysctl.h 2006-08-12 08:17:55.000000000 -0400
-@@ -148,8 +148,21 @@ enum
- KERN_SPIN_RETRY=70, /* int: number of spinlock retries */
- KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
- KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
-+#ifdef CONFIG_GRKERNSEC
-+ KERN_GRSECURITY=98, /* grsecurity */
-+#endif
-+
-+#ifdef CONFIG_PAX_SOFTMODE
-+ KERN_PAX=99, /* PaX control */
-+#endif
-+
++++ linux-2.6.17.11/include/linux/sysctl.h 2006-09-01 16:20:29.000000000 -0400
+@@ -78,9 +78,22 @@
+ INOTIFY_MAX_QUEUED_EVENTS=3 /* max queued events per instance */
};
+#ifdef CONFIG_PAX_SOFTMODE
+ PAX_SOFTMODE=1 /* PaX: disable/enable soft mode */
+};
+#endif
-
- /* CTL_VM names: */
++
+ /* CTL_KERN names: */
enum
+ {
++#ifdef CONFIG_GRKERNSEC
++ KERN_GRSECURITY=98, /* grsecurity */
++#endif
++
++#ifdef CONFIG_PAX_SOFTMODE
++ KERN_PAX=99, /* PaX control */
++#endif
+ KERN_OSTYPE=1, /* string: system version */
+ KERN_OSRELEASE=2, /* string: system release */
+ KERN_OSREV=3, /* int: system revision */
diff -urNp linux-2.6.17.11/init/Kconfig linux-2.6.17.11/init/Kconfig
--- linux-2.6.17.11/init/Kconfig 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/init/Kconfig 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/init/Kconfig 2006-09-01 16:20:29.000000000 -0400
@@ -268,6 +268,7 @@ menuconfig EMBEDDED
config KALLSYMS
bool "Load all symbols for debugging/kksymoops" if EMBEDDED
symbolic stack backtraces. This increases the size of the kernel
diff -urNp linux-2.6.17.11/init/main.c linux-2.6.17.11/init/main.c
--- linux-2.6.17.11/init/main.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/init/main.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/init/main.c 2006-09-01 16:20:29.000000000 -0400
@@ -100,6 +100,7 @@ static inline void mark_rodata_ro(void)
#ifdef CONFIG_TC
extern void tc_init(void);
static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
static const char *panic_later, *panic_param;
-@@ -692,6 +702,8 @@ static int init(void * unused)
+@@ -694,6 +704,8 @@ static int init(void * unused)
prepare_namespace();
}
* we're essentially up and running. Get rid of the
diff -urNp linux-2.6.17.11/ipc/msg.c linux-2.6.17.11/ipc/msg.c
--- linux-2.6.17.11/ipc/msg.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/ipc/msg.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/ipc/msg.c 2006-09-01 16:20:29.000000000 -0400
@@ -32,6 +32,7 @@
#include <linux/audit.h>
#include <linux/seq_file.h>
#include <asm/current.h>
#include <asm/uaccess.h>
-@@ -237,6 +238,9 @@ asmlinkage long sys_msgget (key_t key, i
+@@ -238,6 +239,9 @@ asmlinkage long sys_msgget (key_t key, i
msg_unlock(msq);
}
mutex_unlock(&msg_ids.mutex);
return ret;
}
-@@ -495,6 +499,8 @@ asmlinkage long sys_msgctl (int msqid, i
+@@ -496,6 +500,8 @@ asmlinkage long sys_msgctl (int msqid, i
break;
}
case IPC_RMID:
}
diff -urNp linux-2.6.17.11/ipc/sem.c linux-2.6.17.11/ipc/sem.c
--- linux-2.6.17.11/ipc/sem.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/ipc/sem.c 2006-08-12 08:17:55.000000000 -0400
-@@ -79,6 +79,7 @@
- #include <linux/capability.h>
++++ linux-2.6.17.11/ipc/sem.c 2006-09-01 16:20:29.000000000 -0400
+@@ -80,6 +80,7 @@
#include <linux/seq_file.h>
#include <linux/mutex.h>
+ #include <linux/vs_limit.h>
+#include <linux/grsecurity.h>
#include <asm/uaccess.h>
break;
diff -urNp linux-2.6.17.11/ipc/shm.c linux-2.6.17.11/ipc/shm.c
--- linux-2.6.17.11/ipc/shm.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/ipc/shm.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/ipc/shm.c 2006-09-01 16:20:29.000000000 -0400
@@ -33,6 +33,7 @@
- #include <linux/ptrace.h>
- #include <linux/seq_file.h>
#include <linux/mutex.h>
+ #include <linux/vs_context.h>
+ #include <linux/vs_limit.h>
+#include <linux/grsecurity.h>
#include <asm/uaccess.h>
+}
diff -urNp linux-2.6.17.11/kernel/capability.c linux-2.6.17.11/kernel/capability.c
--- linux-2.6.17.11/kernel/capability.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/capability.c 2006-08-12 08:17:55.000000000 -0400
-@@ -12,6 +12,7 @@
- #include <linux/module.h>
++++ linux-2.6.17.11/kernel/capability.c 2006-09-01 16:20:29.000000000 -0400
+@@ -13,6 +13,7 @@
#include <linux/security.h>
#include <linux/syscalls.h>
+ #include <linux/vs_pid.h>
+#include <linux/grsecurity.h>
#include <asm/uaccess.h>
unsigned securebits = SECUREBITS_DEFAULT; /* systemwide security settings */
-@@ -234,14 +235,25 @@ out:
+@@ -235,14 +236,25 @@ out:
return ret;
}
EXPORT_SYMBOL(__capable);
int capable(int cap)
-@@ -249,3 +261,4 @@ int capable(int cap)
+@@ -253,3 +265,4 @@ int capable(int cap)
return __capable(current, cap);
}
EXPORT_SYMBOL(capable);
+EXPORT_SYMBOL(capable_nolog);
diff -urNp linux-2.6.17.11/kernel/configs.c linux-2.6.17.11/kernel/configs.c
--- linux-2.6.17.11/kernel/configs.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/configs.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/configs.c 2006-09-01 16:20:29.000000000 -0400
@@ -89,8 +89,16 @@ static int __init ikconfig_init(void)
struct proc_dir_entry *entry;
diff -urNp linux-2.6.17.11/kernel/exit.c linux-2.6.17.11/kernel/exit.c
--- linux-2.6.17.11/kernel/exit.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/exit.c 2006-08-12 08:17:55.000000000 -0400
-@@ -36,6 +36,11 @@
- #include <linux/compat.h>
- #include <linux/pipe_fs_i.h>
- #include <linux/audit.h> /* for audit_free() */
++++ linux-2.6.17.11/kernel/exit.c 2006-09-01 16:20:29.000000000 -0400
+@@ -40,6 +40,11 @@
+ #include <linux/vs_context.h>
+ #include <linux/vs_network.h>
+ #include <linux/vs_pid.h>
+#include <linux/grsecurity.h>
+
+#ifdef CONFIG_GRKERNSEC
#include <asm/uaccess.h>
#include <asm/unistd.h>
-@@ -115,6 +120,7 @@ static void __exit_signal(struct task_st
+@@ -119,6 +124,7 @@ static void __exit_signal(struct task_st
__unhash_process(tsk);
tsk->signal = NULL;
tsk->sighand = NULL;
spin_unlock(&sighand->siglock);
-@@ -287,6 +293,15 @@ static void reparent_to_init(void)
+@@ -291,6 +297,15 @@ static void reparent_to_init(void)
{
write_lock_irq(&tasklist_lock);
ptrace_unlink(current);
/* Reparent to init */
remove_parent(current);
-@@ -294,6 +309,8 @@ static void reparent_to_init(void)
+@@ -298,6 +313,8 @@ static void reparent_to_init(void)
current->real_parent = child_reaper;
add_parent(current);
/* Set the exit signal to SIGCHLD so we signal init on exit */
current->exit_signal = SIGCHLD;
-@@ -390,6 +407,17 @@ void daemonize(const char *name, ...)
+@@ -394,6 +411,17 @@ void daemonize(const char *name, ...)
vsnprintf(current->comm, sizeof(current->comm), name, args);
va_end(args);
/*
* If we were started as result of loading a module, close all of the
* user space pages. We don't need them, and if we didn't close them
-@@ -905,9 +933,14 @@ fastcall NORET_TYPE void do_exit(long co
+@@ -915,9 +943,14 @@ fastcall NORET_TYPE void do_exit(long co
#endif
if (unlikely(tsk->audit_context))
audit_free(tsk);
exit_namespace(tsk);
diff -urNp linux-2.6.17.11/kernel/fork.c linux-2.6.17.11/kernel/fork.c
--- linux-2.6.17.11/kernel/fork.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/fork.c 2006-08-12 08:17:55.000000000 -0400
-@@ -44,6 +44,7 @@
- #include <linux/rmap.h>
- #include <linux/acct.h>
- #include <linux/cn_proc.h>
++++ linux-2.6.17.11/kernel/fork.c 2006-09-01 16:20:29.000000000 -0400
+@@ -48,6 +48,7 @@
+ #include <linux/vs_network.h>
+ #include <linux/vs_limit.h>
+ #include <linux/vs_memory.h>
+#include <linux/grsecurity.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
-@@ -198,8 +199,8 @@ static inline int dup_mmap(struct mm_str
+@@ -204,8 +205,8 @@ static inline int dup_mmap(struct mm_str
mm->locked_vm = 0;
mm->mmap = NULL;
mm->mmap_cache = NULL;
+ mm->free_area_cache = oldmm->free_area_cache;
+ mm->cached_hole_size = oldmm->cached_hole_size;
mm->map_count = 0;
- cpus_clear(mm->cpu_vm_mask);
- mm->mm_rb = RB_ROOT;
-@@ -324,7 +325,7 @@ static struct mm_struct * mm_init(struct
+ __set_mm_counter(mm, file_rss, 0);
+ __set_mm_counter(mm, anon_rss, 0);
+@@ -330,7 +331,7 @@ static struct mm_struct * mm_init(struct
spin_lock_init(&mm->page_table_lock);
rwlock_init(&mm->ioctx_list_lock);
mm->ioctx_list = NULL;
mm->cached_hole_size = ~0UL;
if (likely(!mm_alloc_pgd(mm))) {
-@@ -956,6 +957,9 @@ static task_t *copy_process(unsigned lon
- goto fork_out;
+@@ -988,6 +989,8 @@ static task_t *copy_process(unsigned lon
+ if (!vx_nproc_avail(1))
+ goto bad_fork_cleanup_vm;
- retval = -EAGAIN;
-+
+ gr_learn_resource(p, RLIMIT_NPROC, atomic_read(&p->user->processes), 0);
+
if (atomic_read(&p->user->processes) >=
p->signal->rlim[RLIMIT_NPROC].rlim_cur) {
if (!capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE) &&
-@@ -1066,6 +1070,8 @@ static task_t *copy_process(unsigned lon
+@@ -1098,6 +1101,8 @@ static task_t *copy_process(unsigned lon
if (retval)
goto bad_fork_cleanup_namespace;
p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
/*
* Clear TID on mm_release()?
-@@ -1255,6 +1261,8 @@ bad_fork_cleanup_count:
+@@ -1302,6 +1307,8 @@ bad_fork_cleanup_count:
bad_fork_free:
free_task(p);
fork_out:
return ERR_PTR(retval);
}
-@@ -1328,6 +1336,8 @@ long do_fork(unsigned long clone_flags,
+@@ -1384,6 +1391,8 @@ long do_fork(unsigned long clone_flags,
if (!IS_ERR(p)) {
struct completion vfork;
init_completion(&vfork);
diff -urNp linux-2.6.17.11/kernel/futex.c linux-2.6.17.11/kernel/futex.c
--- linux-2.6.17.11/kernel/futex.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/futex.c 2006-08-12 08:17:55.000000000 -0400
-@@ -151,6 +151,11 @@ static int get_futex_key(unsigned long u
++++ linux-2.6.17.11/kernel/futex.c 2006-09-01 16:20:29.000000000 -0400
+@@ -152,6 +152,11 @@ static int get_futex_key(unsigned long u
struct page *page;
int err;
*/
diff -urNp linux-2.6.17.11/kernel/kallsyms.c linux-2.6.17.11/kernel/kallsyms.c
--- linux-2.6.17.11/kernel/kallsyms.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/kallsyms.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/kallsyms.c 2006-09-01 16:20:29.000000000 -0400
@@ -301,7 +301,6 @@ static unsigned long get_ksymbol_core(st
static void reset_iter(struct kallsym_iter *iter, loff_t new_pos)
return 0;
diff -urNp linux-2.6.17.11/kernel/kprobes.c linux-2.6.17.11/kernel/kprobes.c
--- linux-2.6.17.11/kernel/kprobes.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/kprobes.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/kprobes.c 2006-09-01 16:20:29.000000000 -0400
@@ -106,7 +106,7 @@ kprobe_opcode_t __kprobes *get_insn_slot
* kernel image and loaded module images reside. This is required
* so x86_64 can correctly handle the %rip-relative fixups.
return NULL;
diff -urNp linux-2.6.17.11/kernel/module.c linux-2.6.17.11/kernel/module.c
--- linux-2.6.17.11/kernel/module.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/module.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/module.c 2006-09-01 16:20:29.000000000 -0400
@@ -40,10 +40,15 @@
#include <linux/string.h>
#include <linux/sched.h>
}
diff -urNp linux-2.6.17.11/kernel/pid.c linux-2.6.17.11/kernel/pid.c
--- linux-2.6.17.11/kernel/pid.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/pid.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/pid.c 2006-09-01 16:20:29.000000000 -0400
@@ -26,6 +26,7 @@
#include <linux/init.h>
#include <linux/bootmem.h>
EXPORT_SYMBOL(find_task_by_pid_type);
diff -urNp linux-2.6.17.11/kernel/posix-cpu-timers.c linux-2.6.17.11/kernel/posix-cpu-timers.c
--- linux-2.6.17.11/kernel/posix-cpu-timers.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/posix-cpu-timers.c 2006-08-12 08:17:55.000000000 -0400
-@@ -6,6 +6,7 @@
- #include <linux/posix-timers.h>
++++ linux-2.6.17.11/kernel/posix-cpu-timers.c 2006-09-01 16:20:29.000000000 -0400
+@@ -7,6 +7,7 @@
#include <asm/uaccess.h>
#include <linux/errno.h>
+ #include <linux/vs_pid.h>
+#include <linux/grsecurity.h>
static int check_clock(const clockid_t which_clock)
{
-@@ -1125,6 +1126,7 @@ static void check_process_timers(struct
+@@ -1126,6 +1127,7 @@ static void check_process_timers(struct
__group_send_sig_info(SIGKILL, SEND_SIG_PRIV, tsk);
return;
}
* At the soft limit, send a SIGXCPU every second.
diff -urNp linux-2.6.17.11/kernel/printk.c linux-2.6.17.11/kernel/printk.c
--- linux-2.6.17.11/kernel/printk.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/printk.c 2006-08-12 08:17:55.000000000 -0400
-@@ -31,6 +31,7 @@
- #include <linux/security.h>
- #include <linux/bootmem.h>
++++ linux-2.6.17.11/kernel/printk.c 2006-09-01 16:20:29.000000000 -0400
+@@ -33,6 +33,7 @@
#include <linux/syscalls.h>
+ #include <linux/vs_context.h>
+ #include <linux/vserver/cvirt.h>
+#include <linux/grsecurity.h>
#include <asm/uaccess.h>
-@@ -185,6 +186,11 @@ int do_syslog(int type, char __user *buf
+@@ -187,6 +188,11 @@ int do_syslog(int type, char __user *buf
char c;
- int error = 0;
+ int error;
+#ifdef CONFIG_GRKERNSEC_DMESG
+ if (grsec_enable_dmesg && !capable(CAP_SYS_ADMIN))
return error;
diff -urNp linux-2.6.17.11/kernel/ptrace.c linux-2.6.17.11/kernel/ptrace.c
--- linux-2.6.17.11/kernel/ptrace.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/ptrace.c 2006-08-12 08:17:55.000000000 -0400
-@@ -18,6 +18,7 @@
- #include <linux/ptrace.h>
++++ linux-2.6.17.11/kernel/ptrace.c 2006-09-01 16:20:29.000000000 -0400
+@@ -19,6 +19,7 @@
#include <linux/security.h>
#include <linux/signal.h>
+ #include <linux/vs_pid.h>
+#include <linux/grsecurity.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
-@@ -127,10 +128,10 @@ static int may_attach(struct task_struct
+@@ -128,10 +129,10 @@ static int may_attach(struct task_struct
(current->uid != task->uid) ||
(current->gid != task->egid) ||
(current->gid != task->sgid) ||
- if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE))
+ if (!task->mm->dumpable && !capable_nolog(CAP_SYS_PTRACE))
return -EPERM;
-
- return security_ptrace(current, task);
-@@ -515,6 +516,11 @@ asmlinkage long sys_ptrace(long request,
+ if (!vx_check(task->xid, VX_ADMIN_P|VX_IDENT))
+ return -EPERM;
+@@ -525,6 +526,11 @@ asmlinkage long sys_ptrace(long request,
if (ret < 0)
goto out_put_task_struct;
goto out_put_task_struct;
diff -urNp linux-2.6.17.11/kernel/resource.c linux-2.6.17.11/kernel/resource.c
--- linux-2.6.17.11/kernel/resource.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/resource.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/resource.c 2006-09-01 16:20:29.000000000 -0400
@@ -136,10 +136,27 @@ static int __init ioresources_init(void)
{
struct proc_dir_entry *entry;
return 0;
diff -urNp linux-2.6.17.11/kernel/sched.c linux-2.6.17.11/kernel/sched.c
--- linux-2.6.17.11/kernel/sched.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/sched.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/sched.c 2006-09-01 16:20:29.000000000 -0400
@@ -50,6 +50,7 @@
#include <linux/times.h>
#include <linux/acct.h>
#include <asm/tlb.h>
#include <asm/unistd.h>
-@@ -3565,7 +3566,8 @@ asmlinkage long sys_nice(int increment)
+@@ -3636,7 +3637,8 @@ asmlinkage long sys_nice(int increment)
if (nice > 19)
nice = 19;
- if (increment < 0 && !can_nice(current, nice))
+ if (increment < 0 && (!can_nice(current, nice) ||
+ gr_handle_chroot_nice()))
- return -EPERM;
+ return vx_flags(VXF_IGNEG_NICE, 0) ? 0 : -EPERM;
retval = security_task_setnice(current, nice);
diff -urNp linux-2.6.17.11/kernel/signal.c linux-2.6.17.11/kernel/signal.c
--- linux-2.6.17.11/kernel/signal.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/signal.c 2006-08-12 08:17:55.000000000 -0400
-@@ -25,6 +25,7 @@
- #include <linux/signal.h>
++++ linux-2.6.17.11/kernel/signal.c 2006-09-01 16:20:29.000000000 -0400
+@@ -26,6 +26,7 @@
#include <linux/audit.h>
#include <linux/capability.h>
+ #include <linux/vs_pid.h>
+#include <linux/grsecurity.h>
#include <asm/param.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
-@@ -577,16 +578,18 @@ static int check_kill_permission(int sig
- return error;
+@@ -583,11 +583,11 @@ static int check_kill_permission(int sig
+ (!is_si_special(info) && SI_FROMUSER(info)));
+
error = -EPERM;
- if ((info == SEND_SIG_NOINFO || (!is_si_special(info) && SI_FROMUSER(info)))
-- && ((sig != SIGCONT) ||
-+ && ((((sig != SIGCONT) ||
+- if (user && ((sig != SIGCONT) ||
++ if (user && ((((sig != SIGCONT) ||
(current->signal->session != t->signal->session))
&& (current->euid ^ t->suid) && (current->euid ^ t->uid)
&& (current->uid ^ t->suid) && (current->uid ^ t->uid)
+ && !capable(CAP_KILL)) || gr_handle_signal(t, sig)))
return error;
+ error = -ESRCH;
+@@ -595,8 +595,10 @@ static int check_kill_permission(int sig
+ return error;
+
error = security_task_kill(t, info, sig);
- if (!error)
+ if (!error) {
return error;
}
-@@ -764,7 +767,7 @@ out_set:
+@@ -774,7 +777,7 @@ out_set:
(((sig) < SIGRTMIN) && sigismember(&(sigptr)->signal, (sig)))
specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
{
int ret = 0;
-@@ -809,6 +812,10 @@ force_sig_info(int sig, struct siginfo *
+@@ -819,6 +822,10 @@ force_sig_info(int sig, struct siginfo *
}
recalc_sigpending_tsk(t);
ret = specific_send_sig_info(sig, info, t);
return ret;
diff -urNp linux-2.6.17.11/kernel/sys.c linux-2.6.17.11/kernel/sys.c
--- linux-2.6.17.11/kernel/sys.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/sys.c 2006-08-12 08:17:55.000000000 -0400
-@@ -30,6 +30,7 @@
- #include <linux/tty.h>
- #include <linux/signal.h>
++++ linux-2.6.17.11/kernel/sys.c 2006-09-01 16:20:29.000000000 -0400
+@@ -33,6 +33,7 @@
#include <linux/cn_proc.h>
+ #include <linux/vs_cvirt.h>
+ #include <linux/vs_pid.h>
+#include <linux/grsecurity.h>
#include <linux/compat.h>
#include <linux/syscalls.h>
-@@ -442,6 +443,12 @@ static int set_one_prio(struct task_stru
- error = -EACCES;
+@@ -448,6 +449,12 @@ static int set_one_prio(struct task_stru
+ error = -EACCES;
goto out;
}
+
no_nice = security_task_setnice(p, niceval);
if (no_nice) {
error = no_nice;
-@@ -831,6 +838,9 @@ asmlinkage long sys_setregid(gid_t rgid,
+@@ -845,6 +852,9 @@ asmlinkage long sys_setregid(gid_t rgid,
if (rgid != (gid_t) -1 ||
(egid != (gid_t) -1 && egid != old_rgid))
current->sgid = new_egid;
current->fsgid = new_egid;
current->egid = new_egid;
current->gid = new_rgid;
-@@ -860,6 +870,9 @@ asmlinkage long sys_setgid(gid_t gid)
+@@ -874,6 +884,9 @@ asmlinkage long sys_setgid(gid_t gid)
current->mm->dumpable = suid_dumpable;
smp_wmb();
}
current->gid = current->egid = current->sgid = current->fsgid = gid;
}
else if ((gid == current->gid) || (gid == current->sgid))
-@@ -901,6 +914,9 @@ static int set_user(uid_t new_ruid, int
+@@ -915,6 +928,9 @@ static int set_user(uid_t new_ruid, int
current->mm->dumpable = suid_dumpable;
smp_wmb();
}
current->uid = new_ruid;
return 0;
}
-@@ -1004,6 +1020,9 @@ asmlinkage long sys_setuid(uid_t uid)
+@@ -1018,6 +1034,9 @@ asmlinkage long sys_setuid(uid_t uid)
} else if ((uid != current->uid) && (uid != new_suid))
return -EPERM;
if (old_euid != uid)
{
current->mm->dumpable = suid_dumpable;
-@@ -1109,8 +1128,10 @@ asmlinkage long sys_setresgid(gid_t rgid
+@@ -1123,8 +1142,10 @@ asmlinkage long sys_setresgid(gid_t rgid
current->egid = egid;
}
current->fsgid = current->egid;
diff -urNp linux-2.6.17.11/kernel/sysctl.c linux-2.6.17.11/kernel/sysctl.c
--- linux-2.6.17.11/kernel/sysctl.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/sysctl.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/sysctl.c 2006-09-01 16:20:29.000000000 -0400
@@ -54,6 +54,14 @@ extern int proc_nr_files(ctl_table *tabl
void __user *buffer, size_t *lenp, loff_t *ppos);
newval, newlen, context);
diff -urNp linux-2.6.17.11/kernel/time.c linux-2.6.17.11/kernel/time.c
--- linux-2.6.17.11/kernel/time.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/kernel/time.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/kernel/time.c 2006-09-01 16:20:29.000000000 -0400
@@ -36,6 +36,7 @@
#include <linux/security.h>
#include <linux/fs.h>
@@ -93,6 +94,9 @@ asmlinkage long sys_stime(time_t __user
return err;
- do_settimeofday(&tv);
+ vx_settimeofday(&tv);
+
+ gr_log_timechange();
+
return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL);
}
-diff -urNp linux-2.6.17.11/localversion-grsec linux-2.6.17.11/localversion-grsec
---- linux-2.6.17.11/localversion-grsec 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/localversion-grsec 2006-08-12 08:17:55.000000000 -0400
-@@ -0,0 +1 @@
-+-grsec
diff -urNp linux-2.6.17.11/Makefile linux-2.6.17.11/Makefile
--- linux-2.6.17.11/Makefile 2006-08-23 19:30:00.000000000 -0400
-+++ linux-2.6.17.11/Makefile 2006-08-23 19:30:12.000000000 -0400
++++ linux-2.6.17.11/Makefile 2006-09-01 16:20:29.000000000 -0400
@@ -518,7 +518,7 @@ export MODLIB
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
diff -urNp linux-2.6.17.11/mm/filemap.c linux-2.6.17.11/mm/filemap.c
--- linux-2.6.17.11/mm/filemap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/filemap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/filemap.c 2006-09-01 16:20:29.000000000 -0400
@@ -30,6 +30,7 @@
#include <linux/security.h>
#include <linux/syscalls.h>
return -EFBIG;
diff -urNp linux-2.6.17.11/mm/madvise.c linux-2.6.17.11/mm/madvise.c
--- linux-2.6.17.11/mm/madvise.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/madvise.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/madvise.c 2006-09-01 16:20:29.000000000 -0400
@@ -15,9 +15,46 @@
* We can potentially split a vm area into separate
* areas, each area with its own behavior.
int error = 0;
diff -urNp linux-2.6.17.11/mm/memory.c linux-2.6.17.11/mm/memory.c
--- linux-2.6.17.11/mm/memory.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/memory.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/memory.c 2006-09-01 16:20:29.000000000 -0400
@@ -48,6 +48,7 @@
#include <linux/rmap.h>
#include <linux/module.h>
spin_unlock(&init_mm.page_table_lock);
return 0;
}
-@@ -1421,6 +1438,88 @@ static inline void cow_user_page(struct
+@@ -1430,6 +1447,88 @@ static inline void cow_user_page(struct
copy_user_highpage(dst, src, va);
}
/*
* This routine handles present pages, when users try to write
* to a shared page. It is done by copying the page to a new address
-@@ -1511,6 +1610,12 @@ gotten:
+@@ -1520,6 +1619,12 @@ gotten:
/* Free the old page.. */
new_page = old_page;
ret |= VM_FAULT_WRITE;
}
if (new_page)
page_cache_release(new_page);
-@@ -1761,6 +1866,7 @@ int vmtruncate(struct inode * inode, lof
+@@ -1770,6 +1875,7 @@ int vmtruncate(struct inode * inode, lof
do_expand:
limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
if (limit != RLIM_INFINITY && offset > limit)
goto out_sig;
if (offset > inode->i_sb->s_maxbytes)
-@@ -1950,6 +2056,12 @@ again:
+@@ -1963,6 +2069,12 @@ again:
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, pte);
lazy_mmu_prot_update(pte);
unlock:
pte_unmap_unlock(page_table, ptl);
out:
-@@ -2012,6 +2124,12 @@ static int do_anonymous_page(struct mm_s
+@@ -2027,6 +2139,12 @@ static int do_anonymous_page(struct mm_s
/* No need to invalidate - it was non-present before */
update_mmu_cache(vma, address, entry);
lazy_mmu_prot_update(entry);
unlock:
pte_unmap_unlock(page_table, ptl);
return VM_FAULT_MINOR;
-@@ -2137,6 +2255,12 @@ retry:
+@@ -2155,6 +2273,12 @@ retry:
/* no need to invalidate: a not-present page shouldn't be cached */
update_mmu_cache(vma, address, entry);
lazy_mmu_prot_update(entry);
unlock:
pte_unmap_unlock(page_table, ptl);
return ret;
-@@ -2246,6 +2370,12 @@ static inline int handle_pte_fault(struc
+@@ -2278,6 +2402,12 @@ static inline int handle_pte_fault(struc
flush_tlb_page(vma, address);
}
unlock:
+#endif
+
pte_unmap_unlock(pte, ptl);
- return VM_FAULT_MINOR;
- }
-@@ -2268,6 +2398,49 @@ int __handle_mm_fault(struct mm_struct *
+ ret = VM_FAULT_MINOR;
+ out:
+@@ -2303,6 +2433,49 @@ int __handle_mm_fault(struct mm_struct *
if (unlikely(is_vm_hugetlb_page(vma)))
return hugetlb_fault(mm, vma, address, write_access);
if (!pud)
diff -urNp linux-2.6.17.11/mm/mempolicy.c linux-2.6.17.11/mm/mempolicy.c
--- linux-2.6.17.11/mm/mempolicy.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/mempolicy.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/mempolicy.c 2006-09-01 16:20:29.000000000 -0400
@@ -346,6 +346,12 @@ check_range(struct mm_struct *mm, unsign
if (prev && prev->vm_end < vma->vm_start)
return ERR_PTR(-EFAULT);
((flags & (MPOL_MF_MOVE | MPOL_MF_MOVE_ALL)) &&
diff -urNp linux-2.6.17.11/mm/mlock.c linux-2.6.17.11/mm/mlock.c
--- linux-2.6.17.11/mm/mlock.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/mlock.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/mlock.c 2006-09-01 16:20:29.000000000 -0400
@@ -10,14 +10,85 @@
- #include <linux/mm.h>
#include <linux/mempolicy.h>
#include <linux/syscalls.h>
+ #include <linux/vs_memory.h>
+#include <linux/grsecurity.h>
+static int __mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev,
- ret = make_pages_present(start, end);
- }
-
-- vma->vm_mm->locked_vm -= pages;
+- vx_vmlocked_sub(vma->vm_mm, pages);
out:
if (ret == -ENOMEM)
ret = -EAGAIN;
+ gr_learn_resource(current, RLIMIT_MEMLOCK, (current->mm->locked_vm << PAGE_SHIFT) + len, 1);
if ((locked <= lock_limit) || capable(CAP_IPC_LOCK))
error = do_mlock(start, len, 1);
- up_write(¤t->mm->mmap_sem);
+ out:
@@ -173,6 +234,16 @@ static int do_mlockall(int flags)
for (vma = current->mm->mmap; vma ; vma = prev->vm_next) {
unsigned int newflags;
if (!(flags & MCL_CURRENT))
newflags &= ~VM_LOCKED;
@@ -202,6 +273,7 @@ asmlinkage long sys_mlockall(int flags)
- lock_limit >>= PAGE_SHIFT;
-
ret = -ENOMEM;
+ if (!vx_vmlocked_avail(current->mm, current->mm->total_vm))
+ goto out;
+ gr_learn_resource(current, RLIMIT_MEMLOCK, current->mm->total_vm, 1);
if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) ||
capable(CAP_IPC_LOCK))
ret = do_mlockall(flags);
diff -urNp linux-2.6.17.11/mm/mmap.c linux-2.6.17.11/mm/mmap.c
--- linux-2.6.17.11/mm/mmap.c 2006-08-23 19:30:01.000000000 -0400
-+++ linux-2.6.17.11/mm/mmap.c 2006-08-23 19:39:16.000000000 -0400
++++ linux-2.6.17.11/mm/mmap.c 2006-09-01 16:20:29.000000000 -0400
@@ -25,6 +25,7 @@
#include <linux/mount.h>
#include <linux/mempolicy.h>
* that memory reservation must be checked; but that reservation
@@ -1128,6 +1242,7 @@ munmap_back:
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);
@@ -1182,6 +1297,10 @@ arch_get_unmapped_area(struct file *filp
if (len > TASK_SIZE)
+ gr_learn_resource(current, RLIMIT_MEMLOCK, locked << PAGE_SHIFT, 1);
if (locked > lock_limit && !capable(CAP_IPC_LOCK))
return -EAGAIN;
- }
-@@ -1893,12 +2130,12 @@ unsigned long do_brk(unsigned long addr,
+ if (!vx_vmlocked_avail(mm, len >> PAGE_SHIFT))
+@@ -1895,12 +2132,12 @@ unsigned long do_brk(unsigned long addr,
/*
* Clear old maps. this also does some error checking for us
*/
}
/* Check against address space limits *after* clearing old maps... */
-@@ -1930,7 +2167,14 @@ unsigned long do_brk(unsigned long addr,
+@@ -1933,7 +2170,14 @@ unsigned long do_brk(unsigned long addr,
vma->vm_end = addr + len;
vma->vm_pgoff = pgoff;
vma->vm_flags = flags;
+ vma->vm_page_prot = protection_map[flags & (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)];
vma_link(mm, vma, prev, rb_link, rb_parent);
out:
- mm->total_vm += len >> PAGE_SHIFT;
-@@ -1938,6 +2182,7 @@ out:
- mm->locked_vm += len >> PAGE_SHIFT;
+ vx_vmpages_add(mm, len >> PAGE_SHIFT);
+@@ -1941,6 +2185,7 @@ out:
+ vx_vmlocked_add(mm, len >> PAGE_SHIFT);
make_pages_present(addr, addr + len);
}
+ track_exec_limit(mm, addr, addr + len, flags);
return addr;
}
-@@ -2070,7 +2315,7 @@ int may_expand_vm(struct mm_struct *mm,
+@@ -2079,7 +2324,7 @@ int may_expand_vm(struct mm_struct *mm,
unsigned long lim;
lim = current->signal->rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT;
+ gr_learn_resource(current, RLIMIT_AS, (cur + npages) << PAGE_SHIFT, 1);
if (cur + npages > lim)
return 0;
- return 1;
+ if (!vx_vmpages_avail(mm, npages))
diff -urNp linux-2.6.17.11/mm/mprotect.c linux-2.6.17.11/mm/mprotect.c
--- linux-2.6.17.11/mm/mprotect.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/mprotect.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/mprotect.c 2006-09-01 16:20:29.000000000 -0400
@@ -19,11 +19,18 @@
#include <linux/mempolicy.h>
#include <linux/personality.h>
return error;
diff -urNp linux-2.6.17.11/mm/mremap.c linux-2.6.17.11/mm/mremap.c
--- linux-2.6.17.11/mm/mremap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/mremap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/mremap.c 2006-09-01 16:20:29.000000000 -0400
@@ -106,6 +106,12 @@ static void move_ptes(struct vm_area_str
pte = ptep_clear_flush(vma, old_addr, old_pte);
/* ZERO_PAGE can be dependant on virtual addr */
if (ret & ~PAGE_MASK)
diff -urNp linux-2.6.17.11/mm/page_alloc.c linux-2.6.17.11/mm/page_alloc.c
--- linux-2.6.17.11/mm/page_alloc.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/page_alloc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/page_alloc.c 2006-09-01 16:20:29.000000000 -0400
@@ -334,7 +334,7 @@ static inline int page_is_buddy(struct p
static inline void __free_one_page(struct page *page,
struct zone *zone, unsigned int order)
unsigned long combined_idx;
diff -urNp linux-2.6.17.11/mm/rmap.c linux-2.6.17.11/mm/rmap.c
--- linux-2.6.17.11/mm/rmap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/rmap.c 2006-08-12 08:17:55.000000000 -0400
-@@ -106,6 +106,19 @@ int anon_vma_prepare(struct vm_area_stru
++++ linux-2.6.17.11/mm/rmap.c 2006-09-01 16:20:29.000000000 -0400
+@@ -107,6 +107,19 @@ int anon_vma_prepare(struct vm_area_stru
list_add(&vma->anon_vma_node, &anon_vma->head);
allocated = NULL;
}
if (locked)
diff -urNp linux-2.6.17.11/mm/shmem.c linux-2.6.17.11/mm/shmem.c
--- linux-2.6.17.11/mm/shmem.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/shmem.c 2006-08-12 08:17:55.000000000 -0400
-@@ -2245,7 +2245,7 @@ static struct file_system_type tmpfs_fs_
++++ linux-2.6.17.11/mm/shmem.c 2006-09-01 16:20:29.000000000 -0400
+@@ -2244,7 +2244,7 @@ static struct file_system_type tmpfs_fs_
.get_sb = shmem_get_sb,
.kill_sb = kill_litter_super,
};
{
diff -urNp linux-2.6.17.11/mm/slab.c linux-2.6.17.11/mm/slab.c
--- linux-2.6.17.11/mm/slab.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/slab.c 2006-08-12 08:17:55.000000000 -0400
-@@ -1532,6 +1532,11 @@ static void store_stackinfo(struct kmem_
++++ linux-2.6.17.11/mm/slab.c 2006-09-01 16:20:29.000000000 -0400
+@@ -1534,6 +1534,11 @@ static void store_stackinfo(struct kmem_
while (!kstack_end(sptr)) {
svalue = *sptr++;
size -= sizeof(unsigned long);
diff -urNp linux-2.6.17.11/mm/tiny-shmem.c linux-2.6.17.11/mm/tiny-shmem.c
--- linux-2.6.17.11/mm/tiny-shmem.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/tiny-shmem.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/tiny-shmem.c 2006-09-01 16:20:29.000000000 -0400
@@ -27,7 +27,7 @@ static struct file_system_type tmpfs_fs_
.kill_sb = kill_litter_super,
};
{
diff -urNp linux-2.6.17.11/mm/vmalloc.c linux-2.6.17.11/mm/vmalloc.c
--- linux-2.6.17.11/mm/vmalloc.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/mm/vmalloc.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/mm/vmalloc.c 2006-09-01 16:20:29.000000000 -0400
@@ -193,6 +193,8 @@ struct vm_struct *__get_vm_area_node(uns
write_lock(&vmlist_lock);
found:
diff -urNp linux-2.6.17.11/net/ipv4/inet_connection_sock.c linux-2.6.17.11/net/ipv4/inet_connection_sock.c
--- linux-2.6.17.11/net/ipv4/inet_connection_sock.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/ipv4/inet_connection_sock.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/net/ipv4/inet_connection_sock.c 2006-09-01 16:20:29.000000000 -0400
@@ -16,6 +16,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <net/inet_hashtables.h>
diff -urNp linux-2.6.17.11/net/ipv4/inet_hashtables.c linux-2.6.17.11/net/ipv4/inet_hashtables.c
--- linux-2.6.17.11/net/ipv4/inet_hashtables.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/ipv4/inet_hashtables.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/net/ipv4/inet_hashtables.c 2006-09-01 16:20:29.000000000 -0400
@@ -19,11 +19,14 @@
#include <linux/sched.h>
#include <linux/slab.h>
/*
* Allocate and initialize a new local port bind bucket.
* The bindhash mutex for snum's hash chain must be held here.
-@@ -310,6 +313,8 @@ ok:
+@@ -309,6 +312,8 @@ ok:
}
spin_unlock(&head->lock);
inet_twsk_put(tw);
diff -urNp linux-2.6.17.11/net/ipv4/netfilter/ipt_stealth.c linux-2.6.17.11/net/ipv4/netfilter/ipt_stealth.c
--- linux-2.6.17.11/net/ipv4/netfilter/ipt_stealth.c 1969-12-31 19:00:00.000000000 -0500
-+++ linux-2.6.17.11/net/ipv4/netfilter/ipt_stealth.c 2006-08-23 21:37:53.000000000 -0400
++++ linux-2.6.17.11/net/ipv4/netfilter/ipt_stealth.c 2006-09-01 16:20:29.000000000 -0400
@@ -0,0 +1,116 @@
+/* Kernel module to add stealth support.
+ *
+module_exit(fini);
diff -urNp linux-2.6.17.11/net/ipv4/netfilter/Kconfig linux-2.6.17.11/net/ipv4/netfilter/Kconfig
--- linux-2.6.17.11/net/ipv4/netfilter/Kconfig 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/ipv4/netfilter/Kconfig 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/net/ipv4/netfilter/Kconfig 2006-09-01 16:20:29.000000000 -0400
@@ -314,6 +314,21 @@ config IP_NF_MATCH_HASHLIMIT
destination IP' or `500pps from any given source IP' with a single
IPtables rule.
# `filter', generic and specific targets
config IP_NF_FILTER
tristate "Packet filtering"
-@@ -614,4 +629,3 @@ config IP_NF_ARP_MANGLE
- hardware and network addresses.
+@@ -829,4 +844,3 @@ config IP_NF_ARP_MANGLE
+ Documentation/modules.txt. If unsure, say `N'.
endmenu
-
diff -urNp linux-2.6.17.11/net/ipv4/netfilter/Makefile linux-2.6.17.11/net/ipv4/netfilter/Makefile
--- linux-2.6.17.11/net/ipv4/netfilter/Makefile 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/ipv4/netfilter/Makefile 2006-08-12 08:17:55.000000000 -0400
-@@ -61,6 +61,7 @@ obj-$(CONFIG_IP_NF_MATCH_DSCP) += ipt_ds
++++ linux-2.6.17.11/net/ipv4/netfilter/Makefile 2006-09-01 16:20:29.000000000 -0400
+@@ -80,6 +80,7 @@ obj-$(CONFIG_IP_NF_MATCH_DSCP) += ipt_ds
obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o
obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
diff -urNp linux-2.6.17.11/net/ipv4/tcp_ipv4.c linux-2.6.17.11/net/ipv4/tcp_ipv4.c
--- linux-2.6.17.11/net/ipv4/tcp_ipv4.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/ipv4/tcp_ipv4.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/net/ipv4/tcp_ipv4.c 2006-09-01 16:20:29.000000000 -0400
@@ -62,6 +62,7 @@
#include <linux/jhash.h>
#include <linux/init.h>
#include <net/inet_hashtables.h>
diff -urNp linux-2.6.17.11/net/ipv4/udp.c linux-2.6.17.11/net/ipv4/udp.c
--- linux-2.6.17.11/net/ipv4/udp.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/ipv4/udp.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/net/ipv4/udp.c 2006-09-01 16:20:29.000000000 -0400
@@ -102,6 +102,7 @@
#include <linux/skbuff.h>
#include <linux/proc_fs.h>
copied = len;
diff -urNp linux-2.6.17.11/net/socket.c linux-2.6.17.11/net/socket.c
--- linux-2.6.17.11/net/socket.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/socket.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/net/socket.c 2006-09-01 16:20:29.000000000 -0400
@@ -86,6 +86,7 @@
#include <linux/kmod.h>
#include <linux/audit.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
-@@ -95,6 +96,21 @@
- #include <net/sock.h>
+@@ -96,6 +97,21 @@
#include <linux/netfilter.h>
+ #include <linux/vs_socket.h>
+extern void gr_attach_curr_ip(const struct sock *sk);
+extern int gr_handle_sock_all(const int family, const int type,
static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
static ssize_t sock_aio_read(struct kiocb *iocb, char __user *buf,
size_t size, loff_t pos);
-@@ -341,7 +357,7 @@ static struct super_block *sockfs_get_sb
+@@ -342,7 +358,7 @@ static struct super_block *sockfs_get_sb
return get_sb_pseudo(fs_type, "socket:", &sockfs_ops, SOCKFS_MAGIC);
}
static struct file_system_type sock_fs_type = {
.name = "sockfs",
-@@ -1240,6 +1256,16 @@ asmlinkage long sys_socket(int family, i
+@@ -1269,6 +1285,16 @@ asmlinkage long sys_socket(int family, i
int retval;
struct socket *sock;
retval = sock_create(family, type, protocol, &sock);
if (retval < 0)
goto out;
-@@ -1335,16 +1361,25 @@ asmlinkage long sys_bind(int fd, struct
+@@ -1367,16 +1393,25 @@ asmlinkage long sys_bind(int fd, struct
{
struct socket *sock;
char address[MAX_SOCK_ADDR];
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1368,10 +1403,17 @@ asmlinkage long sys_listen(int fd, int b
+@@ -1400,10 +1435,17 @@ asmlinkage long sys_listen(int fd, int b
if ((unsigned) backlog > sysctl_somaxconn)
backlog = sysctl_somaxconn;
fput_light(sock->file, fput_needed);
}
return err;
-@@ -1408,6 +1450,13 @@ asmlinkage long sys_accept(int fd, struc
+@@ -1440,6 +1482,13 @@ asmlinkage long sys_accept(int fd, struc
newsock->type = sock->type;
newsock->ops = sock->ops;
/*
* We don't need try_module_get here, as the listening socket (sock)
* has the protocol module (sock->ops->owner) held.
-@@ -1449,6 +1498,7 @@ asmlinkage long sys_accept(int fd, struc
+@@ -1481,6 +1530,7 @@ asmlinkage long sys_accept(int fd, struc
err = newfd;
security_socket_post_accept(sock, newsock);
out_put:
fput_light(sock->file, fput_needed);
-@@ -1477,6 +1527,7 @@ asmlinkage long sys_connect(int fd, stru
+@@ -1509,6 +1559,7 @@ asmlinkage long sys_connect(int fd, stru
{
struct socket *sock;
char address[MAX_SOCK_ADDR];
int err, fput_needed;
sock = sockfd_lookup_light(fd, &err, &fput_needed);
-@@ -1486,6 +1537,13 @@ asmlinkage long sys_connect(int fd, stru
+@@ -1518,6 +1569,13 @@ asmlinkage long sys_connect(int fd, stru
if (err < 0)
goto out_put;
err = security_socket_connect(sock, (struct sockaddr *)address, addrlen);
if (err)
goto out_put;
-@@ -1740,6 +1798,7 @@ asmlinkage long sys_shutdown(int fd, int
+@@ -1772,6 +1830,7 @@ asmlinkage long sys_shutdown(int fd, int
err = sock->ops->shutdown(sock, how);
fput_light(sock->file, fput_needed);
}
diff -urNp linux-2.6.17.11/net/unix/af_unix.c linux-2.6.17.11/net/unix/af_unix.c
--- linux-2.6.17.11/net/unix/af_unix.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/net/unix/af_unix.c 2006-08-12 08:17:55.000000000 -0400
-@@ -117,6 +117,7 @@
- #include <linux/mount.h>
- #include <net/checksum.h>
- #include <linux/security.h>
++++ linux-2.6.17.11/net/unix/af_unix.c 2006-09-01 16:20:29.000000000 -0400
+@@ -120,6 +120,7 @@
+ #include <linux/vs_context.h>
+ #include <linux/vs_network.h>
+ #include <linux/vs_limit.h>
+#include <linux/grsecurity.h>
int sysctl_unix_max_dgram_qlen = 10;
-@@ -680,6 +681,11 @@ static struct sock *unix_find_other(stru
+@@ -685,6 +686,11 @@ static struct sock *unix_find_other(stru
if (err)
goto put_fail;
err = -ECONNREFUSED;
if (!S_ISSOCK(nd.dentry->d_inode->i_mode))
goto put_fail;
-@@ -703,6 +709,13 @@ static struct sock *unix_find_other(stru
+@@ -708,6 +714,13 @@ static struct sock *unix_find_other(stru
if (u) {
struct dentry *dentry;
dentry = unix_sk(u)->dentry;
if (dentry)
touch_atime(unix_sk(u)->mnt, dentry);
} else
-@@ -781,9 +794,18 @@ static int unix_bind(struct socket *sock
+@@ -786,9 +799,18 @@ static int unix_bind(struct socket *sock
*/
mode = S_IFSOCK |
(SOCK_INODE(sock)->i_mode & ~current->fs->umask);
+ goto out_mknod_dput;
+ }
+
- err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0);
+ err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0, NULL);
if (err)
goto out_mknod_dput;
+
mutex_unlock(&nd.dentry->d_inode->i_mutex);
dput(nd.dentry);
nd.dentry = dentry;
-@@ -801,6 +823,10 @@ static int unix_bind(struct socket *sock
+@@ -806,6 +828,10 @@ static int unix_bind(struct socket *sock
goto out_unlock;
}
list = &unix_socket_table[dentry->d_inode->i_ino & (UNIX_HASH_SIZE-1)];
diff -urNp linux-2.6.17.11/security/commoncap.c linux-2.6.17.11/security/commoncap.c
--- linux-2.6.17.11/security/commoncap.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/security/commoncap.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/security/commoncap.c 2006-09-01 16:20:29.000000000 -0400
@@ -24,6 +24,7 @@
#include <linux/ptrace.h>
#include <linux/xattr.h>
int cap_capable (struct task_struct *tsk, int cap)
{
/* Derived from include/linux/sched.h:capable. */
-- if (cap_raised(tsk->cap_effective, cap))
-+ if (cap_raised (tsk->cap_effective, cap) && gr_task_is_capable(tsk, cap))
+- if (vx_cap_raised(tsk->vx_info, tsk->cap_effective, cap))
++ if (vx_cap_raised(tsk->vx_info, tsk->cap_effective, cap) && gr_task_is_capable(tsk, cap))
+ return 0;
+ return -EPERM;
+}
return 0;
return -EPERM;
}
-@@ -164,8 +173,11 @@ void cap_bprm_apply_creds (struct linux_
+@@ -165,8 +174,11 @@ void cap_bprm_apply_creds (struct linux_
}
}
/* For init, we want to retain the capabilities set
* in the init_task struct. Thus we skip the usual
-@@ -176,6 +188,8 @@ void cap_bprm_apply_creds (struct linux_
+@@ -177,6 +189,8 @@ void cap_bprm_apply_creds (struct linux_
cap_intersect (new_permitted, bprm->cap_effective);
}
/* AUD: Audit candidate if current->cap_effective is set */
current->keep_capabilities = 0;
-@@ -321,12 +335,13 @@ int cap_vm_enough_memory(long pages)
+@@ -323,12 +337,13 @@ int cap_vm_enough_memory(long pages)
{
int cap_sys_admin = 0;
EXPORT_SYMBOL(cap_capget);
diff -urNp linux-2.6.17.11/security/dummy.c linux-2.6.17.11/security/dummy.c
--- linux-2.6.17.11/security/dummy.c 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/security/dummy.c 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/security/dummy.c 2006-09-01 16:20:29.000000000 -0400
@@ -29,6 +29,7 @@
#include <linux/hugetlb.h>
#include <linux/ptrace.h>
}
diff -urNp linux-2.6.17.11/security/Kconfig linux-2.6.17.11/security/Kconfig
--- linux-2.6.17.11/security/Kconfig 2006-08-07 00:18:54.000000000 -0400
-+++ linux-2.6.17.11/security/Kconfig 2006-08-12 08:17:55.000000000 -0400
++++ linux-2.6.17.11/security/Kconfig 2006-09-01 16:20:29.000000000 -0400
@@ -4,6 +4,453 @@
menu "Security options"