Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp240618pxb; Mon, 13 Sep 2021 18:05:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIjJCKayjz+AlxaYQzLQ4IMgzkVNbP3rtyY0pSD8QzBjXI1lLevy8YMRFX1tY4KRh8wQfZ X-Received: by 2002:aa7:cdc8:: with SMTP id h8mr7561179edw.272.1631581525273; Mon, 13 Sep 2021 18:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631581525; cv=none; d=google.com; s=arc-20160816; b=WsLKZagLRgJhm4h6GDaez7GRVLgqO9YoTAkVe81N3YWwjfrySMN4wwDlmE+TgqmJxE x3cYsOzD4zZT08uaW9GVpjKUDfaNkw23vnjSzCuKGZf7cXsIsIijKtnZ5iLTCkJS6BJ3 GSS26fcoGkA82l0rhwgndFpUkNEc00wLx+MH2J8bcy/b8H1/rVi7sVT6rXbEoxAChgbx KBVxHbULeHZBQ+BRj4iixYRB4g7lK9pitL6auoebb+FvTG/OEADkRmfIKka9j4HBGujj M+QH/T3YHiFnkVnsY0LeCyPSSt3DWksXM+D+hkEDD7hPnCB1jwYbS4c/JIV/zZo7CPqt qwow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=a6cDeTvVM/zwuAekpHf0unWAPapurIVQ8FF1NNOdAUw=; b=sfiNjC41/Tdt5BV0aQV/dD7m+8xmoLJqtx9KDCsG8+7EKA7cForR2Jnvz8Kp4+XrXy AN2RfFemmFrc5Q3vbpIkMK6Ma9rTzZo94aI0YTiSm0/Iwo8Oj0G5fD+xnh/9w0ADPKIV OdRSHGVX+Sl2EskI1Dqc8GkM91q30bICUQ1alZxScNgeTnF3X8FMyRJ4+6ZIRO+bvzgS +FMeYbFp4y3YavgAeu6t6OMsaC0HCB/X+BuqrbIKCmtzGSJCJw6OznOt9SnNTYsisGug MjFNMq4K9SX4ZSiI0HugjwJjhveLR1eT/8KKtiCctDjSQjtgbW4381vGlGKFcrSgf9J4 8YXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b="sPoy/dS3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si5972006edb.415.2021.09.13.18.05.02; Mon, 13 Sep 2021 18:05:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b="sPoy/dS3"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243364AbhIMUVY (ORCPT + 99 others); Mon, 13 Sep 2021 16:21:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241893AbhIMUVP (ORCPT ); Mon, 13 Sep 2021 16:21:15 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 183DBC061574 for ; Mon, 13 Sep 2021 13:19:59 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 9so16173694edx.11 for ; Mon, 13 Sep 2021 13:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=a6cDeTvVM/zwuAekpHf0unWAPapurIVQ8FF1NNOdAUw=; b=sPoy/dS3wFFuiTrUc9FWgn/a+pIInQwVXZDUCfZrt/nRsTJSJfnLpiJFPHkKzvCIZa onPHm/+SGfI/11cIX+N2K9iKl91Vi85K4823RHjOhsYOkZZyT3r6LdVvAawfjW0/6P/J w4pHIjRmSZM+YNvsPxXp2uLEyC2dd8RGeM76t8PCUtHc8Yasb0UmofvVR+zBMcdlxmaI J2ad6YZ75zK8lAgn3Z6Ih3+1lkkw4FegxETcJK1D1L/UqzVkv4CrlRt9iYmEJ8eQ8qhm xdw5u+QtkptWiw98qira3GEy0clqaidZpTCCe3DbuypPXA+jq81x//wgHNCGcDAPUqnO 0ZqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=a6cDeTvVM/zwuAekpHf0unWAPapurIVQ8FF1NNOdAUw=; b=xKMhY1427uGWECQCUJ1OwPkteyXh7EqLL+hPXcFa+frfNgwIhMNevOFUu3AARu4kcW lCdx4pgvnJ+rYTSou2GLAQN5XPi401mYlzgqIz3Cxyb3qc5HtgKHXVP49JtW8ORRg8WS m7xUzONzk9jX3KETac9WJwE0dRzClFXz/cqEtpbVRB+55ZGUMluL9MbCcbCnbgVWxdNu cNYDdsECu4/0/Yi/1qGBXlCHnDkYDYX0/mI2zi77+j7iD5TZN/ujL1UzV7SDSgn8IS2T ZTRGQjapan21fwqTw873zO/fpH3DphxQlAxDcbaodkKQwHzR3/5KFkGX2BHZR6e2ACQP mZPw== X-Gm-Message-State: AOAM533Ocj/bEKdRRRevM3eaXNgbzRW+2bTaGOYpU7CaD2gUs4a2lz19 3q0d1n0ivOAYhbprS54BoxZNY1xOvIxkiMq5rVPY X-Received: by 2002:aa7:dd4e:: with SMTP id o14mr14707466edw.104.1631564397579; Mon, 13 Sep 2021 13:19:57 -0700 (PDT) MIME-Version: 1.0 References: <4e2370a9022495c49f3108fe34c5a2b2f4b28dfa.1630684009.git.christophe.leroy@csgroup.eu> <2057e2ab-b303-8ec6-9c43-2c2614591925@csgroup.eu> In-Reply-To: From: Paul Moore Date: Mon, 13 Sep 2021 16:19:46 -0400 Message-ID: Subject: Re: [PATCH] audit: Fix build failure by renaming struct node to struct audit_node To: LEROY Christophe Cc: Eric Paris , "linux-kernel@vger.kernel.org" , "linux-audit@redhat.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 7, 2021 at 11:45 AM LEROY Christophe wrote: > > -----Message d'origine----- > > De : Paul Moore > > On Mon, Sep 6, 2021 at 2:41 AM LEROY Christophe > > wrote: > > > Le 03/09/2021 =C3=A0 19:06, Paul Moore a =C3=A9crit : > > > > On Fri, Sep 3, 2021 at 11:48 AM Christophe Leroy > > > > wrote: > > > >> > > > >> struct node defined in kernel/audit_tree.c conflicts with struct > > > >> node defined in include/linux/node.h > > > >> > > > >> CC kernel/audit_tree.o > > > >> kernel/audit_tree.c:33:9: error: redefinition of 'struct = node' > > > >> 33 | struct node { > > > >> | ^~~~ > > > >> In file included from ./include/linux/cpu.h:17, > > > >> from ./include/linux/static_call.h:102, > > > >> from ./arch/powerpc/include/asm/machdep.= h:10, > > > >> from ./arch/powerpc/include/asm/archrand= om.h:7, > > > >> from ./include/linux/random.h:121, > > > >> from ./include/linux/net.h:18, > > > >> from ./include/linux/skbuff.h:26, > > > >> from kernel/audit.h:11, > > > >> from kernel/audit_tree.c:2: > > > >> ./include/linux/node.h:84:8: note: originally defined her= e > > > >> 84 | struct node { > > > >> | ^~~~ > > > >> make[2]: *** [kernel/audit_tree.o] Error 1 > > > >> > > > >> Rename it audit_node. > > > >> > > > >> Signed-off-by: Christophe Leroy > > > >> --- > > > >> kernel/audit_tree.c | 20 ++++++++++---------- > > > >> 1 file changed, 10 insertions(+), 10 deletions(-) > > > > > > > > That's interesting, I wonder why we didn't see this prior? Also as > > > > an aside, there are evidently a good handful of symbols named > > > > "node". In fact I don't see this now in the audit/stable-5.15 or > > > > Linus' tree as of a right now, both using an allyesconfig: > > > > > > > > % git show-ref HEAD > > > > a9c9a6f741cdaa2fa9ba24a790db8d07295761e3 refs/remotes/linus/HEAD % > > > > touch kernel/audit_tree.c % make C=3D1 kernel/ > > > > CALL scripts/checksyscalls.sh > > > > CALL scripts/atomic/check-atomics.sh > > > > DESCEND objtool > > > > CHK kernel/kheaders_data.tar.xz > > > > CC kernel/audit_tree.o > > > > CHECK kernel/audit_tree.c > > > > AR kernel/built-in.a > > > > > > > > What tree and config are you using where you see this error? > > > > Looking at your error, I'm guessing this is limited to ppc builds, > > > > and if I look at the arch/powerpc/include/asm/machdep.h file in > > > > Linus tree I don't see a static_call.h include so I'm guessing this > > > > is a -next tree for ppc? Something else? > > > > > > > > Without knowing the context, is adding the static_call.h include in > > > > arch/powerpc/include/asm/machdep.h intentional or simply a bit of > > > > include file creep? > > > > > > struct machdep_calls in asm/machdep.h is full of function pointers an= d > > > I'm working on converting that to static_calls > > > (https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=3D260= 878 > > > &state=3D*) > > > > > > So yes, adding static_call.h in asm/machdep.h is intentional and the > > > issue was detected by CI build test > > > (http://kisskb.ellerman.id.au/kisskb/buildresult/14628100/) > > > > > > I submitted this change to you because for me it make sense to not > > > re-use globably defined struct names in local C files, and anybody ma= y > > > encounter the problem as soon as linux/node.h gets included directly > > > or indirectly. But if you prefer I guess the fix may be merged throug= h > > > powerpc tree as part of this series. > > > > Yes, this patch should go in via the audit tree, and while I don't have= an > > objection to the patch, whenever I see a patch to fix an issue that is = not visible in > > Linus' tree or the audit tree it raises some questions. I usually hope= to see those > > questions answered proactively in the cover letter and/or patch descrip= tion but > > that wasn't the case here so you get to play a game of 20 questions. > > > > Speaking of which, I don't recall seeing an answer to the "where do the= se > > include file changes live?" question, is is the ppc -next tree, or are = they still > > unmerged and just on the ppc list? > > It is still an RFC in the ppc list. I just merged this into audit/next but I rewrote chunks of the subject line and commit description as the build failure isn't yet "real" as the offending patch is still just a RFC. Hopefully be merging this patch into audit/next now we'll prevent future problems if/when the other patch is merged. --=20 paul moore www.paul-moore.com