linux-next: manual merge of the security tree with the mm tree

Stephen Rothwell posted 1 patch 1 month ago
linux-next: manual merge of the security tree with the mm tree
Posted by Stephen Rothwell 1 month ago
Hi all,

Today's linux-next merge of the security tree got a conflict in:

  security/lsm_audit.c

between commit:

  b62d29a06242 ("security: replace memcpy() with get_task_comm()")

from the mm-nonmm-unstable branch of the mm tree and commit:

  cfb1f7e5c9a7 ("lsm: Add audit_log_lsm_data() helper")

from the security 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 security/lsm_audit.c
index 9a8352972086,de29ce8ff708..000000000000
--- a/security/lsm_audit.c
+++ b/security/lsm_audit.c
@@@ -428,6 -422,21 +422,21 @@@ void audit_log_lsm_data(struct audit_bu
  	} /* switch (a->type) */
  }
  
+ /**
+  * dump_common_audit_data - helper to dump common audit data
+  * @ab : the audit buffer
+  * @a : common audit data
+  */
+ static void dump_common_audit_data(struct audit_buffer *ab,
+ 				   const struct common_audit_data *a)
+ {
+ 	char comm[sizeof(current->comm)];
+ 
+ 	audit_log_format(ab, " pid=%d comm=", task_tgid_nr(current));
 -	audit_log_untrustedstring(ab, memcpy(comm, current->comm, sizeof(comm)));
++	audit_log_untrustedstring(ab, get_task_comm(comm, current));
+ 	audit_log_lsm_data(ab, a);
+ }
+ 
  /**
   * common_lsm_audit - generic LSM auditing function
   * @a:  auxiliary audit data