Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/caitsith-patch/patches/ccs-patch-4.18.diff

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

revision 266 by kumaneko, Sat Jul 14 05:40:15 2018 UTC revision 267 by kumaneko, Mon Aug 27 10:15:55 2018 UTC
# Line 1  Line 1 
1  This is TOMOYO Linux patch for kernel 4.18-rc4.  This is TOMOYO Linux patch for kernel 4.18.5.
2    
3  Source code for this patch is https://git.kernel.org/torvalds/t/linux-4.18-rc4.tar.gz  Source code for this patch is https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.18.5.tar.xz
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 https://gi Line 28  Source code for this patch is https://gi
28   security/security.c       |    9 +++++-   security/security.c       |    9 +++++-
29   24 files changed, 148 insertions(+), 29 deletions(-)   24 files changed, 148 insertions(+), 29 deletions(-)
30    
31  --- linux-4.18-rc4.orig/fs/exec.c  --- linux-4.18.5.orig/fs/exec.c
32  +++ linux-4.18-rc4/fs/exec.c  +++ linux-4.18.5/fs/exec.c
33  @@ -1692,7 +1692,7 @@ static int exec_binprm(struct linux_binp  @@ -1691,7 +1691,7 @@ static int exec_binprm(struct linux_binp
34          old_vpid = task_pid_nr_ns(current, task_active_pid_ns(current->parent));          old_vpid = task_pid_nr_ns(current, task_active_pid_ns(current->parent));
35          rcu_read_unlock();          rcu_read_unlock();
36    
# Line 39  Source code for this patch is https://gi Line 39  Source code for this patch is https://gi
39          if (ret >= 0) {          if (ret >= 0) {
40                  audit_bprm(bprm);                  audit_bprm(bprm);
41                  trace_sched_process_exec(current, old_pid, bprm);                  trace_sched_process_exec(current, old_pid, bprm);
42  --- linux-4.18-rc4.orig/fs/open.c  --- linux-4.18.5.orig/fs/open.c
43  +++ linux-4.18-rc4/fs/open.c  +++ linux-4.18.5/fs/open.c
44  @@ -1212,6 +1212,8 @@ SYSCALL_DEFINE1(close, unsigned int, fd)  @@ -1212,6 +1212,8 @@ SYSCALL_DEFINE1(close, unsigned int, fd)
45    */    */
46   SYSCALL_DEFINE0(vhangup)   SYSCALL_DEFINE0(vhangup)
# Line 50  Source code for this patch is https://gi Line 50  Source code for this patch is https://gi
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-4.18-rc4.orig/fs/proc/version.c  --- linux-4.18.5.orig/fs/proc/version.c
54  +++ linux-4.18-rc4/fs/proc/version.c  +++ linux-4.18.5/fs/proc/version.c
55  @@ -21,3 +21,10 @@ static int __init proc_version_init(void  @@ -21,3 +21,10 @@ static int __init proc_version_init(void
56          return 0;          return 0;
57   }   }
# Line 59  Source code for this patch is https://gi Line 59  Source code for this patch is https://gi
59  +  +
60  +static int __init ccs_show_version(void)  +static int __init ccs_show_version(void)
61  +{  +{
62  +       printk(KERN_INFO "Hook version: 4.18-rc4 2018/07/12\n");  +       printk(KERN_INFO "Hook version: 4.18.5 2018/08/25\n");
63  +       return 0;  +       return 0;
64  +}  +}
65  +fs_initcall(ccs_show_version);  +fs_initcall(ccs_show_version);
66  --- linux-4.18-rc4.orig/include/linux/sched.h  --- linux-4.18.5.orig/include/linux/sched.h
67  +++ linux-4.18-rc4/include/linux/sched.h  +++ linux-4.18.5/include/linux/sched.h
68  @@ -34,6 +34,7 @@ struct audit_context;  @@ -34,6 +34,7 @@ struct audit_context;
69   struct backing_dev_info;   struct backing_dev_info;
70   struct bio_list;   struct bio_list;
# Line 84  Source code for this patch is https://gi Line 84  Source code for this patch is https://gi
84    
85          /*          /*
86           * New fields for task_struct should be added above here, so that           * New fields for task_struct should be added above here, so that
87  --- linux-4.18-rc4.orig/include/linux/security.h  --- linux-4.18.5.orig/include/linux/security.h
88  +++ linux-4.18-rc4/include/linux/security.h  +++ linux-4.18.5/include/linux/security.h
89  @@ -53,6 +53,7 @@ struct msg_msg;  @@ -53,6 +53,7 @@ struct msg_msg;
90   struct xattr;   struct xattr;
91   struct xfrm_sec_ctx;   struct xfrm_sec_ctx;
# Line 306  Source code for this patch is https://gi Line 306  Source code for this patch is https://gi
306   }   }
307   #endif /* CONFIG_SECURITY_PATH */   #endif /* CONFIG_SECURITY_PATH */
308    
309  --- linux-4.18-rc4.orig/include/net/ip.h  --- linux-4.18.5.orig/include/net/ip.h
310  +++ linux-4.18-rc4/include/net/ip.h  +++ linux-4.18.5/include/net/ip.h
311  @@ -278,6 +278,8 @@ void inet_get_local_port_range(struct ne  @@ -278,6 +278,8 @@ void inet_get_local_port_range(struct ne
312   #ifdef CONFIG_SYSCTL   #ifdef CONFIG_SYSCTL
313   static inline int inet_is_local_reserved_port(struct net *net, int port)   static inline int inet_is_local_reserved_port(struct net *net, int port)
# Line 326  Source code for this patch is https://gi Line 326  Source code for this patch is https://gi
326          return 0;          return 0;
327   }   }
328    
329  --- linux-4.18-rc4.orig/init/init_task.c  --- linux-4.18.5.orig/init/init_task.c
330  +++ linux-4.18-rc4/init/init_task.c  +++ linux-4.18.5/init/init_task.c
331  @@ -176,6 +176,10 @@ struct task_struct init_task  @@ -176,6 +176,10 @@ struct task_struct init_task
332   #ifdef CONFIG_SECURITY   #ifdef CONFIG_SECURITY
333          .security       = NULL,          .security       = NULL,
# Line 339  Source code for this patch is https://gi Line 339  Source code for this patch is https://gi
339   };   };
340   EXPORT_SYMBOL(init_task);   EXPORT_SYMBOL(init_task);
341    
342  --- linux-4.18-rc4.orig/kernel/kexec.c  --- linux-4.18.5.orig/kernel/kexec.c
343  +++ linux-4.18-rc4/kernel/kexec.c  +++ linux-4.18.5/kernel/kexec.c
344  @@ -17,7 +17,7 @@  @@ -17,7 +17,7 @@
345   #include <linux/syscalls.h>   #include <linux/syscalls.h>
346   #include <linux/vmalloc.h>   #include <linux/vmalloc.h>
# Line 359  Source code for this patch is https://gi Line 359  Source code for this patch is https://gi
359    
360          /*          /*
361           * Verify we have a legal set of flags           * Verify we have a legal set of flags
362  --- linux-4.18-rc4.orig/kernel/module.c  --- linux-4.18.5.orig/kernel/module.c
363  +++ linux-4.18-rc4/kernel/module.c  +++ linux-4.18.5/kernel/module.c
364  @@ -66,6 +66,7 @@  @@ -66,6 +66,7 @@
365   #include <linux/audit.h>   #include <linux/audit.h>
366   #include <uapi/linux/module.h>   #include <uapi/linux/module.h>
# Line 387  Source code for this patch is https://gi Line 387  Source code for this patch is https://gi
387    
388          return 0;          return 0;
389   }   }
390  --- linux-4.18-rc4.orig/kernel/ptrace.c  --- linux-4.18.5.orig/kernel/ptrace.c
391  +++ linux-4.18-rc4/kernel/ptrace.c  +++ linux-4.18.5/kernel/ptrace.c
392  @@ -1112,6 +1112,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l  @@ -1112,6 +1112,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l
393   {   {
394          struct task_struct *child;          struct task_struct *child;
# Line 413  Source code for this patch is https://gi Line 413  Source code for this patch is https://gi
413    
414          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
415                  ret = ptrace_traceme();                  ret = ptrace_traceme();
416  --- linux-4.18-rc4.orig/kernel/reboot.c  --- linux-4.18.5.orig/kernel/reboot.c
417  +++ linux-4.18-rc4/kernel/reboot.c  +++ linux-4.18.5/kernel/reboot.c
418  @@ -16,6 +16,7 @@  @@ -16,6 +16,7 @@
419   #include <linux/syscalls.h>   #include <linux/syscalls.h>
420   #include <linux/syscore_ops.h>   #include <linux/syscore_ops.h>
# Line 432  Source code for this patch is https://gi Line 432  Source code for this patch is https://gi
432    
433          /*          /*
434           * If pid namespaces are enabled and the current task is in a child           * If pid namespaces are enabled and the current task is in a child
435  --- linux-4.18-rc4.orig/kernel/sched/core.c  --- linux-4.18.5.orig/kernel/sched/core.c
436  +++ linux-4.18-rc4/kernel/sched/core.c  +++ linux-4.18.5/kernel/sched/core.c
437  @@ -3972,6 +3972,8 @@ int can_nice(const struct task_struct *p  @@ -3972,6 +3972,8 @@ int can_nice(const struct task_struct *p
438   SYSCALL_DEFINE1(nice, int, increment)   SYSCALL_DEFINE1(nice, int, increment)
439   {   {
# Line 443  Source code for this patch is https://gi Line 443  Source code for this patch is https://gi
443    
444          /*          /*
445           * Setpriority might change our priority at the same moment.           * Setpriority might change our priority at the same moment.
446  --- linux-4.18-rc4.orig/kernel/signal.c  --- linux-4.18.5.orig/kernel/signal.c
447  +++ linux-4.18-rc4/kernel/signal.c  +++ linux-4.18.5/kernel/signal.c
448  @@ -3167,6 +3167,8 @@ COMPAT_SYSCALL_DEFINE4(rt_sigtimedwait,  @@ -3167,6 +3167,8 @@ COMPAT_SYSCALL_DEFINE4(rt_sigtimedwait,
449   SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)   SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
450   {   {
# Line 490  Source code for this patch is https://gi Line 490  Source code for this patch is https://gi
490    
491          return do_send_specific(tgid, pid, sig, info);          return do_send_specific(tgid, pid, sig, info);
492   }   }
493  --- linux-4.18-rc4.orig/kernel/sys.c  --- linux-4.18.5.orig/kernel/sys.c
494  +++ linux-4.18-rc4/kernel/sys.c  +++ linux-4.18.5/kernel/sys.c
495  @@ -204,6 +204,10 @@ SYSCALL_DEFINE3(setpriority, int, which,  @@ -204,6 +204,10 @@ SYSCALL_DEFINE3(setpriority, int, which,
496    
497          if (which > PRIO_USER || which < PRIO_PROCESS)          if (which > PRIO_USER || which < PRIO_PROCESS)
# Line 521  Source code for this patch is https://gi Line 521  Source code for this patch is https://gi
521    
522          down_write(&uts_sem);          down_write(&uts_sem);
523          errno = -EFAULT;          errno = -EFAULT;
524  --- linux-4.18-rc4.orig/kernel/time/timekeeping.c  --- linux-4.18.5.orig/kernel/time/timekeeping.c
525  +++ linux-4.18-rc4/kernel/time/timekeeping.c  +++ linux-4.18.5/kernel/time/timekeeping.c
526  @@ -25,6 +25,7 @@  @@ -25,6 +25,7 @@
527   #include <linux/stop_machine.h>   #include <linux/stop_machine.h>
528   #include <linux/pvclock_gtod.h>   #include <linux/pvclock_gtod.h>
# Line 556  Source code for this patch is https://gi Line 556  Source code for this patch is https://gi
556    
557                  /*                  /*
558                   * Validate if a timespec/timeval used to inject a time                   * Validate if a timespec/timeval used to inject a time
559  --- linux-4.18-rc4.orig/net/ipv4/raw.c  --- linux-4.18.5.orig/net/ipv4/raw.c
560  +++ linux-4.18-rc4/net/ipv4/raw.c  +++ linux-4.18.5/net/ipv4/raw.c
561  @@ -779,6 +779,10 @@ static int raw_recvmsg(struct sock *sk,  @@ -779,6 +779,10 @@ static int raw_recvmsg(struct sock *sk,
562          skb = skb_recv_datagram(sk, flags, noblock, &err);          skb = skb_recv_datagram(sk, flags, noblock, &err);
563          if (!skb)          if (!skb)
# Line 569  Source code for this patch is https://gi Line 569  Source code for this patch is https://gi
569    
570          copied = skb->len;          copied = skb->len;
571          if (len < copied) {          if (len < copied) {
572  --- linux-4.18-rc4.orig/net/ipv4/udp.c  --- linux-4.18.5.orig/net/ipv4/udp.c
573  +++ linux-4.18-rc4/net/ipv4/udp.c  +++ linux-4.18.5/net/ipv4/udp.c
574  @@ -1659,6 +1659,8 @@ try_again:  @@ -1659,6 +1659,8 @@ try_again:
575          skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err);          skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err);
576          if (!skb)          if (!skb)
# Line 580  Source code for this patch is https://gi Line 580  Source code for this patch is https://gi
580    
581          ulen = udp_skb_len(skb);          ulen = udp_skb_len(skb);
582          copied = len;          copied = len;
583  --- linux-4.18-rc4.orig/net/ipv6/raw.c  --- linux-4.18.5.orig/net/ipv6/raw.c
584  +++ linux-4.18-rc4/net/ipv6/raw.c  +++ linux-4.18.5/net/ipv6/raw.c
585  @@ -483,6 +483,10 @@ static int rawv6_recvmsg(struct sock *sk  @@ -483,6 +483,10 @@ static int rawv6_recvmsg(struct sock *sk
586          skb = skb_recv_datagram(sk, flags, noblock, &err);          skb = skb_recv_datagram(sk, flags, noblock, &err);
587          if (!skb)          if (!skb)
# Line 593  Source code for this patch is https://gi Line 593  Source code for this patch is https://gi
593    
594          copied = skb->len;          copied = skb->len;
595          if (copied > len) {          if (copied > len) {
596  --- linux-4.18-rc4.orig/net/ipv6/udp.c  --- linux-4.18.5.orig/net/ipv6/udp.c
597  +++ linux-4.18-rc4/net/ipv6/udp.c  +++ linux-4.18.5/net/ipv6/udp.c
598  @@ -339,6 +339,8 @@ try_again:  @@ -339,6 +339,8 @@ try_again:
599          skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err);          skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err);
600          if (!skb)          if (!skb)
# Line 604  Source code for this patch is https://gi Line 604  Source code for this patch is https://gi
604    
605          ulen = udp6_skb_len(skb);          ulen = udp6_skb_len(skb);
606          copied = len;          copied = len;
607  --- linux-4.18-rc4.orig/net/socket.c  --- linux-4.18.5.orig/net/socket.c
608  +++ linux-4.18-rc4/net/socket.c  +++ linux-4.18.5/net/socket.c
609  @@ -1600,6 +1600,10 @@ int __sys_accept4(int fd, struct sockadd  @@ -1601,6 +1601,10 @@ int __sys_accept4(int fd, struct sockadd
610          if (err < 0)          if (err < 0)
611                  goto out_fd;                  goto out_fd;
612    
# Line 617  Source code for this patch is https://gi Line 617  Source code for this patch is https://gi
617          if (upeer_sockaddr) {          if (upeer_sockaddr) {
618                  len = newsock->ops->getname(newsock,                  len = newsock->ops->getname(newsock,
619                                          (struct sockaddr *)&address, 2);                                          (struct sockaddr *)&address, 2);
620  --- linux-4.18-rc4.orig/net/unix/af_unix.c  --- linux-4.18.5.orig/net/unix/af_unix.c
621  +++ linux-4.18-rc4/net/unix/af_unix.c  +++ linux-4.18.5/net/unix/af_unix.c
622  @@ -2122,6 +2122,10 @@ static int unix_dgram_recvmsg(struct soc  @@ -2122,6 +2122,10 @@ static int unix_dgram_recvmsg(struct soc
623                                                  EPOLLOUT | EPOLLWRNORM |                                                  EPOLLOUT | EPOLLWRNORM |
624                                                  EPOLLWRBAND);                                                  EPOLLWRBAND);
# Line 638  Source code for this patch is https://gi Line 638  Source code for this patch is https://gi
638          mutex_unlock(&u->iolock);          mutex_unlock(&u->iolock);
639   out:   out:
640          return err;          return err;
641  --- linux-4.18-rc4.orig/security/Kconfig  --- linux-4.18.5.orig/security/Kconfig
642  +++ linux-4.18-rc4/security/Kconfig  +++ linux-4.18.5/security/Kconfig
643  @@ -277,5 +277,7 @@ config DEFAULT_SECURITY  @@ -277,5 +277,7 @@ config DEFAULT_SECURITY
644          default "apparmor" if DEFAULT_SECURITY_APPARMOR          default "apparmor" if DEFAULT_SECURITY_APPARMOR
645          default "" if DEFAULT_SECURITY_DAC          default "" if DEFAULT_SECURITY_DAC
# Line 648  Source code for this patch is https://gi Line 648  Source code for this patch is https://gi
648  +  +
649   endmenu   endmenu
650    
651  --- linux-4.18-rc4.orig/security/Makefile  --- linux-4.18.5.orig/security/Makefile
652  +++ linux-4.18-rc4/security/Makefile  +++ linux-4.18.5/security/Makefile
653  @@ -30,3 +30,6 @@ obj-$(CONFIG_CGROUP_DEVICE)           += device_c  @@ -30,3 +30,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 https://gi Line 657  Source code for this patch is https://gi
657  +  +
658  +subdir-$(CONFIG_CCSECURITY)            += ccsecurity  +subdir-$(CONFIG_CCSECURITY)            += ccsecurity
659  +obj-$(CONFIG_CCSECURITY)               += ccsecurity/  +obj-$(CONFIG_CCSECURITY)               += ccsecurity/
660  --- linux-4.18-rc4.orig/security/security.c  --- linux-4.18.5.orig/security/security.c
661  +++ linux-4.18-rc4/security/security.c  +++ linux-4.18.5/security/security.c
662  @@ -983,12 +983,19 @@ int security_file_open(struct file *file  @@ -983,12 +983,19 @@ int security_file_open(struct file *file
663    
664   int security_task_alloc(struct task_struct *task, unsigned long clone_flags)   int security_task_alloc(struct task_struct *task, unsigned long clone_flags)

Legend:
Removed from v.266  
changed lines
  Added in v.267

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