linux-next: build failure after merge of the landlock tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

After merging the landlock tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

In file included from security/landlock/net.c:14:
security/landlock/net.c: In function 'landlock_add_net_hooks':
security/landlock/common.h:12:23: error: passing argument 3 of 'security_add_hooks' from incompatible pointer type [-Werror=incompatible-pointer-types]
   12 | #define LANDLOCK_NAME "landlock"
      |                       ^~~~~~~~~~
      |                       |
      |                       char *
security/landlock/net.c:199:28: note: in expansion of macro 'LANDLOCK_NAME'
  199 |                            LANDLOCK_NAME);
      |                            ^~~~~~~~~~~~~
In file included from security/landlock/setup.h:12,
                 from security/landlock/cred.h:17,
                 from security/landlock/net.c:15:
include/linux/lsm_hooks.h:120:53: note: expected 'const struct lsm_id *' but argument is of type 'char *'
  120 |                                const struct lsm_id *lsmid);
      |                                ~~~~~~~~~~~~~~~~~~~~~^~~~~

Caused by commit

  fff69fb03dde ("landlock: Support network rules with TCP bind and connect")

interacting with commit

  9b09f11320db ("LSM: Identify modules by more than name")

from the security tree.

I have applied the following merge resolution patch.

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Fri, 27 Oct 2023 16:13:32 +1100
Subject: [PATCH] fixup for "landlock: Support network rules with TCP bind and
 connect"

interacting with "LSM: Identify modules by more than name"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
 security/landlock/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/landlock/net.c b/security/landlock/net.c
index aaa92c2b1f08..efa1b644a4af 100644
--- a/security/landlock/net.c
+++ b/security/landlock/net.c
@@ -196,5 +196,5 @@ static struct security_hook_list landlock_hooks[] __ro_after_init = {
 __init void landlock_add_net_hooks(void)
 {
 	security_add_hooks(landlock_hooks, ARRAY_SIZE(landlock_hooks),
-			   LANDLOCK_NAME);
+			   &landlock_lsmid);
 }
-- 
2.40.1

-- 
Cheers,
Stephen Rothwell

Attachment: pgp02Q3csXEcd.pgp
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux