SOURCES: linux-2.6-vs2.1.patch (NEW) - vserver 2.1.0-rc7
baggins
baggins at pld-linux.org
Tue Nov 15 02:25:27 CET 2005
Author: baggins Date: Tue Nov 15 01:25:26 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- vserver 2.1.0-rc7
---- Files affected:
SOURCES:
linux-2.6-vs2.1.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/linux-2.6-vs2.1.patch
diff -u /dev/null SOURCES/linux-2.6-vs2.1.patch:1.1
--- /dev/null Tue Nov 15 02:25:26 2005
+++ SOURCES/linux-2.6-vs2.1.patch Tue Nov 15 02:25:21 2005
@@ -0,0 +1,25844 @@
+diff -NurpP --minimal linux-2.6.14.2/Documentation/vserver/debug.txt linux-2.6.14.2-vs2.1.0-rc7/Documentation/vserver/debug.txt
+--- linux-2.6.14.2/Documentation/vserver/debug.txt 1970-01-01 01:00:00 +0100
++++ linux-2.6.14.2-vs2.1.0-rc7/Documentation/vserver/debug.txt 2005-10-29 03:19:03 +0200
+@@ -0,0 +1,106 @@
++
++debug_cvirt:
++
++ 2 4 "vx_map_tgid: %p/%llx: %d -> %d"
++ "vx_rmap_tgid: %p/%llx: %d -> %d"
++
++debug_dlim:
++
++ 0 1 "ALLOC (%p,#%d)%c inode (%d)"
++ "FREE (%p,#%d)%c inode"
++ 1 2 "ALLOC (%p,#%d)%c %lld bytes (%d)"
++ "FREE (%p,#%d)%c %lld bytes"
++ 2 4 "ADJUST: %lld,%lld on %d,%d [mult=%d]"
++ 3 8 "ext3_has_free_blocks(%p): %u<%u+1, %c, %u!=%u r=%d"
++ "ext3_has_free_blocks(%p): free=%u, root=%u"
++ "rcu_free_dl_info(%p)"
++ 4 10 "alloc_dl_info(%p,%d) = %p"
++ "dealloc_dl_info(%p)"
++ "get_dl_info(%p[#%d.%d])"
++ "put_dl_info(%p[#%d.%d])"
++ 5 20 "alloc_dl_info(%p,%d)*"
++ 6 40 "__hash_dl_info: %p[#%d]"
++ "__unhash_dl_info: %p[#%d]"
++ 7 80 "locate_dl_info(%p,#%d) = %p"
++
++debug_net:
++
++ 2 4 "nx_addr_conflict(%p,%p) %d.%d,%d.%d"
++ 3 8 "inet_bind(%p) %d.%d.%d.%d, %d.%d.%d.%d, %d.%d.%d.%d"
++ "inet_bind(%p)* %p,%p;%lx %d.%d.%d.%d"
++ 4 10 "ip_route_connect(%p) %p,%p;%lx"
++ 5 20 "__addr_in_socket(%p,%d.%d.%d.%d) %p:%d.%d.%d.%d %p;%lx"
++ 6 40 "sk,egf: %p [#%d] (from %d)"
++ "sk,egn: %p [#%d] (from %d)"
++ "sk,req: %p [#%d] (from %d)"
++ "sk: %p [#%d] (from %d)"
++ "tw: %p [#%d] (from %d)"
++ 7 80 "__sock_recvmsg: %p[%p,%p,%p;%d]:%d/%d"
++ "__sock_sendmsg: %p[%p,%p,%p;%d]:%d/%d"
++
++debug_nid:
++
++ 0 1 "__lookup_nx_info(#%u): %p[#%u]"
++ "alloc_nx_info(%d) = %p"
++ "create_nx_info(%d) (dynamic rejected)"
++ "create_nx_info(%d) = %p (already there)"
++ "create_nx_info(%d) = %p (new)"
++ "dealloc_nx_info(%p)"
++ 1 2 "alloc_nx_info(%d)*"
++ "create_nx_info(%d)*"
++ 2 4 "get_nx_info(%p[#%d.%d])"
++ "put_nx_info(%p[#%d.%d])"
++ 3 8 "claim_nx_info(%p[#%d.%d.%d]) %p"
++ "clr_nx_info(%p[#%d.%d])"
++ "init_nx_info(%p[#%d.%d])"
++ "release_nx_info(%p[#%d.%d.%d]) %p"
++ "set_nx_info(%p[#%d.%d])"
++ 4 10 "__hash_nx_info: %p[#%d]"
++ "__nx_dynamic_id: [#%d]"
++ "__unhash_nx_info: %p[#%d]"
++ 5 20 "moved task %p into nxi:%p[#%d]"
++ "nx_migrate_task(%p,%p[#%d.%d.%d])"
++ "task_get_nx_info(%p)"
++
++debug_switch:
++
++ 0 1 "vc: VCMD_%02d_%d[%d], %d,%p,%d"
++ 1 2 "vc: VCMD_%02d_%d[%d] = %08lx(%ld)"
++ 4 10 "%s: (%s %s) returned %s with %d"
++
++debug_xid:
++
++ 0 1 "__lookup_vx_info(#%u): %p[#%u]"
++ "alloc_vx_info(%d) = %p"
++ "alloc_vx_info(%d)*"
++ "create_vx_info(%d) (dynamic rejected)"
++ "create_vx_info(%d) = %p (already there)"
++ "create_vx_info(%d) = %p (new)"
++ "dealloc_vx_info(%p)"
++ 1 2 "create_vx_info(%d)*"
++ 2 4 "get_vx_info(%p[#%d.%d])"
++ "put_vx_info(%p[#%d.%d])"
++ 3 8 "claim_vx_info(%p[#%d.%d.%d]) %p"
++ "clr_vx_info(%p[#%d.%d])"
++ "init_vx_info(%p[#%d.%d])"
++ "release_vx_info(%p[#%d.%d.%d]) %p"
++ "set_vx_info(%p[#%d.%d])"
++ 4 10 "__hash_vx_info: %p[#%d]"
++ "__unhash_vx_info: %p[#%d]"
++ "__vx_dynamic_id: [#%d]"
++ 5 20 "moved task %p into vxi:%p[#%d]"
++ "task_get_vx_info(%p)"
++ "vx_migrate_task(%p,%p[#%d.%d])"
++ 6 40 "vx_set_init(%p[#%d],%p[#%d,%d,%d])"
++ 7 80 "vx_parse_xid(ť%sŤ): %d:#%d"
++ "vx_propagate_xid(%p[#%lu.%d]): %d,%d"
++
++
++debug_limit:
++
++ n 2^n "vx_acc_cres[%5d,%s,%2d]: %5d%s"
++ "vx_cres_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
++
++ m 2^m "vx_acc_page[%5d,%s,%2d]: %5d%s"
++ "vx_acc_pages[%5d,%s,%2d]: %5d += %5d"
++ "vx_pages_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
+diff -NurpP --minimal linux-2.6.14.2/arch/alpha/Kconfig linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/Kconfig
+--- linux-2.6.14.2/arch/alpha/Kconfig 2005-10-28 20:49:08 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/Kconfig 2005-10-29 03:28:54 +0200
+@@ -609,6 +609,8 @@ source "arch/alpha/oprofile/Kconfig"
+
+ source "arch/alpha/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.14.2/arch/alpha/kernel/asm-offsets.c linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/asm-offsets.c
+--- linux-2.6.14.2/arch/alpha/kernel/asm-offsets.c 2004-08-14 12:56:24 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/asm-offsets.c 2005-10-29 04:15:18 +0200
+@@ -35,6 +35,7 @@ void foo(void)
+ DEFINE(PT_PTRACED, PT_PTRACED);
+ DEFINE(CLONE_VM, CLONE_VM);
+ DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
++ DEFINE(CLONE_KTHREAD, CLONE_KTHREAD);
+ DEFINE(SIGCHLD, SIGCHLD);
+ BLANK();
+
+diff -NurpP --minimal linux-2.6.14.2/arch/alpha/kernel/entry.S linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/entry.S
+--- linux-2.6.14.2/arch/alpha/kernel/entry.S 2005-10-28 20:49:08 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/entry.S 2005-10-29 04:06:52 +0200
+@@ -645,7 +645,7 @@ kernel_thread:
+ stq $2, 152($sp) /* HAE */
+
+ /* Shuffle FLAGS to the front; add CLONE_VM. */
+- ldi $1, CLONE_VM|CLONE_UNTRACED
++ ldi $1, CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD;
+ or $18, $1, $16
+ bsr $26, sys_clone
+
+@@ -874,22 +874,15 @@ sys_getxgid:
+ .globl sys_getxpid
+ .ent sys_getxpid
+ sys_getxpid:
++ lda $sp, -16($sp)
++ stq $26, 0($sp)
+ .prologue 0
+- ldq $2, TI_TASK($8)
+
+- /* See linux/kernel/timer.c sys_getppid for discussion
+- about this loop. */
+- ldq $3, TASK_REAL_PARENT($2)
+-1: ldl $1, TASK_TGID($3)
+-#ifdef CONFIG_SMP
+- mov $3, $4
+- mb
+- ldq $3, TASK_REAL_PARENT($2)
+- cmpeq $3, $4, $4
+- beq $4, 1b
+-#endif
+- stq $1, 80($sp)
+- ldl $0, TASK_TGID($2)
++ lda $16, 96($sp)
++ jsr $26, do_getxpid
++ ldq $26, 0($sp)
++
++ lda $sp, 16($sp)
+ ret
+ .end sys_getxpid
+
+diff -NurpP --minimal linux-2.6.14.2/arch/alpha/kernel/ptrace.c linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/ptrace.c
+--- linux-2.6.14.2/arch/alpha/kernel/ptrace.c 2005-06-22 02:37:51 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/ptrace.c 2005-10-29 03:33:25 +0200
+@@ -289,6 +289,8 @@ do_sys_ptrace(long request, long pid, lo
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out_notsk;
++ if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
++ goto out;
+
+ if (request == PTRACE_ATTACH) {
+ ret = ptrace_attach(child);
+diff -NurpP --minimal linux-2.6.14.2/arch/alpha/kernel/systbls.S linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/systbls.S
+--- linux-2.6.14.2/arch/alpha/kernel/systbls.S 2005-08-29 22:24:49 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/kernel/systbls.S 2005-10-29 03:19:01 +0200
+@@ -447,7 +447,7 @@ sys_call_table:
+ .quad sys_stat64 /* 425 */
+ .quad sys_lstat64
+ .quad sys_fstat64
+- .quad sys_ni_syscall /* sys_vserver */
++ .quad sys_vserver /* sys_vserver */
+ .quad sys_ni_syscall /* sys_mbind */
+ .quad sys_ni_syscall /* sys_get_mempolicy */
+ .quad sys_ni_syscall /* sys_set_mempolicy */
+diff -NurpP --minimal linux-2.6.14.2/arch/alpha/mm/init.c linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/mm/init.c
+--- linux-2.6.14.2/arch/alpha/mm/init.c 2005-03-02 12:38:18 +0100
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/alpha/mm/init.c 2005-10-29 03:20:33 +0200
+@@ -20,6 +20,7 @@
+ #include <linux/init.h>
+ #include <linux/bootmem.h> /* max_low_pfn */
+ #include <linux/vmalloc.h>
++#include <linux/pagemap.h>
+
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+diff -NurpP --minimal linux-2.6.14.2/arch/arm/Kconfig linux-2.6.14.2-vs2.1.0-rc7/arch/arm/Kconfig
+--- linux-2.6.14.2/arch/arm/Kconfig 2005-10-28 20:49:08 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm/Kconfig 2005-10-29 03:28:54 +0200
+@@ -739,6 +739,8 @@ source "arch/arm/oprofile/Kconfig"
+
+ source "arch/arm/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.14.2/arch/arm/kernel/calls.S linux-2.6.14.2-vs2.1.0-rc7/arch/arm/kernel/calls.S
+--- linux-2.6.14.2/arch/arm/kernel/calls.S 2005-10-28 20:49:08 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm/kernel/calls.S 2005-10-29 03:19:01 +0200
+@@ -327,7 +327,7 @@ __syscall_start:
+ /* 310 */ .long sys_request_key
+ .long sys_keyctl
+ .long sys_semtimedop
+-/* vserver */ .long sys_ni_syscall
++ .long sys_vserver
+ .long sys_ioprio_set
+ /* 315 */ .long sys_ioprio_get
+ .long sys_inotify_init
+diff -NurpP --minimal linux-2.6.14.2/arch/arm/kernel/process.c linux-2.6.14.2-vs2.1.0-rc7/arch/arm/kernel/process.c
+--- linux-2.6.14.2/arch/arm/kernel/process.c 2005-08-29 22:24:50 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm/kernel/process.c 2005-10-29 03:44:35 +0200
+@@ -436,7 +436,8 @@ pid_t kernel_thread(int (*fn)(void *), v
+ regs.ARM_pc = (unsigned long)kernel_thread_helper;
+ regs.ARM_cpsr = SVC_MODE;
+
+- return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, ®s, 0, NULL, NULL);
++ return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++ 0, ®s, 0, NULL, NULL);
+ }
+ EXPORT_SYMBOL(kernel_thread);
+
+diff -NurpP --minimal linux-2.6.14.2/arch/arm/kernel/ptrace.c linux-2.6.14.2-vs2.1.0-rc7/arch/arm/kernel/ptrace.c
+--- linux-2.6.14.2/arch/arm/kernel/ptrace.c 2005-06-22 02:37:52 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm/kernel/ptrace.c 2005-10-29 03:33:25 +0200
+@@ -809,6 +809,8 @@ asmlinkage int sys_ptrace(long request,
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
++ if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
++ goto out_tsk;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+diff -NurpP --minimal linux-2.6.14.2/arch/arm26/Kconfig linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/Kconfig
+--- linux-2.6.14.2/arch/arm26/Kconfig 2005-10-28 20:49:09 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/Kconfig 2005-10-29 03:28:54 +0200
+@@ -232,6 +232,8 @@ source "drivers/usb/Kconfig"
+
+ source "arch/arm26/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.14.2/arch/arm26/kernel/calls.S linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/kernel/calls.S
+--- linux-2.6.14.2/arch/arm26/kernel/calls.S 2005-03-02 12:38:19 +0100
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/kernel/calls.S 2005-10-29 03:19:01 +0200
+@@ -257,6 +257,11 @@ __syscall_start:
+ .long sys_lremovexattr
+ .long sys_fremovexattr
+ .long sys_tkill
++
++ .rept 313 - (. - __syscall_start) / 4
++ .long sys_ni_syscall
++ .endr
++ .long sys_vserver /* 313 */
+ __syscall_end:
+
+ .rept NR_syscalls - (__syscall_end - __syscall_start) / 4
+diff -NurpP --minimal linux-2.6.14.2/arch/arm26/kernel/process.c linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/kernel/process.c
+--- linux-2.6.14.2/arch/arm26/kernel/process.c 2005-08-29 22:24:51 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/kernel/process.c 2005-10-29 04:06:52 +0200
+@@ -369,7 +369,8 @@ pid_t kernel_thread(int (*fn)(void *), v
+ regs.ARM_r3 = (unsigned long)do_exit;
+ regs.ARM_pc = (unsigned long)kernel_thread_helper | MODE_SVC26;
+
+- return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, ®s, 0, NULL, NULL);
++ return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++ 0, ®s, 0, NULL, NULL);
+ }
+ EXPORT_SYMBOL(kernel_thread);
+
+diff -NurpP --minimal linux-2.6.14.2/arch/arm26/kernel/ptrace.c linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/kernel/ptrace.c
+--- linux-2.6.14.2/arch/arm26/kernel/ptrace.c 2005-06-22 02:37:53 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/arm26/kernel/ptrace.c 2005-10-29 03:33:25 +0200
+@@ -692,6 +692,8 @@ asmlinkage int sys_ptrace(long request,
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
++ if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
++ goto out_tsk;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+diff -NurpP --minimal linux-2.6.14.2/arch/cris/Kconfig linux-2.6.14.2-vs2.1.0-rc7/arch/cris/Kconfig
+--- linux-2.6.14.2/arch/cris/Kconfig 2005-08-29 22:24:51 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/cris/Kconfig 2005-10-29 03:28:54 +0200
+@@ -177,6 +177,8 @@ source "drivers/usb/Kconfig"
+
+ source "arch/cris/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.14.2/arch/cris/arch-v10/kernel/process.c linux-2.6.14.2-vs2.1.0-rc7/arch/cris/arch-v10/kernel/process.c
+--- linux-2.6.14.2/arch/cris/arch-v10/kernel/process.c 2005-08-29 22:24:51 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/cris/arch-v10/kernel/process.c 2005-10-29 04:22:54 +0200
+@@ -104,7 +104,8 @@ int kernel_thread(int (*fn)(void *), voi
+ regs.dccr = 1 << I_DCCR_BITNR;
+
+ /* Ok, create the new process.. */
+- return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, NULL);
++ return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++ 0, ®s, 0, NULL, NULL);
+ }
+
+ /* setup the child's kernel stack with a pt_regs and switch_stack on it.
+diff -NurpP --minimal linux-2.6.14.2/arch/cris/arch-v32/kernel/process.c linux-2.6.14.2-vs2.1.0-rc7/arch/cris/arch-v32/kernel/process.c
+--- linux-2.6.14.2/arch/cris/arch-v32/kernel/process.c 2005-08-29 22:24:51 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/cris/arch-v32/kernel/process.c 2005-10-29 04:06:52 +0200
+@@ -121,7 +121,8 @@ kernel_thread(int (*fn)(void *), void *
+ regs.ccs = 1 << (I_CCS_BITNR + CCS_SHIFT);
+
+ /* Create the new process. */
+- return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, NULL);
++ return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++ 0, ®s, 0, NULL, NULL);
+ }
+
+ /*
+diff -NurpP --minimal linux-2.6.14.2/arch/frv/kernel/kernel_thread.S linux-2.6.14.2-vs2.1.0-rc7/arch/frv/kernel/kernel_thread.S
+--- linux-2.6.14.2/arch/frv/kernel/kernel_thread.S 2005-03-02 12:38:20 +0100
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/frv/kernel/kernel_thread.S 2005-10-29 04:33:06 +0200
+@@ -13,6 +13,8 @@
+ #include <asm/unistd.h>
+
+ #define CLONE_VM 0x00000100 /* set if VM shared between processes */
++#define CLONE_KTHREAD 0x10000000 /* kernel thread */
++#define CLONE_KT (CLONE_VM | CLONE_KTHREAD) /* kernel thread flags */
+ #define KERN_ERR "<3>"
+
+ .section .rodata
+@@ -37,7 +39,7 @@ kernel_thread:
+
+ # start by forking the current process, but with shared VM
+ setlos.p #__NR_clone,gr7 ; syscall number
+- ori gr10,#CLONE_VM,gr8 ; first syscall arg [clone_flags]
++ ori gr10,#CLONE_KT,gr8 ; first syscall arg [clone_flags]
+ sethi.p #0xe4e4,gr9 ; second syscall arg [newsp]
+ setlo #0xe4e4,gr9
+ setlos.p #0,gr10 ; third syscall arg [parent_tidptr]
+diff -NurpP --minimal linux-2.6.14.2/arch/h8300/Kconfig linux-2.6.14.2-vs2.1.0-rc7/arch/h8300/Kconfig
+--- linux-2.6.14.2/arch/h8300/Kconfig 2005-08-29 22:24:52 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/h8300/Kconfig 2005-10-29 03:28:54 +0200
+@@ -191,6 +191,8 @@ source "fs/Kconfig"
+
+ source "arch/h8300/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.14.2/arch/h8300/kernel/process.c linux-2.6.14.2-vs2.1.0-rc7/arch/h8300/kernel/process.c
+--- linux-2.6.14.2/arch/h8300/kernel/process.c 2005-08-29 22:24:52 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/h8300/kernel/process.c 2005-10-29 04:22:54 +0200
+@@ -130,7 +130,7 @@ int kernel_thread(int (*fn)(void *), voi
+
+ fs = get_fs();
+ set_fs (KERNEL_DS);
+- clone_arg = flags | CLONE_VM;
++ clone_arg = flags | CLONE_VM | CLONE_KTHREAD;
+ __asm__("mov.l sp,er3\n\t"
+ "sub.l er2,er2\n\t"
+ "mov.l %2,er1\n\t"
+diff -NurpP --minimal linux-2.6.14.2/arch/h8300/kernel/ptrace.c linux-2.6.14.2-vs2.1.0-rc7/arch/h8300/kernel/ptrace.c
+--- linux-2.6.14.2/arch/h8300/kernel/ptrace.c 2005-06-22 02:37:53 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/h8300/kernel/ptrace.c 2005-10-29 03:33:25 +0200
+@@ -81,6 +81,8 @@ asmlinkage int sys_ptrace(long request,
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
++ if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
++ goto out_tsk;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/Kconfig linux-2.6.14.2-vs2.1.0-rc7/arch/i386/Kconfig
+--- linux-2.6.14.2/arch/i386/Kconfig 2005-10-28 20:49:09 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/i386/Kconfig 2005-10-29 03:28:54 +0200
+@@ -746,6 +746,46 @@ config HIGHMEM64G
+
+ endchoice
+
++choice
++ prompt "Memory Split User Space"
++ default SPLIT_3GB
++ help
++ A different Userspace/Kernel split allows you to
++ utilize up to alsmost 3GB of RAM without the requirement
++ for HIGHMEM. It also increases the available lowmem.
++
++config SPLIT_3GB
++ bool "3.0GB/1.0GB Kernel (Default)"
++ help
++ This is the default split of 3GB userspace to 1GB kernel
++ space, which will result in about 860MB of lowmem.
++
++config SPLIT_25GB
++ bool "2.5GB/1.5GB Kernel"
++ help
++ This split provides 2.5GB userspace and 1.5GB kernel
++ space, which will result in about 1370MB of lowmem.
++
++config SPLIT_2GB
++ bool "2.0GB/2.0GB Kernel"
++ help
++ This split provides 2GB userspace and 2GB kernel
++ space, which will result in about 1880MB of lowmem.
++
++config SPLIT_15GB
++ bool "1.5GB/2.5GB Kernel"
++ help
++ This split provides 1.5GB userspace and 2.5GB kernel
++ space, which will result in about 2390MB of lowmem.
++
++config SPLIT_1GB
++ bool "1.0GB/3.0GB Kernel"
++ help
++ This split provides 1GB userspace and 3GB kernel
++ space, which will result in about 2900MB of lowmem.
++
++endchoice
++
+ config HIGHMEM
+ bool
+ depends on HIGHMEM64G || HIGHMEM4G
+@@ -1299,6 +1339,8 @@ source "arch/i386/oprofile/Kconfig"
+
+ source "arch/i386/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/boot/compressed/misc.c linux-2.6.14.2-vs2.1.0-rc7/arch/i386/boot/compressed/misc.c
+--- linux-2.6.14.2/arch/i386/boot/compressed/misc.c 2005-08-29 22:24:52 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/i386/boot/compressed/misc.c 2005-10-29 04:43:33 +0200
+@@ -309,7 +309,7 @@ static void setup_normal_output_buffer(v
+ #else
+ if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory");
+ #endif
+- output_data = (char *)__PHYSICAL_START; /* Normally Points to 1M */
++ output_data = (char *)PHYSICAL_START; /* Normally Points to 1M */
+ free_mem_end_ptr = (long)real_mode;
+ }
+
+@@ -334,8 +334,8 @@ static void setup_output_buffer_if_we_ru
+ low_buffer_size = low_buffer_end - LOW_BUFFER_START;
+ high_loaded = 1;
+ free_mem_end_ptr = (long)high_buffer_start;
+- if ( (__PHYSICAL_START + low_buffer_size) > ((ulg)high_buffer_start)) {
+- high_buffer_start = (uch *)(__PHYSICAL_START + low_buffer_size);
++ if ((PHYSICAL_START + low_buffer_size) > ((ulg)high_buffer_start)) {
++ high_buffer_start = (uch *)(PHYSICAL_START + low_buffer_size);
+ mv->hcount = 0; /* say: we need not to move high_buffer */
+ }
+ else mv->hcount = -1;
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/kernel/process.c linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/process.c
+--- linux-2.6.14.2/arch/i386/kernel/process.c 2005-10-28 20:49:10 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/process.c 2005-10-29 04:43:33 +0200
+@@ -357,7 +357,8 @@ int kernel_thread(int (*fn)(void *), voi
+ regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;
+
+ /* Ok, create the new process.. */
+- return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, ®s, 0, NULL, NULL);
++ return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++ 0, ®s, 0, NULL, NULL);
+ }
+ EXPORT_SYMBOL(kernel_thread);
+
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/kernel/ptrace.c linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/ptrace.c
+--- linux-2.6.14.2/arch/i386/kernel/ptrace.c 2005-10-28 20:49:10 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/ptrace.c 2005-10-29 03:33:25 +0200
+@@ -383,6 +383,8 @@ asmlinkage int sys_ptrace(long request,
+ read_unlock(&tasklist_lock);
+ if (!child)
+ goto out;
++ if (!vx_check(vx_task_xid(child), VX_WATCH|VX_IDENT))
++ goto out_tsk;
+
+ ret = -EPERM;
+ if (pid == 1) /* you may not mess with init */
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/kernel/setup.c linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/setup.c
+--- linux-2.6.14.2/arch/i386/kernel/setup.c 2005-10-28 20:49:10 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/setup.c 2005-10-29 04:43:33 +0200
+@@ -1176,8 +1176,8 @@ void __init setup_bootmem_allocator(void
+ * the (very unlikely) case of us accidentally initializing the
+ * bootmem allocator with an invalid RAM area.
+ */
+- reserve_bootmem(__PHYSICAL_START, (PFN_PHYS(min_low_pfn) +
+- bootmap_size + PAGE_SIZE-1) - (__PHYSICAL_START));
++ reserve_bootmem(PHYSICAL_START, (PFN_PHYS(min_low_pfn) +
++ bootmap_size + PAGE_SIZE-1) - (PHYSICAL_START));
+
+ /*
+ * reserve physical page 0 - it's a special BIOS page on many boxes,
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/kernel/sys_i386.c linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/sys_i386.c
+--- linux-2.6.14.2/arch/i386/kernel/sys_i386.c 2004-08-14 12:56:23 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/sys_i386.c 2005-10-29 03:20:33 +0200
+@@ -19,6 +19,7 @@
+ #include <linux/mman.h>
+ #include <linux/file.h>
+ #include <linux/utsname.h>
++#include <linux/vs_cvirt.h>
+
+ #include <asm/uaccess.h>
+ #include <asm/ipc.h>
+@@ -217,7 +218,7 @@ asmlinkage int sys_uname(struct old_utsn
+ if (!name)
+ return -EFAULT;
+ down_read(&uts_sem);
+- err=copy_to_user(name, &system_utsname, sizeof (*name));
++ err=copy_to_user(name, vx_new_utsname(), sizeof (*name));
+ up_read(&uts_sem);
+ return err?-EFAULT:0;
+ }
+@@ -225,6 +226,7 @@ asmlinkage int sys_uname(struct old_utsn
+ asmlinkage int sys_olduname(struct oldold_utsname __user * name)
+ {
+ int error;
++ struct new_utsname *ptr;
+
+ if (!name)
+ return -EFAULT;
+@@ -233,15 +235,16 @@ asmlinkage int sys_olduname(struct oldol
+
+ down_read(&uts_sem);
+
+- error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN);
++ ptr = vx_new_utsname();
++ error = __copy_to_user(&name->sysname,ptr->sysname,__OLD_UTS_LEN);
+ error |= __put_user(0,name->sysname+__OLD_UTS_LEN);
+- error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN);
++ error |= __copy_to_user(&name->nodename,ptr->nodename,__OLD_UTS_LEN);
+ error |= __put_user(0,name->nodename+__OLD_UTS_LEN);
+- error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN);
++ error |= __copy_to_user(&name->release,ptr->release,__OLD_UTS_LEN);
+ error |= __put_user(0,name->release+__OLD_UTS_LEN);
+- error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN);
++ error |= __copy_to_user(&name->version,ptr->version,__OLD_UTS_LEN);
+ error |= __put_user(0,name->version+__OLD_UTS_LEN);
+- error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN);
++ error |= __copy_to_user(&name->machine,ptr->machine,__OLD_UTS_LEN);
+ error |= __put_user(0,name->machine+__OLD_UTS_LEN);
+
+ up_read(&uts_sem);
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/kernel/syscall_table.S linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/syscall_table.S
+--- linux-2.6.14.2/arch/i386/kernel/syscall_table.S 2005-08-29 22:24:52 +0200
++++ linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/syscall_table.S 2005-10-29 03:19:01 +0200
+@@ -273,7 +273,7 @@ ENTRY(sys_call_table)
+ .long sys_tgkill /* 270 */
+ .long sys_utimes
+ .long sys_fadvise64_64
+- .long sys_ni_syscall /* sys_vserver */
++ .long sys_vserver
+ .long sys_mbind
+ .long sys_get_mempolicy
+ .long sys_set_mempolicy
+diff -NurpP --minimal linux-2.6.14.2/arch/i386/kernel/traps.c linux-2.6.14.2-vs2.1.0-rc7/arch/i386/kernel/traps.c
+--- linux-2.6.14.2/arch/i386/kernel/traps.c 2005-10-28 20:49:10 +0200
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list