Message ID | 20231027163400.5764d549@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp378135vqb; Thu, 26 Oct 2023 22:34:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFUmbQToS4MKfg7bZzFXSPtp/WzvBhqN5EgPP1SQKR0oyJBijSIkWRiLh3TDa3UAcurIOfT X-Received: by 2002:a1f:9ec1:0:b0:49c:79f3:27a4 with SMTP id h184-20020a1f9ec1000000b0049c79f327a4mr2075060vke.3.1698384857278; Thu, 26 Oct 2023 22:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698384857; cv=none; d=google.com; s=arc-20160816; b=wrxmC0DPIdJxsMB6dvi33c1lGRX0L+tOq6tjrif0FbcJaF5xaSjTXUe6oaW1AhWA6z bRvwySd6VVkYXBuAydeI2Wzg5vmX74vhYbFrTbpvBpmWIgl2SguiAMrPTLxNTmFwJb9T 0CaD5tl45gih/BzgJn00KmuPIfbaIzH7+mUyZCTR2No3nKWSWm+3VQSx+uTXmA0JXZWP MitNuM5n3XmWemIvlsXH3Fcu4eq43x/xKcnPUfKVjHYFDFQtaZq9hcL9WUqTD95fV1bt f0h+bm9gMvgSQQt5qnCu83L0wPbmonBYrYceoyxzcCm5nC0ucQsp3vOsWMrQTSdWE80P CAZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=ZlwcCpgji3B4ca648vW3TWOMt2e5PNvnzxuKUwNW4i0=; fh=03rdwn8CtfIRDj94lVBYlZbNkbKHyDEH8wi+ad1Zkvw=; b=R9lGcCe2EVcVOPYvFn2xJKHZBba/H1RhMO4vNzxGOpVP5AnqkcldXGuBqMzhDbEn+l 5qvx4eaAeaCcuRzu7gAyuNk94yi7D5GSv6h/c4TyJsT3Kh6HuPAb5khqZpbXbCwx4rKo JL3TdbWOlTalpyQPb8Sp5+pffLPJcMSD7T6mkAMDPZ3B0X0zFq7tH3/sKv/Qcxrdz/YJ J5IZWz1KDkaEnDM8hsNm+tg2hBQdgVHCgErEKjLug5UoOQB231SO55LcssabK13sllbO 58+dSgf+o1rUrdSfXeZ1LwQ3Wk1W4Z8uGAsZogiM95Fke6A0DEpfry6Ki4syGj2j73Eg wRbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=hUyF5o4Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f68-20020a0ddc47000000b005a7c656c841si1192813ywe.204.2023.10.26.22.34.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 22:34:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=hUyF5o4Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0FBA8827FF9E; Thu, 26 Oct 2023 22:34:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345123AbjJ0FeM (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Fri, 27 Oct 2023 01:34:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjJ0FeK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Oct 2023 01:34:10 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C32381A7; Thu, 26 Oct 2023 22:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1698384843; bh=ZlwcCpgji3B4ca648vW3TWOMt2e5PNvnzxuKUwNW4i0=; h=Date:From:To:Cc:Subject:From; b=hUyF5o4YyWzHLuNGTX1VCmSRatkFuiUWNsanUDL7nkO1jzZfsp8cKSMaa/vRIhakK UVEoelL9P1KDvn+xbyJYDaHVnuadB+IG2qb3CWm4llXsXD+lMJoU0JKbJFsVDdlWLi BkmVJEFFQoA05b/8jGACzuAjUGWsazJBnKf51KrSHe4D7xudAm8FaXqosutjLJ80TN V7Thp+axHf3ph3qwS4kDKoeqo66YEme5mUts6bqY55iD60t38IxeNsyLkVUfddkbri wppuN9ylDKMh+G/HylhYHM9t7L71WLsCC74BnC6H3/xmyFdNBSy4gSqqvSxTUxmOXO O5C0jF/3qw5HA== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SGrty1GQNz4wcf; Fri, 27 Oct 2023 16:34:01 +1100 (AEDT) Date: Fri, 27 Oct 2023 16:34:00 +1100 From: Stephen Rothwell <sfr@canb.auug.org.au> To: =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= <mic@digikod.net>, Paul Moore <paul@paul-moore.com> Cc: Casey Schaufler <casey@schaufler-ca.com>, Kees Cook <keescook@chromium.org>, Konstantin Meskhidze <konstantin.meskhidze@huawei.com>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org> Subject: linux-next: build failure after merge of the landlock tree Message-ID: <20231027163400.5764d549@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/m5HOWf6jM/D/e4rBXcr.b7H"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 22:34:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780885600257765531 X-GMAIL-MSGID: 1780885600257765531 |
Series |
linux-next: build failure after merge of the landlock tree
|
|
Commit Message
Stephen Rothwell
Oct. 27, 2023, 5:34 a.m. UTC
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@canb.auug.org.au> 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@canb.auug.org.au> --- security/landlock/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Thanks Stephen, your patch is good! I tested it with the merge of my branch and LSM/dev-staging. The new Landlock changes (tested in -next for a few weeks) add a new call to security_add_hooks() which gets a new signature with commit 9b09f11320db ("LSM: Identify modules by more than name") from the LSM/dev-staging branch [1]. I plan to send a PR with my branch in the next merge window (for v6.7-rc1). We should squash Stephen's patch in commit 9b09f11320db ("LSM: Identify modules by more than name") but it would not be possible without my branch. I see two solutions: * keep Stephen's patch in -next only, or * rebase LSM/dev-staging on my branch now, and rebase it later on v6.7-rc1 once my branch is merged (which is the workflow described in [1]). Paul, what do you think? [1] https://lore.kernel.org/r/CAHC9VhS1wwgH6NNd+cJz4MYogPiRV8NyPDd1yj5SpaxeUB4UVg@mail.gmail.com On Fri, Oct 27, 2023 at 04:34:00PM +1100, Stephen Rothwell wrote: > 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@canb.auug.org.au> > 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@canb.auug.org.au> > --- > 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
On Fri, Oct 27, 2023 at 8:56 AM Mickaël Salaün <mic@digikod.net> wrote: > > Thanks Stephen, your patch is good! I tested it with the merge of my > branch and LSM/dev-staging. > > The new Landlock changes (tested in -next for a few weeks) add a new > call to security_add_hooks() which gets a new signature with commit > 9b09f11320db ("LSM: Identify modules by more than name") from > the LSM/dev-staging branch [1]. > > I plan to send a PR with my branch in the next merge window (for > v6.7-rc1). > > We should squash Stephen's patch in commit 9b09f11320db ("LSM: > Identify modules by more than name") but it would not be possible > without my branch. I see two solutions: > * keep Stephen's patch in -next only, or > * rebase LSM/dev-staging on my branch now, and rebase it later on > v6.7-rc1 once my branch is merged (which is the workflow described in > [1]). > > Paul, what do you think? Thanks Stephen, Mickaël. Once the Landlock tree is pulled into Linus' tree during the next merge window I'll update the LSM syscall patches currently living in lsm/dev-staging and this conflict should go away. FWIW, there are other conflicts with the LSM syscall patchset, most notably in the syscall registrations, that should also resolve themselves when I rebase on top of v6.7-rc1.
Hi all, On Fri, 27 Oct 2023 16:34:00 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > 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@canb.auug.org.au> > 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@canb.auug.org.au> > --- > 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 This is now a conflict between the security tree and Linus' tree.
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); }