Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/caitsith-patch/patches/ccs-patch-3.10-centos-7.diff

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 218 by kumaneko, Sun Oct 16 09:00:36 2016 UTC revision 220 by kumaneko, Sat Oct 29 13:44:43 2016 UTC
# Line 1  Line 1 
1  This is TOMOYO Linux patch for CentOS 7.  This is TOMOYO Linux patch for CentOS 7.
2    
3  Source code for this patch is http://vault.centos.org/centos/7/updates/Source/SPackages/kernel-3.10.0-327.26.2.el7.src.rpm  Source code for this patch is http://vault.centos.org/centos/7/updates/Source/SPackages/kernel-3.10.0-327.36.3.el7.src.rpm
4  ---  ---
5   fs/exec.c                 |    2   fs/exec.c                 |    2
6   fs/open.c                 |    2   fs/open.c                 |    2
# Line 28  Source code for this patch is http://vau Line 28  Source code for this patch is http://vau
28   security/security.c       |  111 +++++++++++++++++++++++++++++++++++++++++-----   security/security.c       |  111 +++++++++++++++++++++++++++++++++++++++++-----
29   24 files changed, 248 insertions(+), 37 deletions(-)   24 files changed, 248 insertions(+), 37 deletions(-)
30    
31  --- linux-3.10.0-327.36.2.el7.orig/fs/exec.c  --- linux-3.10.0-327.36.3.el7.orig/fs/exec.c
32  +++ linux-3.10.0-327.36.2.el7/fs/exec.c  +++ linux-3.10.0-327.36.3.el7/fs/exec.c
33  @@ -1573,7 +1573,7 @@ static int do_execve_common(struct filen  @@ -1573,7 +1573,7 @@ static int do_execve_common(struct filen
34          if (retval < 0)          if (retval < 0)
35                  goto out;                  goto out;
# Line 39  Source code for this patch is http://vau Line 39  Source code for this patch is http://vau
39          if (retval < 0)          if (retval < 0)
40                  goto out;                  goto out;
41    
42  --- linux-3.10.0-327.36.2.el7.orig/fs/open.c  --- linux-3.10.0-327.36.3.el7.orig/fs/open.c
43  +++ linux-3.10.0-327.36.2.el7/fs/open.c  +++ linux-3.10.0-327.36.3.el7/fs/open.c
44  @@ -1115,6 +1115,8 @@ EXPORT_SYMBOL(sys_close);  @@ -1115,6 +1115,8 @@ EXPORT_SYMBOL(sys_close);
45    */    */
46   SYSCALL_DEFINE0(vhangup)   SYSCALL_DEFINE0(vhangup)
# Line 50  Source code for this patch is http://vau Line 50  Source code for this patch is http://vau
50          if (capable(CAP_SYS_TTY_CONFIG)) {          if (capable(CAP_SYS_TTY_CONFIG)) {
51                  tty_vhangup_self();                  tty_vhangup_self();
52                  return 0;                  return 0;
53  --- linux-3.10.0-327.36.2.el7.orig/fs/proc/version.c  --- linux-3.10.0-327.36.3.el7.orig/fs/proc/version.c
54  +++ linux-3.10.0-327.36.2.el7/fs/proc/version.c  +++ linux-3.10.0-327.36.3.el7/fs/proc/version.c
55  @@ -32,3 +32,10 @@ static int __init proc_version_init(void  @@ -32,3 +32,10 @@ static int __init proc_version_init(void
56          return 0;          return 0;
57   }   }
# Line 59  Source code for this patch is http://vau Line 59  Source code for this patch is http://vau
59  +  +
60  +static int __init ccs_show_version(void)  +static int __init ccs_show_version(void)
61  +{  +{
62  +       printk(KERN_INFO "Hook version: 3.10.0-327.26.2.el7 2016/10/16\n");  +       printk(KERN_INFO "Hook version: 3.10.0-327.36.3.el7 2016/10/26\n");
63  +       return 0;  +       return 0;
64  +}  +}
65  +module_init(ccs_show_version);  +module_init(ccs_show_version);
66  --- linux-3.10.0-327.36.2.el7.orig/include/linux/init_task.h  --- linux-3.10.0-327.36.3.el7.orig/include/linux/init_task.h
67  +++ linux-3.10.0-327.36.2.el7/include/linux/init_task.h  +++ linux-3.10.0-327.36.3.el7/include/linux/init_task.h
68  @@ -155,6 +155,14 @@ extern struct task_group root_task_group  @@ -155,6 +155,14 @@ extern struct task_group root_task_group
69    
70   #define INIT_TASK_COMM "swapper"   #define INIT_TASK_COMM "swapper"
# Line 88  Source code for this patch is http://vau Line 88  Source code for this patch is http://vau
88   }   }
89    
90    
91  --- linux-3.10.0-327.36.2.el7.orig/include/linux/sched.h  --- linux-3.10.0-327.36.3.el7.orig/include/linux/sched.h
92  +++ linux-3.10.0-327.36.2.el7/include/linux/sched.h  +++ linux-3.10.0-327.36.3.el7/include/linux/sched.h
93  @@ -4,6 +4,8 @@  @@ -4,6 +4,8 @@
94   #include <uapi/linux/sched.h>   #include <uapi/linux/sched.h>
95   #include <linux/rh_kabi.h>   #include <linux/rh_kabi.h>
# Line 110  Source code for this patch is http://vau Line 110  Source code for this patch is http://vau
110   };   };
111    
112   /* Future-safe accessor for struct task_struct's cpus_allowed. */   /* Future-safe accessor for struct task_struct's cpus_allowed. */
113  --- linux-3.10.0-327.36.2.el7.orig/include/linux/security.h  --- linux-3.10.0-327.36.3.el7.orig/include/linux/security.h
114  +++ linux-3.10.0-327.36.2.el7/include/linux/security.h  +++ linux-3.10.0-327.36.3.el7/include/linux/security.h
115  @@ -53,6 +53,7 @@ struct msg_queue;  @@ -53,6 +53,7 @@ struct msg_queue;
116   struct xattr;   struct xattr;
117   struct xfrm_sec_ctx;   struct xfrm_sec_ctx;
# Line 323  Source code for this patch is http://vau Line 323  Source code for this patch is http://vau
323   }   }
324   #endif /* CONFIG_SECURITY_PATH */   #endif /* CONFIG_SECURITY_PATH */
325    
326  --- linux-3.10.0-327.36.2.el7.orig/include/net/ip.h  --- linux-3.10.0-327.36.3.el7.orig/include/net/ip.h
327  +++ linux-3.10.0-327.36.2.el7/include/net/ip.h  +++ linux-3.10.0-327.36.3.el7/include/net/ip.h
328  @@ -227,6 +227,8 @@ void inet_get_local_port_range(struct ne  @@ -227,6 +227,8 @@ void inet_get_local_port_range(struct ne
329   extern unsigned long *sysctl_local_reserved_ports;   extern unsigned long *sysctl_local_reserved_ports;
330   static inline int inet_is_reserved_local_port(int port)   static inline int inet_is_reserved_local_port(int port)
# Line 334  Source code for this patch is http://vau Line 334  Source code for this patch is http://vau
334          return test_bit(port, sysctl_local_reserved_ports);          return test_bit(port, sysctl_local_reserved_ports);
335   }   }
336    
337  --- linux-3.10.0-327.36.2.el7.orig/kernel/fork.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/fork.c
338  +++ linux-3.10.0-327.36.2.el7/kernel/fork.c  +++ linux-3.10.0-327.36.3.el7/kernel/fork.c
339  @@ -242,6 +242,7 @@ void __put_task_struct(struct task_struc  @@ -242,6 +242,7 @@ void __put_task_struct(struct task_struc
340          delayacct_tsk_free(tsk);          delayacct_tsk_free(tsk);
341          put_signal_struct(tsk->signal);          put_signal_struct(tsk->signal);
# Line 362  Source code for this patch is http://vau Line 362  Source code for this patch is http://vau
362   bad_fork_cleanup_perf:   bad_fork_cleanup_perf:
363          perf_event_free_task(p);          perf_event_free_task(p);
364   bad_fork_cleanup_policy:   bad_fork_cleanup_policy:
365  --- linux-3.10.0-327.36.2.el7.orig/kernel/kexec.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/kexec.c
366  +++ linux-3.10.0-327.36.2.el7/kernel/kexec.c  +++ linux-3.10.0-327.36.3.el7/kernel/kexec.c
367  @@ -1250,6 +1250,8 @@ SYSCALL_DEFINE4(kexec_load, unsigned lon  @@ -1250,6 +1250,8 @@ SYSCALL_DEFINE4(kexec_load, unsigned lon
368          /* We only trust the superuser with rebooting the system. */          /* We only trust the superuser with rebooting the system. */
369          if (!capable(CAP_SYS_BOOT) || kexec_load_disabled)          if (!capable(CAP_SYS_BOOT) || kexec_load_disabled)
# Line 373  Source code for this patch is http://vau Line 373  Source code for this patch is http://vau
373    
374          if (get_securelevel() > 0)          if (get_securelevel() > 0)
375                  return -EPERM;                  return -EPERM;
376  --- linux-3.10.0-327.36.2.el7.orig/kernel/module.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/module.c
377  +++ linux-3.10.0-327.36.2.el7/kernel/module.c  +++ linux-3.10.0-327.36.3.el7/kernel/module.c
378  @@ -62,6 +62,7 @@  @@ -62,6 +62,7 @@
379   #include <linux/bsearch.h>   #include <linux/bsearch.h>
380   #include <uapi/linux/module.h>   #include <uapi/linux/module.h>
# Line 401  Source code for this patch is http://vau Line 401  Source code for this patch is http://vau
401    
402          return 0;          return 0;
403   }   }
404  --- linux-3.10.0-327.36.2.el7.orig/kernel/ptrace.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/ptrace.c
405  +++ linux-3.10.0-327.36.2.el7/kernel/ptrace.c  +++ linux-3.10.0-327.36.3.el7/kernel/ptrace.c
406  @@ -1045,6 +1045,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l  @@ -1045,6 +1045,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l
407   {   {
408          struct task_struct *child;          struct task_struct *child;
# Line 427  Source code for this patch is http://vau Line 427  Source code for this patch is http://vau
427    
428          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
429                  ret = ptrace_traceme();                  ret = ptrace_traceme();
430  --- linux-3.10.0-327.36.2.el7.orig/kernel/sched/core.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/sched/core.c
431  +++ linux-3.10.0-327.36.2.el7/kernel/sched/core.c  +++ linux-3.10.0-327.36.3.el7/kernel/sched/core.c
432  @@ -3979,6 +3979,8 @@ int can_nice(const struct task_struct *p  @@ -3979,6 +3979,8 @@ int can_nice(const struct task_struct *p
433   SYSCALL_DEFINE1(nice, int, increment)   SYSCALL_DEFINE1(nice, int, increment)
434   {   {
# Line 438  Source code for this patch is http://vau Line 438  Source code for this patch is http://vau
438    
439          /*          /*
440           * Setpriority might change our priority at the same moment.           * Setpriority might change our priority at the same moment.
441  --- linux-3.10.0-327.36.2.el7.orig/kernel/signal.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/signal.c
442  +++ linux-3.10.0-327.36.2.el7/kernel/signal.c  +++ linux-3.10.0-327.36.3.el7/kernel/signal.c
443  @@ -2910,6 +2910,8 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const s  @@ -2910,6 +2910,8 @@ SYSCALL_DEFINE4(rt_sigtimedwait, const s
444   SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)   SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
445   {   {
# Line 485  Source code for this patch is http://vau Line 485  Source code for this patch is http://vau
485    
486          return do_send_specific(tgid, pid, sig, info);          return do_send_specific(tgid, pid, sig, info);
487   }   }
488  --- linux-3.10.0-327.36.2.el7.orig/kernel/sys.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/sys.c
489  +++ linux-3.10.0-327.36.2.el7/kernel/sys.c  +++ linux-3.10.0-327.36.3.el7/kernel/sys.c
490  @@ -186,6 +186,10 @@ SYSCALL_DEFINE3(setpriority, int, which,  @@ -186,6 +186,10 @@ SYSCALL_DEFINE3(setpriority, int, which,
491    
492          if (which > PRIO_USER || which < PRIO_PROCESS)          if (which > PRIO_USER || which < PRIO_PROCESS)
# Line 525  Source code for this patch is http://vau Line 525  Source code for this patch is http://vau
525    
526          down_write(&uts_sem);          down_write(&uts_sem);
527          errno = -EFAULT;          errno = -EFAULT;
528  --- linux-3.10.0-327.36.2.el7.orig/kernel/time/ntp.c  --- linux-3.10.0-327.36.3.el7.orig/kernel/time/ntp.c
529  +++ linux-3.10.0-327.36.2.el7/kernel/time/ntp.c  +++ linux-3.10.0-327.36.3.el7/kernel/time/ntp.c
530  @@ -16,6 +16,7 @@  @@ -16,6 +16,7 @@
531   #include <linux/mm.h>   #include <linux/mm.h>
532   #include <linux/module.h>   #include <linux/module.h>
# Line 560  Source code for this patch is http://vau Line 560  Source code for this patch is http://vau
560    
561          return 0;          return 0;
562   }   }
563  --- linux-3.10.0-327.36.2.el7.orig/net/ipv4/raw.c  --- linux-3.10.0-327.36.3.el7.orig/net/ipv4/raw.c
564  +++ linux-3.10.0-327.36.2.el7/net/ipv4/raw.c  +++ linux-3.10.0-327.36.3.el7/net/ipv4/raw.c
565  @@ -702,6 +702,10 @@ static int raw_recvmsg(struct kiocb *ioc  @@ -702,6 +702,10 @@ static int raw_recvmsg(struct kiocb *ioc
566          skb = skb_recv_datagram(sk, flags, noblock, &err);          skb = skb_recv_datagram(sk, flags, noblock, &err);
567          if (!skb)          if (!skb)
# Line 573  Source code for this patch is http://vau Line 573  Source code for this patch is http://vau
573    
574          copied = skb->len;          copied = skb->len;
575          if (len < copied) {          if (len < copied) {
576  --- linux-3.10.0-327.36.2.el7.orig/net/ipv4/udp.c  --- linux-3.10.0-327.36.3.el7.orig/net/ipv4/udp.c
577  +++ linux-3.10.0-327.36.2.el7/net/ipv4/udp.c  +++ linux-3.10.0-327.36.3.el7/net/ipv4/udp.c
578  @@ -1272,6 +1272,10 @@ try_again:  @@ -1272,6 +1272,10 @@ try_again:
579                                    &peeked, &off, &err);                                    &peeked, &off, &err);
580          if (!skb)          if (!skb)
# Line 586  Source code for this patch is http://vau Line 586  Source code for this patch is http://vau
586    
587          ulen = skb->len - sizeof(struct udphdr);          ulen = skb->len - sizeof(struct udphdr);
588          copied = len;          copied = len;
589  --- linux-3.10.0-327.36.2.el7.orig/net/ipv6/raw.c  --- linux-3.10.0-327.36.3.el7.orig/net/ipv6/raw.c
590  +++ linux-3.10.0-327.36.2.el7/net/ipv6/raw.c  +++ linux-3.10.0-327.36.3.el7/net/ipv6/raw.c
591  @@ -468,6 +468,10 @@ static int rawv6_recvmsg(struct kiocb *i  @@ -468,6 +468,10 @@ static int rawv6_recvmsg(struct kiocb *i
592          skb = skb_recv_datagram(sk, flags, noblock, &err);          skb = skb_recv_datagram(sk, flags, noblock, &err);
593          if (!skb)          if (!skb)
# Line 599  Source code for this patch is http://vau Line 599  Source code for this patch is http://vau
599    
600          copied = skb->len;          copied = skb->len;
601          if (copied > len) {          if (copied > len) {
602  --- linux-3.10.0-327.36.2.el7.orig/net/ipv6/udp.c  --- linux-3.10.0-327.36.3.el7.orig/net/ipv6/udp.c
603  +++ linux-3.10.0-327.36.2.el7/net/ipv6/udp.c  +++ linux-3.10.0-327.36.3.el7/net/ipv6/udp.c
604  @@ -404,6 +404,10 @@ try_again:  @@ -404,6 +404,10 @@ try_again:
605                                    &peeked, &off, &err);                                    &peeked, &off, &err);
606          if (!skb)          if (!skb)
# Line 612  Source code for this patch is http://vau Line 612  Source code for this patch is http://vau
612    
613          ulen = skb->len - sizeof(struct udphdr);          ulen = skb->len - sizeof(struct udphdr);
614          copied = len;          copied = len;
615  --- linux-3.10.0-327.36.2.el7.orig/net/socket.c  --- linux-3.10.0-327.36.3.el7.orig/net/socket.c
616  +++ linux-3.10.0-327.36.2.el7/net/socket.c  +++ linux-3.10.0-327.36.3.el7/net/socket.c
617  @@ -1608,6 +1608,10 @@ SYSCALL_DEFINE4(accept4, int, fd, struct  @@ -1608,6 +1608,10 @@ SYSCALL_DEFINE4(accept4, int, fd, struct
618          if (err < 0)          if (err < 0)
619                  goto out_fd;                  goto out_fd;
# Line 625  Source code for this patch is http://vau Line 625  Source code for this patch is http://vau
625          if (upeer_sockaddr) {          if (upeer_sockaddr) {
626                  if (newsock->ops->getname(newsock, (struct sockaddr *)&address,                  if (newsock->ops->getname(newsock, (struct sockaddr *)&address,
627                                            &len, 2) < 0) {                                            &len, 2) < 0) {
628  --- linux-3.10.0-327.36.2.el7.orig/net/unix/af_unix.c  --- linux-3.10.0-327.36.3.el7.orig/net/unix/af_unix.c
629  +++ linux-3.10.0-327.36.2.el7/net/unix/af_unix.c  +++ linux-3.10.0-327.36.3.el7/net/unix/af_unix.c
630  @@ -2065,6 +2065,10 @@ static int unix_dgram_recvmsg(struct kio  @@ -2065,6 +2065,10 @@ static int unix_dgram_recvmsg(struct kio
631          wake_up_interruptible_sync_poll(&u->peer_wait,          wake_up_interruptible_sync_poll(&u->peer_wait,
632                                          POLLOUT | POLLWRNORM | POLLWRBAND);                                          POLLOUT | POLLWRNORM | POLLWRBAND);
# Line 638  Source code for this patch is http://vau Line 638  Source code for this patch is http://vau
638          if (msg->msg_name)          if (msg->msg_name)
639                  unix_copy_addr(msg, skb->sk);                  unix_copy_addr(msg, skb->sk);
640    
641  --- linux-3.10.0-327.36.2.el7.orig/security/Kconfig  --- linux-3.10.0-327.36.3.el7.orig/security/Kconfig
642  +++ linux-3.10.0-327.36.2.el7/security/Kconfig  +++ linux-3.10.0-327.36.3.el7/security/Kconfig
643  @@ -175,5 +175,7 @@ config DEFAULT_SECURITY  @@ -175,5 +175,7 @@ config DEFAULT_SECURITY
644          default "yama" if DEFAULT_SECURITY_YAMA          default "yama" if DEFAULT_SECURITY_YAMA
645          default "" if DEFAULT_SECURITY_DAC          default "" if DEFAULT_SECURITY_DAC
# Line 648  Source code for this patch is http://vau Line 648  Source code for this patch is http://vau
648  +  +
649   endmenu   endmenu
650    
651  --- linux-3.10.0-327.36.2.el7.orig/security/Makefile  --- linux-3.10.0-327.36.3.el7.orig/security/Makefile
652  +++ linux-3.10.0-327.36.2.el7/security/Makefile  +++ linux-3.10.0-327.36.3.el7/security/Makefile
653  @@ -29,3 +29,6 @@ obj-$(CONFIG_CGROUP_DEVICE)           += device_c  @@ -29,3 +29,6 @@ obj-$(CONFIG_CGROUP_DEVICE)           += device_c
654   # Object integrity file lists   # Object integrity file lists
655   subdir-$(CONFIG_INTEGRITY)             += integrity   subdir-$(CONFIG_INTEGRITY)             += integrity
# Line 657  Source code for this patch is http://vau Line 657  Source code for this patch is http://vau
657  +  +
658  +subdir-$(CONFIG_CCSECURITY)            += ccsecurity  +subdir-$(CONFIG_CCSECURITY)            += ccsecurity
659  +obj-$(CONFIG_CCSECURITY)               += ccsecurity/built-in.o  +obj-$(CONFIG_CCSECURITY)               += ccsecurity/built-in.o
660  --- linux-3.10.0-327.36.2.el7.orig/security/security.c  --- linux-3.10.0-327.36.3.el7.orig/security/security.c
661  +++ linux-3.10.0-327.36.2.el7/security/security.c  +++ linux-3.10.0-327.36.3.el7/security/security.c
662  @@ -203,7 +203,10 @@ int security_syslog(int type)  @@ -203,7 +203,10 @@ int security_syslog(int type)
663    
664   int security_settime(const struct timespec *ts, const struct timezone *tz)   int security_settime(const struct timespec *ts, const struct timezone *tz)

Legend:
Removed from v.218  
changed lines
  Added in v.220

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26