Develop and Download Open Source Software

Browse Subversion Repository

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

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

revision 386 by kumaneko, Mon Nov 13 11:36:37 2023 UTC revision 387 by kumaneko, Mon Dec 25 14:08:19 2023 UTC
# Line 1  Line 1 
1  This is TOMOYO Linux patch for kernel 6.7-rc1.  This is TOMOYO Linux patch for kernel 6.7-rc7.
2    
3  Source code for this patch is https://git.kernel.org/torvalds/t/linux-6.7-rc1.tar.gz  Source code for this patch is https://git.kernel.org/torvalds/t/linux-6.7-rc7.tar.gz
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       |    5 ++-   security/security.c       |    5 ++-
29   24 files changed, 151 insertions(+), 31 deletions(-)   24 files changed, 151 insertions(+), 31 deletions(-)
30    
31  --- linux-6.7-rc1.orig/fs/exec.c  --- linux-6.7-rc7.orig/fs/exec.c
32  +++ linux-6.7-rc1/fs/exec.c  +++ linux-6.7-rc7/fs/exec.c
33  @@ -1851,7 +1851,7 @@ static int bprm_execve(struct linux_binp  @@ -1851,7 +1851,7 @@ static int bprm_execve(struct linux_binp
34          if (retval)          if (retval)
35                  goto out;                  goto out;
# Line 39  Source code for this patch is https://gi Line 39  Source code for this patch is https://gi
39          if (retval < 0)          if (retval < 0)
40                  goto out;                  goto out;
41    
42  --- linux-6.7-rc1.orig/fs/open.c  --- linux-6.7-rc7.orig/fs/open.c
43  +++ linux-6.7-rc1/fs/open.c  +++ linux-6.7-rc7/fs/open.c
44  @@ -1622,6 +1622,8 @@ SYSCALL_DEFINE3(close_range, unsigned in  @@ -1622,6 +1622,8 @@ SYSCALL_DEFINE3(close_range, unsigned in
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-6.7-rc1.orig/fs/proc/version.c  --- linux-6.7-rc7.orig/fs/proc/version.c
54  +++ linux-6.7-rc1/fs/proc/version.c  +++ linux-6.7-rc7/fs/proc/version.c
55  @@ -25,3 +25,10 @@ static int __init proc_version_init(void  @@ -25,3 +25,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: 6.7-rc1 2023/11/13\n");  +       printk(KERN_INFO "Hook version: 6.7-rc7 2023/12/25\n");
63  +       return 0;  +       return 0;
64  +}  +}
65  +fs_initcall(ccs_show_version);  +fs_initcall(ccs_show_version);
66  --- linux-6.7-rc1.orig/include/linux/sched.h  --- linux-6.7-rc7.orig/include/linux/sched.h
67  +++ linux-6.7-rc1/include/linux/sched.h  +++ linux-6.7-rc7/include/linux/sched.h
68  @@ -46,6 +46,7 @@ struct blk_plug;  @@ -46,6 +46,7 @@ struct blk_plug;
69   struct bpf_local_storage;   struct bpf_local_storage;
70   struct bpf_run_ctx;   struct bpf_run_ctx;
# Line 84  Source code for this patch is https://gi Line 84  Source code for this patch is https://gi
84    
85   #ifdef CONFIG_TRACING   #ifdef CONFIG_TRACING
86          /* Bitmask and counter of trace recursion: */          /* Bitmask and counter of trace recursion: */
87  --- linux-6.7-rc1.orig/include/linux/security.h  --- linux-6.7-rc7.orig/include/linux/security.h
88  +++ linux-6.7-rc1/include/linux/security.h  +++ linux-6.7-rc7/include/linux/security.h
89  @@ -60,6 +60,7 @@ struct fs_parameter;  @@ -60,6 +60,7 @@ struct fs_parameter;
90   enum fs_value_type;   enum fs_value_type;
91   struct watch;   struct watch;
# Line 311  Source code for this patch is https://gi Line 311  Source code for this patch is https://gi
311   }   }
312   #endif /* CONFIG_SECURITY_PATH */   #endif /* CONFIG_SECURITY_PATH */
313    
314  --- linux-6.7-rc1.orig/include/net/ip.h  --- linux-6.7-rc7.orig/include/net/ip.h
315  +++ linux-6.7-rc1/include/net/ip.h  +++ linux-6.7-rc7/include/net/ip.h
316  @@ -355,6 +355,8 @@ void inet_sk_get_local_port_range(const  @@ -355,6 +355,8 @@ void inet_sk_get_local_port_range(const
317   #ifdef CONFIG_SYSCTL   #ifdef CONFIG_SYSCTL
318   static inline bool inet_is_local_reserved_port(struct net *net, unsigned short port)   static inline bool inet_is_local_reserved_port(struct net *net, unsigned short port)
# Line 331  Source code for this patch is https://gi Line 331  Source code for this patch is https://gi
331          return false;          return false;
332   }   }
333    
334  --- linux-6.7-rc1.orig/init/init_task.c  --- linux-6.7-rc7.orig/init/init_task.c
335  +++ linux-6.7-rc1/init/init_task.c  +++ linux-6.7-rc7/init/init_task.c
336  @@ -210,6 +210,10 @@ struct task_struct init_task  @@ -210,6 +210,10 @@ struct task_struct init_task
337   #ifdef CONFIG_SECCOMP_FILTER   #ifdef CONFIG_SECCOMP_FILTER
338          .seccomp        = { .filter_count = ATOMIC_INIT(0) },          .seccomp        = { .filter_count = ATOMIC_INIT(0) },
# Line 344  Source code for this patch is https://gi Line 344  Source code for this patch is https://gi
344   };   };
345   EXPORT_SYMBOL(init_task);   EXPORT_SYMBOL(init_task);
346    
347  --- linux-6.7-rc1.orig/kernel/kexec.c  --- linux-6.7-rc7.orig/kernel/kexec.c
348  +++ linux-6.7-rc1/kernel/kexec.c  +++ linux-6.7-rc7/kernel/kexec.c
349  @@ -16,7 +16,7 @@  @@ -16,7 +16,7 @@
350   #include <linux/syscalls.h>   #include <linux/syscalls.h>
351   #include <linux/vmalloc.h>   #include <linux/vmalloc.h>
# Line 364  Source code for this patch is https://gi Line 364  Source code for this patch is https://gi
364    
365          /* Permit LSMs and IMA to fail the kexec */          /* Permit LSMs and IMA to fail the kexec */
366          result = security_kernel_load_data(LOADING_KEXEC_IMAGE, false);          result = security_kernel_load_data(LOADING_KEXEC_IMAGE, false);
367  --- linux-6.7-rc1.orig/kernel/module/main.c  --- linux-6.7-rc7.orig/kernel/module/main.c
368  +++ linux-6.7-rc1/kernel/module/main.c  +++ linux-6.7-rc7/kernel/module/main.c
369  @@ -62,6 +62,7 @@  @@ -62,6 +62,7 @@
370    
371   #define CREATE_TRACE_POINTS   #define CREATE_TRACE_POINTS
# Line 392  Source code for this patch is https://gi Line 392  Source code for this patch is https://gi
392    
393          return 0;          return 0;
394   }   }
395  --- linux-6.7-rc1.orig/kernel/ptrace.c  --- linux-6.7-rc7.orig/kernel/ptrace.c
396  +++ linux-6.7-rc1/kernel/ptrace.c  +++ linux-6.7-rc7/kernel/ptrace.c
397  @@ -1280,6 +1280,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l  @@ -1280,6 +1280,11 @@ SYSCALL_DEFINE4(ptrace, long, request, l
398   {   {
399          struct task_struct *child;          struct task_struct *child;
# Line 418  Source code for this patch is https://gi Line 418  Source code for this patch is https://gi
418    
419          if (request == PTRACE_TRACEME) {          if (request == PTRACE_TRACEME) {
420                  ret = ptrace_traceme();                  ret = ptrace_traceme();
421  --- linux-6.7-rc1.orig/kernel/reboot.c  --- linux-6.7-rc7.orig/kernel/reboot.c
422  +++ linux-6.7-rc1/kernel/reboot.c  +++ linux-6.7-rc7/kernel/reboot.c
423  @@ -18,6 +18,7 @@  @@ -18,6 +18,7 @@
424   #include <linux/syscalls.h>   #include <linux/syscalls.h>
425   #include <linux/syscore_ops.h>   #include <linux/syscore_ops.h>
# Line 437  Source code for this patch is https://gi Line 437  Source code for this patch is https://gi
437    
438          /*          /*
439           * 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
440  --- linux-6.7-rc1.orig/kernel/sched/core.c  --- linux-6.7-rc7.orig/kernel/sched/core.c
441  +++ linux-6.7-rc1/kernel/sched/core.c  +++ linux-6.7-rc7/kernel/sched/core.c
442  @@ -7302,6 +7302,8 @@ int can_nice(const struct task_struct *p  @@ -7302,6 +7302,8 @@ int can_nice(const struct task_struct *p
443   SYSCALL_DEFINE1(nice, int, increment)   SYSCALL_DEFINE1(nice, int, increment)
444   {   {
# Line 448  Source code for this patch is https://gi Line 448  Source code for this patch is https://gi
448    
449          /*          /*
450           * Setpriority might change our priority at the same moment.           * Setpriority might change our priority at the same moment.
451  --- linux-6.7-rc1.orig/kernel/signal.c  --- linux-6.7-rc7.orig/kernel/signal.c
452  +++ linux-6.7-rc1/kernel/signal.c  +++ linux-6.7-rc7/kernel/signal.c
453  @@ -3819,6 +3819,8 @@ static inline void prepare_kill_siginfo(  @@ -3819,6 +3819,8 @@ static inline void prepare_kill_siginfo(
454   SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)   SYSCALL_DEFINE2(kill, pid_t, pid, int, sig)
455   {   {
# Line 517  Source code for this patch is https://gi Line 517  Source code for this patch is https://gi
517    
518          return do_send_specific(tgid, pid, sig, info);          return do_send_specific(tgid, pid, sig, info);
519   }   }
520  --- linux-6.7-rc1.orig/kernel/sys.c  --- linux-6.7-rc7.orig/kernel/sys.c
521  +++ linux-6.7-rc1/kernel/sys.c  +++ linux-6.7-rc7/kernel/sys.c
522  @@ -226,6 +226,10 @@ SYSCALL_DEFINE3(setpriority, int, which,  @@ -226,6 +226,10 @@ SYSCALL_DEFINE3(setpriority, int, which,
523    
524          if (which > PRIO_USER || which < PRIO_PROCESS)          if (which > PRIO_USER || which < PRIO_PROCESS)
# Line 548  Source code for this patch is https://gi Line 548  Source code for this patch is https://gi
548    
549          errno = -EFAULT;          errno = -EFAULT;
550          if (!copy_from_user(tmp, name, len)) {          if (!copy_from_user(tmp, name, len)) {
551  --- linux-6.7-rc1.orig/kernel/time/timekeeping.c  --- linux-6.7-rc7.orig/kernel/time/timekeeping.c
552  +++ linux-6.7-rc1/kernel/time/timekeeping.c  +++ linux-6.7-rc7/kernel/time/timekeeping.c
553  @@ -24,6 +24,7 @@  @@ -24,6 +24,7 @@
554   #include <linux/compiler.h>   #include <linux/compiler.h>
555   #include <linux/audit.h>   #include <linux/audit.h>
# Line 583  Source code for this patch is https://gi Line 583  Source code for this patch is https://gi
583    
584                  /*                  /*
585                   * Validate if a timespec/timeval used to inject a time                   * Validate if a timespec/timeval used to inject a time
586  --- linux-6.7-rc1.orig/net/ipv4/raw.c  --- linux-6.7-rc7.orig/net/ipv4/raw.c
587  +++ linux-6.7-rc1/net/ipv4/raw.c  +++ linux-6.7-rc7/net/ipv4/raw.c
588  @@ -745,6 +745,10 @@ static int raw_recvmsg(struct sock *sk,  @@ -745,6 +745,10 @@ static int raw_recvmsg(struct sock *sk,
589          skb = skb_recv_datagram(sk, flags, &err);          skb = skb_recv_datagram(sk, flags, &err);
590          if (!skb)          if (!skb)
# Line 596  Source code for this patch is https://gi Line 596  Source code for this patch is https://gi
596    
597          copied = skb->len;          copied = skb->len;
598          if (len < copied) {          if (len < copied) {
599  --- linux-6.7-rc1.orig/net/ipv4/udp.c  --- linux-6.7-rc7.orig/net/ipv4/udp.c
600  +++ linux-6.7-rc1/net/ipv4/udp.c  +++ linux-6.7-rc7/net/ipv4/udp.c
601  @@ -1810,6 +1810,8 @@ try_again:  @@ -1810,6 +1810,8 @@ try_again:
602          skb = __skb_recv_udp(sk, flags, &off, &err);          skb = __skb_recv_udp(sk, flags, &off, &err);
603          if (!skb)          if (!skb)
# Line 607  Source code for this patch is https://gi Line 607  Source code for this patch is https://gi
607    
608          ulen = udp_skb_len(skb);          ulen = udp_skb_len(skb);
609          copied = len;          copied = len;
610  --- linux-6.7-rc1.orig/net/ipv6/raw.c  --- linux-6.7-rc7.orig/net/ipv6/raw.c
611  +++ linux-6.7-rc1/net/ipv6/raw.c  +++ linux-6.7-rc7/net/ipv6/raw.c
612  @@ -445,6 +445,10 @@ static int rawv6_recvmsg(struct sock *sk  @@ -445,6 +445,10 @@ static int rawv6_recvmsg(struct sock *sk
613          skb = skb_recv_datagram(sk, flags, &err);          skb = skb_recv_datagram(sk, flags, &err);
614          if (!skb)          if (!skb)
# Line 620  Source code for this patch is https://gi Line 620  Source code for this patch is https://gi
620    
621          copied = skb->len;          copied = skb->len;
622          if (copied > len) {          if (copied > len) {
623  --- linux-6.7-rc1.orig/net/ipv6/udp.c  --- linux-6.7-rc7.orig/net/ipv6/udp.c
624  +++ linux-6.7-rc1/net/ipv6/udp.c  +++ linux-6.7-rc7/net/ipv6/udp.c
625  @@ -342,6 +342,8 @@ try_again:  @@ -342,6 +342,8 @@ try_again:
626          skb = __skb_recv_udp(sk, flags, &off, &err);          skb = __skb_recv_udp(sk, flags, &off, &err);
627          if (!skb)          if (!skb)
# Line 631  Source code for this patch is https://gi Line 631  Source code for this patch is https://gi
631    
632          ulen = udp6_skb_len(skb);          ulen = udp6_skb_len(skb);
633          copied = len;          copied = len;
634  --- linux-6.7-rc1.orig/net/socket.c  --- linux-6.7-rc7.orig/net/socket.c
635  +++ linux-6.7-rc1/net/socket.c  +++ linux-6.7-rc7/net/socket.c
636  @@ -1929,6 +1929,10 @@ struct file *do_accept(struct file *file  @@ -1929,6 +1929,10 @@ struct file *do_accept(struct file *file
637          if (err < 0)          if (err < 0)
638                  goto out_fd;                  goto out_fd;
# Line 644  Source code for this patch is https://gi Line 644  Source code for this patch is https://gi
644          if (upeer_sockaddr) {          if (upeer_sockaddr) {
645                  len = ops->getname(newsock, (struct sockaddr *)&address, 2);                  len = ops->getname(newsock, (struct sockaddr *)&address, 2);
646                  if (len < 0) {                  if (len < 0) {
647  --- linux-6.7-rc1.orig/net/unix/af_unix.c  --- linux-6.7-rc7.orig/net/unix/af_unix.c
648  +++ linux-6.7-rc1/net/unix/af_unix.c  +++ linux-6.7-rc7/net/unix/af_unix.c
649  @@ -2413,6 +2413,10 @@ int __unix_dgram_recvmsg(struct sock *sk  @@ -2411,6 +2411,10 @@ int __unix_dgram_recvmsg(struct sock *sk
650                                                  EPOLLOUT | EPOLLWRNORM |                                                  EPOLLOUT | EPOLLWRNORM |
651                                                  EPOLLWRBAND);                                                  EPOLLWRBAND);
652    
# Line 657  Source code for this patch is https://gi Line 657  Source code for this patch is https://gi
657          if (msg->msg_name) {          if (msg->msg_name) {
658                  unix_copy_addr(msg, skb->sk);                  unix_copy_addr(msg, skb->sk);
659    
660  @@ -2468,6 +2472,7 @@ int __unix_dgram_recvmsg(struct sock *sk  @@ -2466,6 +2470,7 @@ int __unix_dgram_recvmsg(struct sock *sk
661    
662   out_free:   out_free:
663          skb_free_datagram(sk, skb);          skb_free_datagram(sk, skb);
# Line 665  Source code for this patch is https://gi Line 665  Source code for this patch is https://gi
665          mutex_unlock(&u->iolock);          mutex_unlock(&u->iolock);
666   out:   out:
667          return err;          return err;
668  --- linux-6.7-rc1.orig/security/Kconfig  --- linux-6.7-rc7.orig/security/Kconfig
669  +++ linux-6.7-rc1/security/Kconfig  +++ linux-6.7-rc7/security/Kconfig
670  @@ -249,5 +249,7 @@ config LSM  @@ -249,5 +249,7 @@ config LSM
671    
672   source "security/Kconfig.hardening"   source "security/Kconfig.hardening"
# Line 675  Source code for this patch is https://gi Line 675  Source code for this patch is https://gi
675  +  +
676   endmenu   endmenu
677    
678  --- linux-6.7-rc1.orig/security/Makefile  --- linux-6.7-rc7.orig/security/Makefile
679  +++ linux-6.7-rc1/security/Makefile  +++ linux-6.7-rc7/security/Makefile
680  @@ -27,3 +27,6 @@ obj-$(CONFIG_SECURITY_LANDLOCK)               += land  @@ -27,3 +27,6 @@ obj-$(CONFIG_SECURITY_LANDLOCK)               += land
681    
682   # Object integrity file lists   # Object integrity file lists
# Line 684  Source code for this patch is https://gi Line 684  Source code for this patch is https://gi
684  +  +
685  +subdir-$(CONFIG_CCSECURITY)            += ccsecurity  +subdir-$(CONFIG_CCSECURITY)            += ccsecurity
686  +obj-$(CONFIG_CCSECURITY)               += ccsecurity/  +obj-$(CONFIG_CCSECURITY)               += ccsecurity/
687  --- linux-6.7-rc1.orig/security/security.c  --- linux-6.7-rc7.orig/security/security.c
688  +++ linux-6.7-rc1/security/security.c  +++ linux-6.7-rc7/security/security.c
689  @@ -2870,7 +2870,9 @@ int security_task_alloc(struct task_stru  @@ -2870,7 +2870,9 @@ int security_task_alloc(struct task_stru
690    
691          if (rc)          if (rc)

Legend:
Removed from v.386  
changed lines
  Added in v.387

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