linux-next: manual merge of the keys tree with the bpf-next tree

From: Stephen Rothwell
Date: Sun Mar 29 2020 - 22:07:06 EST


Hi all,

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

include/linux/lsm_hooks.h

between commit:

98e828a0650f ("security: Refactor declaration of LSM hooks")

from the bpf-next tree and commits:

e8fa137bb3cb ("security: Add hooks to rule on setting a watch")
858bc27762c1 ("security: Add a hook for the point of notification insertion")

from the keys tree.

I fixed it up (I used the former version of this file and added the
following merge resolution patch) 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.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 30 Mar 2020 12:55:31 +1100
Subject: [PATCH] security: keys: fixup for "security: Refactor declaration of
LSM hooks"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
include/linux/lsm_hook_defs.h | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
index 9cd4455528e5..4f8d63fd1327 100644
--- a/include/linux/lsm_hook_defs.h
+++ b/include/linux/lsm_hook_defs.h
@@ -252,6 +252,16 @@ LSM_HOOK(int, 0, inode_notifysecctx, struct inode *inode, void *ctx, u32 ctxlen)
LSM_HOOK(int, 0, inode_setsecctx, struct dentry *dentry, void *ctx, u32 ctxlen)
LSM_HOOK(int, 0, inode_getsecctx, struct inode *inode, void **ctx,
u32 *ctxlen)
+#ifdef CONFIG_KEY_NOTIFICATIONS
+LSM_HOOK(int, 0, watch_key, struct key *key)
+#endif
+#ifdef CONFIG_DEVICE_NOTIFICATIONS
+LSM_HOOK(int, 0, watch_devices, void)
+#endif
+#ifdef CONFIG_WATCH_QUEUE
+LSM_HOOK(int, 0, post_notification, const struct cred *w_cred,
+ const struct cred *cred, struct watch_notification *n)
+#endif

#ifdef CONFIG_SECURITY_NETWORK
LSM_HOOK(int, 0, unix_stream_connect, struct sock *sock, struct sock *other,
--
2.25.0

--
Cheers,
Stephen Rothwell

Attachment: pgpwEh_rlWbb7.pgp
Description: OpenPGP digital signature