1 |
This is TOMOYO Linux patch for kernel 2.6.21. |
This is TOMOYO Linux patch for kernel 2.6.21.7. |
2 |
|
|
3 |
Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 |
Source code for this patch is http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.7.tar.bz2 |
4 |
--- |
--- |
|
Makefile | 2 |
|
5 |
arch/alpha/kernel/ptrace.c | 9 +++ |
arch/alpha/kernel/ptrace.c | 9 +++ |
6 |
arch/ia64/ia32/sys_ia32.c | 9 +++ |
arch/ia64/ia32/sys_ia32.c | 9 +++ |
7 |
arch/ia64/kernel/ptrace.c | 9 +++ |
arch/ia64/kernel/ptrace.c | 9 +++ |
45 |
net/ipv6/inet6_hashtables.c | 7 ++ |
net/ipv6/inet6_hashtables.c | 7 ++ |
46 |
net/socket.c | 41 ++++++++++++++ |
net/socket.c | 41 ++++++++++++++ |
47 |
net/unix/af_unix.c | 15 +++++ |
net/unix/af_unix.c | 15 +++++ |
48 |
44 files changed, 681 insertions(+), 3 deletions(-) |
43 files changed, 680 insertions(+), 2 deletions(-) |
49 |
|
|
50 |
--- linux-2.6.21.orig/Makefile |
--- linux-2.6.21.7.orig/arch/alpha/kernel/ptrace.c |
51 |
+++ linux-2.6.21/Makefile |
+++ linux-2.6.21.7/arch/alpha/kernel/ptrace.c |
|
@@ -1,7 +1,7 @@ |
|
|
VERSION = 2 |
|
|
PATCHLEVEL = 6 |
|
|
SUBLEVEL = 21 |
|
|
-EXTRAVERSION = |
|
|
+EXTRAVERSION = -ccs |
|
|
NAME = Nocturnal Monster Puppy |
|
|
|
|
|
# *DOCUMENTATION* |
|
|
--- linux-2.6.21.orig/arch/alpha/kernel/ptrace.c |
|
|
+++ linux-2.6.21/arch/alpha/kernel/ptrace.c |
|
52 |
@@ -20,6 +20,9 @@ |
@@ -20,6 +20,9 @@ |
53 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
54 |
#include <asm/system.h> |
#include <asm/system.h> |
72 |
|
|
73 |
lock_kernel(); |
lock_kernel(); |
74 |
DBG(DBG_MEM, ("request=%ld pid=%ld addr=0x%lx data=0x%lx\n", |
DBG(DBG_MEM, ("request=%ld pid=%ld addr=0x%lx data=0x%lx\n", |
75 |
--- linux-2.6.21.orig/arch/ia64/ia32/sys_ia32.c |
--- linux-2.6.21.7.orig/arch/ia64/ia32/sys_ia32.c |
76 |
+++ linux-2.6.21/arch/ia64/ia32/sys_ia32.c |
+++ linux-2.6.21.7/arch/ia64/ia32/sys_ia32.c |
77 |
@@ -56,6 +56,9 @@ |
@@ -56,6 +56,9 @@ |
78 |
#include <asm/types.h> |
#include <asm/types.h> |
79 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
97 |
|
|
98 |
lock_kernel(); |
lock_kernel(); |
99 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
100 |
--- linux-2.6.21.orig/arch/ia64/kernel/ptrace.c |
--- linux-2.6.21.7.orig/arch/ia64/kernel/ptrace.c |
101 |
+++ linux-2.6.21/arch/ia64/kernel/ptrace.c |
+++ linux-2.6.21.7/arch/ia64/kernel/ptrace.c |
102 |
@@ -28,6 +28,9 @@ |
@@ -28,6 +28,9 @@ |
103 |
#ifdef CONFIG_PERFMON |
#ifdef CONFIG_PERFMON |
104 |
#include <asm/perfmon.h> |
#include <asm/perfmon.h> |
122 |
|
|
123 |
lock_kernel(); |
lock_kernel(); |
124 |
ret = -EPERM; |
ret = -EPERM; |
125 |
--- linux-2.6.21.orig/arch/m32r/kernel/ptrace.c |
--- linux-2.6.21.7.orig/arch/m32r/kernel/ptrace.c |
126 |
+++ linux-2.6.21/arch/m32r/kernel/ptrace.c |
+++ linux-2.6.21.7/arch/m32r/kernel/ptrace.c |
127 |
@@ -32,6 +32,9 @@ |
@@ -32,6 +32,9 @@ |
128 |
#include <asm/system.h> |
#include <asm/system.h> |
129 |
#include <asm/processor.h> |
#include <asm/processor.h> |
147 |
|
|
148 |
lock_kernel(); |
lock_kernel(); |
149 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
150 |
--- linux-2.6.21.orig/arch/mips/kernel/ptrace32.c |
--- linux-2.6.21.7.orig/arch/mips/kernel/ptrace32.c |
151 |
+++ linux-2.6.21/arch/mips/kernel/ptrace32.c |
+++ linux-2.6.21.7/arch/mips/kernel/ptrace32.c |
152 |
@@ -35,6 +35,9 @@ |
@@ -35,6 +35,9 @@ |
153 |
#include <asm/system.h> |
#include <asm/system.h> |
154 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
172 |
|
|
173 |
#if 0 |
#if 0 |
174 |
printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", |
printk("ptrace(r=%d,pid=%d,addr=%08lx,data=%08lx)\n", |
175 |
--- linux-2.6.21.orig/arch/powerpc/kernel/ptrace32.c |
--- linux-2.6.21.7.orig/arch/powerpc/kernel/ptrace32.c |
176 |
+++ linux-2.6.21/arch/powerpc/kernel/ptrace32.c |
+++ linux-2.6.21.7/arch/powerpc/kernel/ptrace32.c |
177 |
@@ -32,6 +32,9 @@ |
@@ -32,6 +32,9 @@ |
178 |
#include <asm/page.h> |
#include <asm/page.h> |
179 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
197 |
|
|
198 |
lock_kernel(); |
lock_kernel(); |
199 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
200 |
--- linux-2.6.21.orig/arch/s390/kernel/ptrace.c |
--- linux-2.6.21.7.orig/arch/s390/kernel/ptrace.c |
201 |
+++ linux-2.6.21/arch/s390/kernel/ptrace.c |
+++ linux-2.6.21.7/arch/s390/kernel/ptrace.c |
202 |
@@ -41,6 +41,9 @@ |
@@ -41,6 +41,9 @@ |
203 |
#include <asm/system.h> |
#include <asm/system.h> |
204 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
222 |
lock_kernel(); |
lock_kernel(); |
223 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
224 |
ret = ptrace_traceme(); |
ret = ptrace_traceme(); |
225 |
--- linux-2.6.21.orig/arch/sh64/kernel/ptrace.c |
--- linux-2.6.21.7.orig/arch/sh64/kernel/ptrace.c |
226 |
+++ linux-2.6.21/arch/sh64/kernel/ptrace.c |
+++ linux-2.6.21.7/arch/sh64/kernel/ptrace.c |
227 |
@@ -35,6 +35,9 @@ |
@@ -35,6 +35,9 @@ |
228 |
#include <asm/system.h> |
#include <asm/system.h> |
229 |
#include <asm/processor.h> |
#include <asm/processor.h> |
247 |
|
|
248 |
lock_kernel(); |
lock_kernel(); |
249 |
if (first_call) { |
if (first_call) { |
250 |
--- linux-2.6.21.orig/arch/sparc/kernel/ptrace.c |
--- linux-2.6.21.7.orig/arch/sparc/kernel/ptrace.c |
251 |
+++ linux-2.6.21/arch/sparc/kernel/ptrace.c |
+++ linux-2.6.21.7/arch/sparc/kernel/ptrace.c |
252 |
@@ -23,6 +23,9 @@ |
@@ -23,6 +23,9 @@ |
253 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
254 |
#include <asm/system.h> |
#include <asm/system.h> |
274 |
|
|
275 |
lock_kernel(); |
lock_kernel(); |
276 |
#ifdef DEBUG_PTRACE |
#ifdef DEBUG_PTRACE |
277 |
--- linux-2.6.21.orig/arch/sparc64/kernel/ptrace.c |
--- linux-2.6.21.7.orig/arch/sparc64/kernel/ptrace.c |
278 |
+++ linux-2.6.21/arch/sparc64/kernel/ptrace.c |
+++ linux-2.6.21.7/arch/sparc64/kernel/ptrace.c |
279 |
@@ -32,6 +32,9 @@ |
@@ -32,6 +32,9 @@ |
280 |
#include <asm/spitfire.h> |
#include <asm/spitfire.h> |
281 |
#include <asm/page.h> |
#include <asm/page.h> |
301 |
|
|
302 |
if (test_thread_flag(TIF_32BIT)) { |
if (test_thread_flag(TIF_32BIT)) { |
303 |
addr &= 0xffffffffUL; |
addr &= 0xffffffffUL; |
304 |
--- linux-2.6.21.orig/arch/x86_64/ia32/ptrace32.c |
--- linux-2.6.21.7.orig/arch/x86_64/ia32/ptrace32.c |
305 |
+++ linux-2.6.21/arch/x86_64/ia32/ptrace32.c |
+++ linux-2.6.21.7/arch/x86_64/ia32/ptrace32.c |
306 |
@@ -26,6 +26,9 @@ |
@@ -26,6 +26,9 @@ |
307 |
#include <asm/i387.h> |
#include <asm/i387.h> |
308 |
#include <asm/fpu32.h> |
#include <asm/fpu32.h> |
326 |
|
|
327 |
switch (request) { |
switch (request) { |
328 |
case PTRACE_TRACEME: |
case PTRACE_TRACEME: |
329 |
--- linux-2.6.21.orig/fs/Kconfig |
--- linux-2.6.21.7.orig/fs/Kconfig |
330 |
+++ linux-2.6.21/fs/Kconfig |
+++ linux-2.6.21.7/fs/Kconfig |
331 |
@@ -2055,5 +2055,7 @@ endif |
@@ -2055,5 +2055,7 @@ endif |
332 |
source "fs/nls/Kconfig" |
source "fs/nls/Kconfig" |
333 |
source "fs/dlm/Kconfig" |
source "fs/dlm/Kconfig" |
336 |
+ |
+ |
337 |
endmenu |
endmenu |
338 |
|
|
339 |
--- linux-2.6.21.orig/fs/Makefile |
--- linux-2.6.21.7.orig/fs/Makefile |
340 |
+++ linux-2.6.21/fs/Makefile |
+++ linux-2.6.21.7/fs/Makefile |
341 |
@@ -114,3 +114,5 @@ obj-$(CONFIG_HPPFS) += hppfs/ |
@@ -114,3 +114,5 @@ obj-$(CONFIG_HPPFS) += hppfs/ |
342 |
obj-$(CONFIG_DEBUG_FS) += debugfs/ |
obj-$(CONFIG_DEBUG_FS) += debugfs/ |
343 |
obj-$(CONFIG_OCFS2_FS) += ocfs2/ |
obj-$(CONFIG_OCFS2_FS) += ocfs2/ |
344 |
obj-$(CONFIG_GFS2_FS) += gfs2/ |
obj-$(CONFIG_GFS2_FS) += gfs2/ |
345 |
+ |
+ |
346 |
+include $(srctree)/fs/Makefile-2.6.ccs |
+include $(srctree)/fs/Makefile-2.6.ccs |
347 |
--- linux-2.6.21.orig/fs/attr.c |
--- linux-2.6.21.7.orig/fs/attr.c |
348 |
+++ linux-2.6.21/fs/attr.c |
+++ linux-2.6.21.7/fs/attr.c |
349 |
@@ -15,6 +15,9 @@ |
@@ -15,6 +15,9 @@ |
350 |
#include <linux/fcntl.h> |
#include <linux/fcntl.h> |
351 |
#include <linux/quotaops.h> |
#include <linux/quotaops.h> |
385 |
if (!error) { |
if (!error) { |
386 |
if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || |
if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || |
387 |
(ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) |
(ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) |
388 |
--- linux-2.6.21.orig/fs/compat.c |
--- linux-2.6.21.7.orig/fs/compat.c |
389 |
+++ linux-2.6.21/fs/compat.c |
+++ linux-2.6.21.7/fs/compat.c |
390 |
@@ -56,6 +56,9 @@ |
@@ -56,6 +56,9 @@ |
391 |
#include <asm/mmu_context.h> |
#include <asm/mmu_context.h> |
392 |
#include <asm/ioctls.h> |
#include <asm/ioctls.h> |
419 |
if (retval >= 0) { |
if (retval >= 0) { |
420 |
free_arg_pages(bprm); |
free_arg_pages(bprm); |
421 |
|
|
422 |
--- linux-2.6.21.orig/fs/exec.c |
--- linux-2.6.21.7.orig/fs/exec.c |
423 |
+++ linux-2.6.21/fs/exec.c |
+++ linux-2.6.21.7/fs/exec.c |
424 |
@@ -58,6 +58,10 @@ |
@@ -58,6 +58,10 @@ |
425 |
#include <linux/kmod.h> |
#include <linux/kmod.h> |
426 |
#endif |
#endif |
469 |
if (retval >= 0) { |
if (retval >= 0) { |
470 |
free_arg_pages(bprm); |
free_arg_pages(bprm); |
471 |
|
|
472 |
--- linux-2.6.21.orig/fs/fcntl.c |
--- linux-2.6.21.7.orig/fs/fcntl.c |
473 |
+++ linux-2.6.21/fs/fcntl.c |
+++ linux-2.6.21.7/fs/fcntl.c |
474 |
@@ -22,6 +22,9 @@ |
@@ -22,6 +22,9 @@ |
475 |
#include <asm/poll.h> |
#include <asm/poll.h> |
476 |
#include <asm/siginfo.h> |
#include <asm/siginfo.h> |
494 |
/* O_NOATIME can only be set by the owner or superuser */ |
/* O_NOATIME can only be set by the owner or superuser */ |
495 |
if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) |
if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) |
496 |
if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER)) |
if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER)) |
497 |
--- linux-2.6.21.orig/fs/ioctl.c |
--- linux-2.6.21.7.orig/fs/ioctl.c |
498 |
+++ linux-2.6.21/fs/ioctl.c |
+++ linux-2.6.21.7/fs/ioctl.c |
499 |
@@ -15,6 +15,9 @@ |
@@ -15,6 +15,9 @@ |
500 |
|
|
501 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
517 |
|
|
518 |
if (filp->f_op->unlocked_ioctl) { |
if (filp->f_op->unlocked_ioctl) { |
519 |
error = filp->f_op->unlocked_ioctl(filp, cmd, arg); |
error = filp->f_op->unlocked_ioctl(filp, cmd, arg); |
520 |
--- linux-2.6.21.orig/fs/namei.c |
--- linux-2.6.21.7.orig/fs/namei.c |
521 |
+++ linux-2.6.21/fs/namei.c |
+++ linux-2.6.21.7/fs/namei.c |
522 |
@@ -37,6 +37,10 @@ |
@@ -37,6 +37,10 @@ |
523 |
|
|
524 |
#define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE]) |
#define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE]) |
747 |
|
|
748 |
from = getname(oldname); |
from = getname(oldname); |
749 |
if(IS_ERR(from)) |
if(IS_ERR(from)) |
750 |
--- linux-2.6.21.orig/fs/namespace.c |
--- linux-2.6.21.7.orig/fs/namespace.c |
751 |
+++ linux-2.6.21/fs/namespace.c |
+++ linux-2.6.21.7/fs/namespace.c |
752 |
@@ -28,6 +28,12 @@ |
@@ -28,6 +28,12 @@ |
753 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
754 |
#include <asm/unistd.h> |
#include <asm/unistd.h> |
861 |
if (error) { |
if (error) { |
862 |
path_release(&old_nd); |
path_release(&old_nd); |
863 |
goto out1; |
goto out1; |
864 |
--- linux-2.6.21.orig/fs/open.c |
--- linux-2.6.21.7.orig/fs/open.c |
865 |
+++ linux-2.6.21/fs/open.c |
+++ linux-2.6.21.7/fs/open.c |
866 |
@@ -27,6 +27,12 @@ |
@@ -27,6 +27,12 @@ |
867 |
#include <linux/syscalls.h> |
#include <linux/syscalls.h> |
868 |
#include <linux/rcupdate.h> |
#include <linux/rcupdate.h> |
925 |
if (capable(CAP_SYS_TTY_CONFIG)) { |
if (capable(CAP_SYS_TTY_CONFIG)) { |
926 |
/* XXX: this needs locking */ |
/* XXX: this needs locking */ |
927 |
tty_vhangup(current->signal->tty); |
tty_vhangup(current->signal->tty); |
928 |
--- linux-2.6.21.orig/fs/proc/Makefile |
--- linux-2.6.21.7.orig/fs/proc/Makefile |
929 |
+++ linux-2.6.21/fs/proc/Makefile |
+++ linux-2.6.21.7/fs/proc/Makefile |
930 |
@@ -15,3 +15,6 @@ proc-$(CONFIG_PROC_KCORE) += kcore.o |
@@ -15,3 +15,6 @@ proc-$(CONFIG_PROC_KCORE) += kcore.o |
931 |
proc-$(CONFIG_PROC_VMCORE) += vmcore.o |
proc-$(CONFIG_PROC_VMCORE) += vmcore.o |
932 |
proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o |
proc-$(CONFIG_PROC_DEVICETREE) += proc_devtree.o |
934 |
+ |
+ |
935 |
+proc-$(CONFIG_SAKURA) += ccs_proc.o |
+proc-$(CONFIG_SAKURA) += ccs_proc.o |
936 |
+proc-$(CONFIG_TOMOYO) += ccs_proc.o |
+proc-$(CONFIG_TOMOYO) += ccs_proc.o |
937 |
--- linux-2.6.21.orig/fs/proc/proc_misc.c |
--- linux-2.6.21.7.orig/fs/proc/proc_misc.c |
938 |
+++ linux-2.6.21/fs/proc/proc_misc.c |
+++ linux-2.6.21.7/fs/proc/proc_misc.c |
939 |
@@ -747,4 +747,9 @@ void __init proc_misc_init(void) |
@@ -747,4 +747,9 @@ void __init proc_misc_init(void) |
940 |
entry->proc_fops = &proc_sysrq_trigger_operations; |
entry->proc_fops = &proc_sysrq_trigger_operations; |
941 |
} |
} |
942 |
#endif |
#endif |
943 |
+ /***** CCS start. *****/ |
+ /***** CCS start. *****/ |
944 |
+#if defined(CONFIG_SAKURA) || defined(CONFIG_TOMOYO) |
+#if defined(CONFIG_SAKURA) || defined(CONFIG_TOMOYO) |
945 |
+ printk(KERN_INFO "Hook version: 2.6.21 2008/04/28\n"); |
+ printk(KERN_INFO "Hook version: 2.6.21.7 2008/08/27\n"); |
946 |
+#endif |
+#endif |
947 |
+ /***** CCS end. *****/ |
+ /***** CCS end. *****/ |
948 |
} |
} |
949 |
--- linux-2.6.21.orig/include/linux/init_task.h |
--- linux-2.6.21.7.orig/include/linux/init_task.h |
950 |
+++ linux-2.6.21/include/linux/init_task.h |
+++ linux-2.6.21.7/include/linux/init_task.h |
951 |
@@ -141,6 +141,10 @@ extern struct group_info init_groups; |
@@ -141,6 +141,10 @@ extern struct group_info init_groups; |
952 |
.pi_lock = SPIN_LOCK_UNLOCKED, \ |
.pi_lock = SPIN_LOCK_UNLOCKED, \ |
953 |
INIT_TRACE_IRQFLAGS \ |
INIT_TRACE_IRQFLAGS \ |
959 |
} |
} |
960 |
|
|
961 |
|
|
962 |
--- linux-2.6.21.orig/include/linux/sched.h |
--- linux-2.6.21.7.orig/include/linux/sched.h |
963 |
+++ linux-2.6.21/include/linux/sched.h |
+++ linux-2.6.21.7/include/linux/sched.h |
964 |
@@ -27,6 +27,11 @@ |
@@ -27,6 +27,11 @@ |
965 |
#define CLONE_NEWUTS 0x04000000 /* New utsname group? */ |
#define CLONE_NEWUTS 0x04000000 /* New utsname group? */ |
966 |
#define CLONE_NEWIPC 0x08000000 /* New ipcs */ |
#define CLONE_NEWIPC 0x08000000 /* New ipcs */ |
984 |
}; |
}; |
985 |
|
|
986 |
static inline pid_t process_group(struct task_struct *tsk) |
static inline pid_t process_group(struct task_struct *tsk) |
987 |
--- linux-2.6.21.orig/kernel/compat.c |
--- linux-2.6.21.7.orig/kernel/compat.c |
988 |
+++ linux-2.6.21/kernel/compat.c |
+++ linux-2.6.21.7/kernel/compat.c |
989 |
@@ -25,6 +25,9 @@ |
@@ -25,6 +25,9 @@ |
990 |
#include <linux/posix-timers.h> |
#include <linux/posix-timers.h> |
991 |
|
|
1007 |
|
|
1008 |
do_settimeofday(&tv); |
do_settimeofday(&tv); |
1009 |
return 0; |
return 0; |
1010 |
--- linux-2.6.21.orig/kernel/kexec.c |
--- linux-2.6.21.7.orig/kernel/kexec.c |
1011 |
+++ linux-2.6.21/kernel/kexec.c |
+++ linux-2.6.21.7/kernel/kexec.c |
1012 |
@@ -28,6 +28,9 @@ |
@@ -28,6 +28,9 @@ |
1013 |
#include <asm/io.h> |
#include <asm/io.h> |
1014 |
#include <asm/system.h> |
#include <asm/system.h> |
1030 |
|
|
1031 |
/* |
/* |
1032 |
* Verify we have a legal set of flags |
* Verify we have a legal set of flags |
1033 |
--- linux-2.6.21.orig/kernel/kmod.c |
--- linux-2.6.21.7.orig/kernel/kmod.c |
1034 |
+++ linux-2.6.21/kernel/kmod.c |
+++ linux-2.6.21.7/kernel/kmod.c |
1035 |
@@ -166,6 +166,11 @@ static int ____call_usermodehelper(void |
@@ -166,6 +166,11 @@ static int ____call_usermodehelper(void |
1036 |
/* We can run anywhere, unlike our parent keventd(). */ |
/* We can run anywhere, unlike our parent keventd(). */ |
1037 |
set_cpus_allowed(current, CPU_MASK_ALL); |
set_cpus_allowed(current, CPU_MASK_ALL); |
1044 |
retval = -EPERM; |
retval = -EPERM; |
1045 |
if (current->fs->root) |
if (current->fs->root) |
1046 |
retval = kernel_execve(sub_info->path, |
retval = kernel_execve(sub_info->path, |
1047 |
--- linux-2.6.21.orig/kernel/module.c |
--- linux-2.6.21.7.orig/kernel/module.c |
1048 |
+++ linux-2.6.21/kernel/module.c |
+++ linux-2.6.21.7/kernel/module.c |
1049 |
@@ -44,6 +44,9 @@ |
@@ -44,6 +44,9 @@ |
1050 |
#include <asm/semaphore.h> |
#include <asm/semaphore.h> |
1051 |
#include <asm/cacheflush.h> |
#include <asm/cacheflush.h> |
1078 |
|
|
1079 |
/* Only one module load at a time, please */ |
/* Only one module load at a time, please */ |
1080 |
if (mutex_lock_interruptible(&module_mutex) != 0) |
if (mutex_lock_interruptible(&module_mutex) != 0) |
1081 |
--- linux-2.6.21.orig/kernel/ptrace.c |
--- linux-2.6.21.7.orig/kernel/ptrace.c |
1082 |
+++ linux-2.6.21/kernel/ptrace.c |
+++ linux-2.6.21.7/kernel/ptrace.c |
1083 |
@@ -21,6 +21,9 @@ |
@@ -21,6 +21,9 @@ |
1084 |
|
|
1085 |
#include <asm/pgtable.h> |
#include <asm/pgtable.h> |
1103 |
lock_kernel(); |
lock_kernel(); |
1104 |
if (request == PTRACE_TRACEME) { |
if (request == PTRACE_TRACEME) { |
1105 |
ret = ptrace_traceme(); |
ret = ptrace_traceme(); |
1106 |
--- linux-2.6.21.orig/kernel/sched.c |
--- linux-2.6.21.7.orig/kernel/sched.c |
1107 |
+++ linux-2.6.21/kernel/sched.c |
+++ linux-2.6.21.7/kernel/sched.c |
1108 |
@@ -55,6 +55,9 @@ |
@@ -55,6 +55,9 @@ |
1109 |
#include <asm/tlb.h> |
#include <asm/tlb.h> |
1110 |
|
|
1115 |
|
|
1116 |
/* |
/* |
1117 |
* Scheduler clock - returns current time in nanosec units. |
* Scheduler clock - returns current time in nanosec units. |
1118 |
@@ -3960,6 +3963,10 @@ int can_nice(const struct task_struct *p |
@@ -3964,6 +3967,10 @@ int can_nice(const struct task_struct *p |
1119 |
asmlinkage long sys_nice(int increment) |
asmlinkage long sys_nice(int increment) |
1120 |
{ |
{ |
1121 |
long nice, retval; |
long nice, retval; |
1126 |
|
|
1127 |
/* |
/* |
1128 |
* Setpriority might change our priority at the same moment. |
* Setpriority might change our priority at the same moment. |
1129 |
--- linux-2.6.21.orig/kernel/signal.c |
--- linux-2.6.21.7.orig/kernel/signal.c |
1130 |
+++ linux-2.6.21/kernel/signal.c |
+++ linux-2.6.21.7/kernel/signal.c |
1131 |
@@ -32,6 +32,9 @@ |
@@ -32,6 +32,9 @@ |
1132 |
#include <asm/unistd.h> |
#include <asm/unistd.h> |
1133 |
#include <asm/siginfo.h> |
#include <asm/siginfo.h> |
1177 |
|
|
1178 |
return do_tkill(0, pid, sig); |
return do_tkill(0, pid, sig); |
1179 |
} |
} |
1180 |
--- linux-2.6.21.orig/kernel/sys.c |
--- linux-2.6.21.7.orig/kernel/sys.c |
1181 |
+++ linux-2.6.21/kernel/sys.c |
+++ linux-2.6.21.7/kernel/sys.c |
1182 |
@@ -37,6 +37,9 @@ |
@@ -37,6 +37,9 @@ |
1183 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1184 |
#include <asm/io.h> |
#include <asm/io.h> |
1235 |
|
|
1236 |
down_write(&uts_sem); |
down_write(&uts_sem); |
1237 |
errno = -EFAULT; |
errno = -EFAULT; |
1238 |
--- linux-2.6.21.orig/kernel/sysctl.c |
--- linux-2.6.21.7.orig/kernel/sysctl.c |
1239 |
+++ linux-2.6.21/kernel/sysctl.c |
+++ linux-2.6.21.7/kernel/sysctl.c |
1240 |
@@ -48,6 +48,9 @@ |
@@ -48,6 +48,9 @@ |
1241 |
|
|
1242 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1353 |
error = parse_table(name, nlen, oldval, oldlenp, |
error = parse_table(name, nlen, oldval, oldlenp, |
1354 |
newval, newlen, head->ctl_table); |
newval, newlen, head->ctl_table); |
1355 |
if (error != -ENOTDIR) { |
if (error != -ENOTDIR) { |
1356 |
--- linux-2.6.21.orig/kernel/time.c |
--- linux-2.6.21.7.orig/kernel/time.c |
1357 |
+++ linux-2.6.21/kernel/time.c |
+++ linux-2.6.21.7/kernel/time.c |
1358 |
@@ -39,6 +39,9 @@ |
@@ -39,6 +39,9 @@ |
1359 |
|
|
1360 |
#include <asm/uaccess.h> |
#include <asm/uaccess.h> |
1387 |
|
|
1388 |
if (tz) { |
if (tz) { |
1389 |
/* SMP safe, global irq locking makes it work. */ |
/* SMP safe, global irq locking makes it work. */ |
1390 |
--- linux-2.6.21.orig/kernel/time/ntp.c |
--- linux-2.6.21.7.orig/kernel/time/ntp.c |
1391 |
+++ linux-2.6.21/kernel/time/ntp.c |
+++ linux-2.6.21.7/kernel/time/ntp.c |
1392 |
@@ -14,6 +14,9 @@ |
@@ -14,6 +14,9 @@ |
1393 |
|
|
1394 |
#include <asm/div64.h> |
#include <asm/div64.h> |
1399 |
|
|
1400 |
/* |
/* |
1401 |
* Timekeeping variables |
* Timekeeping variables |
1402 |
@@ -203,6 +206,10 @@ int do_adjtimex(struct timex *txc) |
@@ -201,6 +204,10 @@ int do_adjtimex(struct timex *txc) |
1403 |
/* In order to modify anything, you gotta be super-user! */ |
/* In order to modify anything, you gotta be super-user! */ |
1404 |
if (txc->modes && !capable(CAP_SYS_TIME)) |
if (txc->modes && !capable(CAP_SYS_TIME)) |
1405 |
return -EPERM; |
return -EPERM; |
1410 |
|
|
1411 |
/* Now we validate the data before disabling interrupts */ |
/* Now we validate the data before disabling interrupts */ |
1412 |
|
|
1413 |
--- linux-2.6.21.orig/net/core/datagram.c |
--- linux-2.6.21.7.orig/net/core/datagram.c |
1414 |
+++ linux-2.6.21/net/core/datagram.c |
+++ linux-2.6.21.7/net/core/datagram.c |
1415 |
@@ -56,6 +56,11 @@ |
@@ -56,6 +56,11 @@ |
1416 |
#include <net/sock.h> |
#include <net/sock.h> |
1417 |
#include <net/tcp_states.h> |
#include <net/tcp_states.h> |
1437 |
if (skb) |
if (skb) |
1438 |
return skb; |
return skb; |
1439 |
|
|
1440 |
--- linux-2.6.21.orig/net/ipv4/inet_connection_sock.c |
--- linux-2.6.21.7.orig/net/ipv4/inet_connection_sock.c |
1441 |
+++ linux-2.6.21/net/ipv4/inet_connection_sock.c |
+++ linux-2.6.21.7/net/ipv4/inet_connection_sock.c |
1442 |
@@ -23,6 +23,9 @@ |
@@ -23,6 +23,9 @@ |
1443 |
#include <net/route.h> |
#include <net/route.h> |
1444 |
#include <net/tcp_states.h> |
#include <net/tcp_states.h> |
1449 |
|
|
1450 |
#ifdef INET_CSK_DEBUG |
#ifdef INET_CSK_DEBUG |
1451 |
const char inet_csk_timer_bug_msg[] = "inet_csk BUG: unknown timer value\n"; |
const char inet_csk_timer_bug_msg[] = "inet_csk BUG: unknown timer value\n"; |
1452 |
@@ -87,6 +90,10 @@ int inet_csk_get_port(struct inet_hashin |
@@ -85,6 +88,10 @@ int inet_csk_get_port(struct inet_hashin |
1453 |
do { |
do { |
1454 |
head = &hashinfo->bhash[inet_bhashfn(rover, hashinfo->bhash_size)]; |
head = &hashinfo->bhash[inet_bhashfn(rover, hashinfo->bhash_size)]; |
1455 |
spin_lock(&head->lock); |
spin_lock(&head->lock); |
1460 |
inet_bind_bucket_for_each(tb, node, &head->chain) |
inet_bind_bucket_for_each(tb, node, &head->chain) |
1461 |
if (tb->port == rover) |
if (tb->port == rover) |
1462 |
goto next; |
goto next; |
1463 |
--- linux-2.6.21.orig/net/ipv4/inet_hashtables.c |
--- linux-2.6.21.7.orig/net/ipv4/inet_hashtables.c |
1464 |
+++ linux-2.6.21/net/ipv4/inet_hashtables.c |
+++ linux-2.6.21.7/net/ipv4/inet_hashtables.c |
1465 |
@@ -22,6 +22,9 @@ |
@@ -22,6 +22,9 @@ |
1466 |
#include <net/inet_connection_sock.h> |
#include <net/inet_connection_sock.h> |
1467 |
#include <net/inet_hashtables.h> |
#include <net/inet_hashtables.h> |
1483 |
head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)]; |
head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)]; |
1484 |
spin_lock(&head->lock); |
spin_lock(&head->lock); |
1485 |
|
|
1486 |
--- linux-2.6.21.orig/net/ipv4/udp.c |
--- linux-2.6.21.7.orig/net/ipv4/udp.c |
1487 |
+++ linux-2.6.21/net/ipv4/udp.c |
+++ linux-2.6.21.7/net/ipv4/udp.c |
1488 |
@@ -102,6 +102,9 @@ |
@@ -102,6 +102,9 @@ |
1489 |
#include <net/checksum.h> |
#include <net/checksum.h> |
1490 |
#include <net/xfrm.h> |
#include <net/xfrm.h> |
1517 |
if (! __udp_lib_lport_inuse(result, udptable)) |
if (! __udp_lib_lport_inuse(result, udptable)) |
1518 |
break; |
break; |
1519 |
} |
} |
1520 |
--- linux-2.6.21.orig/net/ipv6/inet6_hashtables.c |
--- linux-2.6.21.7.orig/net/ipv6/inet6_hashtables.c |
1521 |
+++ linux-2.6.21/net/ipv6/inet6_hashtables.c |
+++ linux-2.6.21.7/net/ipv6/inet6_hashtables.c |
1522 |
@@ -21,6 +21,9 @@ |
@@ -21,6 +21,9 @@ |
1523 |
#include <net/inet_hashtables.h> |
#include <net/inet_hashtables.h> |
1524 |
#include <net/inet6_hashtables.h> |
#include <net/inet6_hashtables.h> |
1540 |
head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)]; |
head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)]; |
1541 |
spin_lock(&head->lock); |
spin_lock(&head->lock); |
1542 |
|
|
1543 |
--- linux-2.6.21.orig/net/socket.c |
--- linux-2.6.21.7.orig/net/socket.c |
1544 |
+++ linux-2.6.21/net/socket.c |
+++ linux-2.6.21.7/net/socket.c |
1545 |
@@ -93,6 +93,11 @@ |
@@ -93,6 +93,11 @@ |
1546 |
#include <net/sock.h> |
#include <net/sock.h> |
1547 |
#include <linux/netfilter.h> |
#include <linux/netfilter.h> |
1632 |
|
|
1633 |
err = sock->ops->connect(sock, (struct sockaddr *)address, addrlen, |
err = sock->ops->connect(sock, (struct sockaddr *)address, addrlen, |
1634 |
sock->file->f_flags); |
sock->file->f_flags); |
1635 |
--- linux-2.6.21.orig/net/unix/af_unix.c |
--- linux-2.6.21.7.orig/net/unix/af_unix.c |
1636 |
+++ linux-2.6.21/net/unix/af_unix.c |
+++ linux-2.6.21.7/net/unix/af_unix.c |
1637 |
@@ -116,6 +116,9 @@ |
@@ -116,6 +116,9 @@ |
1638 |
#include <linux/mount.h> |
#include <linux/mount.h> |
1639 |
#include <net/checksum.h> |
#include <net/checksum.h> |