linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the akpm tree with the security tree
@ 2021-03-19  6:06 Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2021-03-19  6:06 UTC (permalink / raw)
  To: Andrew Morton, James Morris
  Cc: James Morris, Linux Kernel Mailing List, Linux Next Mailing List,
	Mickaël Salaün, Mike Rapoport, Mike Rapoport

[-- Attachment #1: Type: text/plain, Size: 4168 bytes --]

Hi all,

FIXME: Add owner of second tree to To:
       Add author(s)/SOB of conflicting commits.

Today's linux-next merge of the akpm tree got conflicts in:

  arch/x86/entry/syscalls/syscall_32.tbl
  arch/x86/entry/syscalls/syscall_64.tbl
  include/linux/syscalls.h
  include/uapi/asm-generic/unistd.h

between commit:

  c5eafae25eb5 ("landlock: Add syscall implementations")

from the security tree and patch:

  "arch, mm: wire up memfd_secret system call where relevant"

from the akpm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/entry/syscalls/syscall_32.tbl
index 28a1423ce32e,524a076e79ca..000000000000
--- a/arch/x86/entry/syscalls/syscall_32.tbl
+++ b/arch/x86/entry/syscalls/syscall_32.tbl
@@@ -448,6 -448,4 +448,7 @@@
  441	i386	epoll_pwait2		sys_epoll_pwait2		compat_sys_epoll_pwait2
  442	i386	mount_setattr		sys_mount_setattr
  443	i386	quotactl_path		sys_quotactl_path
 -444	i386	memfd_secret		sys_memfd_secret
 +444	i386	landlock_create_ruleset	sys_landlock_create_ruleset
 +445	i386	landlock_add_rule	sys_landlock_add_rule
 +446	i386	landlock_restrict_self	sys_landlock_restrict_self
++447	i386	memfd_secret		sys_memfd_secret
diff --cc arch/x86/entry/syscalls/syscall_64.tbl
index ecd551b08d05,440467ca352d..000000000000
--- a/arch/x86/entry/syscalls/syscall_64.tbl
+++ b/arch/x86/entry/syscalls/syscall_64.tbl
@@@ -365,9 -365,7 +365,10 @@@
  441	common	epoll_pwait2		sys_epoll_pwait2
  442	common	mount_setattr		sys_mount_setattr
  443	common	quotactl_path		sys_quotactl_path
 -444	common	memfd_secret		sys_memfd_secret
 +444	common	landlock_create_ruleset	sys_landlock_create_ruleset
 +445	common	landlock_add_rule	sys_landlock_add_rule
 +446	common	landlock_restrict_self	sys_landlock_restrict_self
++447	common	memfd_secret		sys_memfd_secret
  
  #
  # Due to a historical design error, certain syscalls are numbered differently
diff --cc include/linux/syscalls.h
index 050511e8f1f8,019a1d876eb1..000000000000
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@@ -1045,11 -1043,7 +1045,12 @@@ asmlinkage long sys_pidfd_send_signal(i
  				       siginfo_t __user *info,
  				       unsigned int flags);
  asmlinkage long sys_pidfd_getfd(int pidfd, int fd, unsigned int flags);
 +asmlinkage long sys_landlock_create_ruleset(const struct landlock_ruleset_attr __user *attr,
 +		size_t size, __u32 flags);
 +asmlinkage long sys_landlock_add_rule(int ruleset_fd, enum landlock_rule_type rule_type,
 +		const void __user *rule_attr, __u32 flags);
 +asmlinkage long sys_landlock_restrict_self(int ruleset_fd, __u32 flags);
+ asmlinkage long sys_memfd_secret(unsigned long flags);
  
  /*
   * Architecture-specific system calls
diff --cc include/uapi/asm-generic/unistd.h
index 67093382a4e6,77d89b24341f..000000000000
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@@ -865,15 -865,13 +865,19 @@@ __SC_COMP(__NR_epoll_pwait2, sys_epoll_
  __SYSCALL(__NR_mount_setattr, sys_mount_setattr)
  #define __NR_quotactl_path 443
  __SYSCALL(__NR_quotactl_path, sys_quotactl_path)
 +#define __NR_landlock_create_ruleset 444
 +__SYSCALL(__NR_landlock_create_ruleset, sys_landlock_create_ruleset)
 +#define __NR_landlock_add_rule 445
 +__SYSCALL(__NR_landlock_add_rule, sys_landlock_add_rule)
 +#define __NR_landlock_restrict_self 446
 +__SYSCALL(__NR_landlock_restrict_self, sys_landlock_restrict_self)
+ #ifdef __ARCH_WANT_MEMFD_SECRET
 -#define __NR_memfd_secret 444
++#define __NR_memfd_secret 447
+ __SYSCALL(__NR_memfd_secret, sys_memfd_secret)
+ #endif
  
  #undef __NR_syscalls
- #define __NR_syscalls 447
 -#define __NR_syscalls 445
++#define __NR_syscalls 448
  
  /*
   * 32 bit systems traditionally used different

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* linux-next: manual merge of the akpm tree with the security tree
@ 2012-09-17 10:45 Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2012-09-17 10:45 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, James Morris, Peter Moody, Mimi Zohar,
	Konstantin Khlebnikov

[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
include/linux/audit.h between commit e23eb920b0f3 ("audit: export
audit_log_task_info") from the security tree and commit "mm: use
mm->exe_file instead of first VM_EXECUTABLE vma->vm_file" from the akpm
tree.

I fixed it up (I hope - see below) and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc kernel/auditsc.c
index 37f52f2,31cf885..0000000
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@@ -1154,38 -1154,12 +1154,37 @@@ error_path
  
  EXPORT_SYMBOL(audit_log_task_context);
  
 -static void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk)
 +void audit_log_task_info(struct audit_buffer *ab, struct task_struct *tsk)
  {
 +	const struct cred *cred;
  	char name[sizeof(tsk->comm)];
  	struct mm_struct *mm = tsk->mm;
- 	struct vm_area_struct *vma;
 +	char *tty;
 +
 +	if (!ab)
 +		return;
  
  	/* tsk == current */
 +	cred = current_cred();
 +
 +	spin_lock_irq(&tsk->sighand->siglock);
 +	if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name)
 +		tty = tsk->signal->tty->name;
 +	else
 +		tty = "(none)";
 +	spin_unlock_irq(&tsk->sighand->siglock);
 +
 +
 +	audit_log_format(ab,
 +			 " ppid=%ld pid=%d auid=%u uid=%u gid=%u"
 +			 " euid=%u suid=%u fsuid=%u"
 +			 " egid=%u sgid=%u fsgid=%u ses=%u tty=%s",
 +			 sys_getppid(),
 +			 tsk->pid,
 +			 tsk->loginuid, cred->uid, cred->gid,
 +			 cred->euid, cred->suid, cred->fsuid,
 +			 cred->egid, cred->sgid, cred->fsgid,
 +			 tsk->sessionid, tty);
  
  	get_task_comm(name, tsk);
  	audit_log_format(ab, " comm=");

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* linux-next: manual merge of the akpm tree with the security tree
@ 2012-09-17 10:35 Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2012-09-17 10:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Kees Cook, Peter Moody, Mimi Zohar,
	James Morris

[-- Attachment #1: Type: text/plain, Size: 5177 bytes --]

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
include/linux/audit.h between commit e23eb920b0f3 ("audit: export
audit_log_task_info") from the security tree and commit "audit.h: replace
defines with C stubs" from the akpm tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc include/linux/audit.h
index 2a5073c,caf9179..0000000
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@@ -624,38 -623,92 +624,95 @@@ static inline void audit_mmap_fd(int fd
  extern int audit_n_rules;
  extern int audit_signals;
  #else /* CONFIG_AUDITSYSCALL */
- #define audit_alloc(t) ({ 0; })
- #define audit_free(t) do { ; } while (0)
- #define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
- #define audit_syscall_exit(r) do { ; } while (0)
- #define audit_dummy_context() 1
- #define audit_getname(n) do { ; } while (0)
- #define audit_putname(n) do { ; } while (0)
- #define __audit_inode(n,d) do { ; } while (0)
- #define __audit_inode_child(i,p) do { ; } while (0)
- #define audit_inode(n,d) do { (void)(d); } while (0)
- #define audit_inode_child(i,p) do { ; } while (0)
- #define audit_core_dumps(i) do { ; } while (0)
- #define audit_seccomp(i,s,c) do { ; } while (0)
- #define auditsc_get_stamp(c,t,s) (0)
+ static inline int  audit_alloc(struct task_struct *task)
+ {
+ 	return 0;
+ }
+ static inline void audit_free(struct task_struct *task)
+ { }
+ static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
+ 				       unsigned long a1, unsigned long a2,
+ 				       unsigned long a3)
+ { }
+ static inline void audit_syscall_exit(void *pt_regs)
+ { }
+ static inline int audit_dummy_context(void)
+ {
+ 	return 1;
+ }
+ static inline void audit_getname(const char *name)
+ { }
+ static inline void audit_putname(const char *name)
+ { }
+ static inline void __audit_inode(const char *name, const struct dentry *dentry)
+ { }
+ static inline void __audit_inode_child(const struct dentry *dentry,
+ 					const struct inode *parent)
+ { }
+ static inline void audit_inode(const char *name, const struct dentry *dentry)
+ { }
+ static inline void audit_inode_child(const struct dentry *dentry,
+ 				     const struct inode *parent)
+ { }
+ static inline void audit_core_dumps(long signr)
+ { }
+ static inline void __audit_seccomp(unsigned long syscall, long signr, int code)
+ { }
+ static inline void audit_seccomp(unsigned long syscall, long signr, int code)
+ { }
+ static inline int auditsc_get_stamp(struct audit_context *ctx,
+ 			      struct timespec *t, unsigned int *serial)
+ {
+ 	return 0;
+ }
  #define audit_get_loginuid(t) (-1)
  #define audit_get_sessionid(t) (-1)
- #define audit_log_task_context(b) do { ; } while (0)
- #define audit_log_task_info(b, t) do { ; } while (0)
- #define audit_ipc_obj(i) ((void)0)
- #define audit_ipc_set_perm(q,u,g,m) ((void)0)
- #define audit_bprm(p) ({ 0; })
- #define audit_socketcall(n,a) ((void)0)
- #define audit_fd_pair(n,a) ((void)0)
- #define audit_sockaddr(len, addr) ({ 0; })
- #define audit_mq_open(o,m,a) ((void)0)
- #define audit_mq_sendrecv(d,l,p,t) ((void)0)
- #define audit_mq_notify(d,n) ((void)0)
- #define audit_mq_getsetattr(d,s) ((void)0)
- #define audit_log_bprm_fcaps(b, ncr, ocr) ({ 0; })
- #define audit_log_capset(pid, ncr, ocr) ((void)0)
- #define audit_mmap_fd(fd, flags) ((void)0)
- #define audit_ptrace(t) ((void)0)
+ static inline void audit_log_task_context(struct audit_buffer *ab)
+ { }
++static inline void audit_log_task_info(struct audit_buffer *ab,
++					struct task_struct *tsk)
++{ }
+ static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
+ { }
+ static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
+ 					gid_t gid, umode_t mode)
+ { }
+ static inline int audit_bprm(struct linux_binprm *bprm)
+ {
+ 	return 0;
+ }
+ static inline void audit_socketcall(int nargs, unsigned long *args)
+ { }
+ static inline void audit_fd_pair(int fd1, int fd2)
+ { }
+ static inline int audit_sockaddr(int len, void *addr)
+ {
+ 	return 0;
+ }
+ static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
+ { }
+ static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len,
+ 				     unsigned int msg_prio,
+ 				     const struct timespec *abs_timeout)
+ { }
+ static inline void audit_mq_notify(mqd_t mqdes,
+ 				   const struct sigevent *notification)
+ { }
+ static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
+ { }
+ static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
+ 				       const struct cred *new,
+ 				       const struct cred *old)
+ {
+ 	return 0;
+ }
+ static inline void audit_log_capset(pid_t pid, const struct cred *new,
+ 				   const struct cred *old)
+ { }
+ static inline void audit_mmap_fd(int fd, int flags)
+ { }
+ static inline void audit_ptrace(struct task_struct *t)
+ { }
  #define audit_n_rules 0
  #define audit_signals 0
  #endif /* CONFIG_AUDITSYSCALL */

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* linux-next: manual merge of the akpm tree with the security tree
@ 2012-02-15  4:28 Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2012-02-15  4:28 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-next, linux-kernel, Akinobu Mita, Al Viro, James Morris

[-- Attachment #1: Type: text/plain, Size: 742 bytes --]

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
kernel/sysctl.c between commit 404015308747 ("security: trim security.h")
from the security tree and commit "sysctl: use bitmap library functions"
from the akpm.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc kernel/sysctl.c
index 62538ee,cfeb1fa..0000000
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@@ -58,7 -58,7 +58,8 @@@
  #include <linux/oom.h>
  #include <linux/kmod.h>
  #include <linux/capability.h>
 +#include <linux/binfmts.h>
+ #include <linux/bitmap.h>
  
  #include <asm/uaccess.h>
  #include <asm/processor.h>

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-19  6:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  6:06 linux-next: manual merge of the akpm tree with the security tree Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2012-09-17 10:45 Stephen Rothwell
2012-09-17 10:35 Stephen Rothwell
2012-02-15  4:28 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).