Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp59600ioo; Wed, 25 May 2022 20:42:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwi3BsYSQQd65NKUJA43lW96jzPwLXzk7/KDgdynAViEHIF+fnoFyyg0pRLjzUurBlpVjR X-Received: by 2002:a17:902:e841:b0:161:b2da:a5b5 with SMTP id t1-20020a170902e84100b00161b2daa5b5mr34889619plg.43.1653536546487; Wed, 25 May 2022 20:42:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653536546; cv=none; d=google.com; s=arc-20160816; b=l2yOHxVHphbN1RgVzoQhbuMTtqPiYgniWriigN6utGzdanz7IxRcXvwgdI6GfiCegy 71YLr/gsHOJ8Kl0dicoLjnXXVwBdOaMfHs5iiThkPMRpaQXMGNfzXKxQpWtjR80LSGWA pBbjuWee65GmIKX/7azNST7fS8PtOL7MIs1tFSjQdagOd5Z9MeV/r7kCf8/0li5L21jP KwTZiBAb4ZGIukO3zUkw4au15rl3MJzR8cNeDnv22vTOmZ+oQGwWYWuLy9E4pA6D7NC9 7ok8MoyQa95KAzLVKErOdvB/lWLpS7osaMQGeHSFSgFrdHSZlvrRxjSDdcdPm4DmGku/ bjTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=oz2gVkV0rfGCK+wdnxIRVq+wPrFjy2J+zLB3pC3weio=; b=erN1S0HVFKvdGqrjuxaj3gEJOmm0Kc5wKstkLaEjFR5CrYjydA1OUzH61jDGBzwwWX X9GURTZkTM912cp4y5ZeutGXIj0mq9xap2bTWGGsbH7GfBFSrS3o/DrnonNxEjBZYWrm W4g9EHTvFYsDTcr4L72wRzkDgSn8dFoWxP4SDe6B/ocviWu3y3vo5uydvz5XSDcpRLir rAbZZsj93V0JdDJogLAaSntGnPTAsD8I8lWz2Pk7JEmxYSjnabYyIZrwalIxHyarX6Km aLI+cGEVdosas2EGG6qrB5ruOnheDhbXDDjQOkxvLTtsq2z/aalJbqB3gTiZ9bQ6g7ZL p8Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wCoRfmCb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x20-20020a1709027c1400b0015848a89d82si492903pll.107.2022.05.25.20.42.15; Wed, 25 May 2022 20:42:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wCoRfmCb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244670AbiEYWnI (ORCPT + 99 others); Wed, 25 May 2022 18:43:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245437AbiEYWnF (ORCPT ); Wed, 25 May 2022 18:43:05 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 277A5A339D for ; Wed, 25 May 2022 15:43:04 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id p22so38183654lfo.10 for ; Wed, 25 May 2022 15:43:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=oz2gVkV0rfGCK+wdnxIRVq+wPrFjy2J+zLB3pC3weio=; b=wCoRfmCbsxPE19Zmdw6DveiRBya3gLcbPlkCQYJ7N/7yJQLRx8NAwqara8WXe8tq/P 7ASVnP6pM7uRxH/yKf6GevmzNtwNP9eOTBanOIHO7McHyYS6UQc4498QARj3NhkhyQi4 DWO8di2RJlvJrwGP7g3eQA6l8yJsxaozcbWBVe/+NpD0KSwgUGxPK11xgV7ztKWN0G57 pcuZNQ/p0OOspIeOC1NR3n15KY9Yfv+WKI3DOFZlPd5UmrjSy2cSr0MpRucPCxYUwV60 z0c4jH+te97AyRx4G1tpAuhALhlcwjmo1KWiRXaeyyxZFRjZaPEOKd8D7mz95QY4c7Ti Om3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=oz2gVkV0rfGCK+wdnxIRVq+wPrFjy2J+zLB3pC3weio=; b=nYJcu31EgUzuQa3ijQuPyW+KxFx2AqGLcHbsKDQLqgM+JqxH98scCsL0Pr7hWpB+E/ tONKmaxRiExx9lWtKsEIKe7jqBMhOPzF/Avmt2dNtIoOqFY4MYmPqHzK+C/aPFbOIUcd 913qhoir5s1pH6z5XI1y4l4KFNOD/JbsqwFTLRan6xqMIBmDp2IbU6zRItm4nO7gigWD McPgVxLisvBEBGOHtwJb4VHZ7xoHAgNyV+CjIPlw9ngAtAKtDpEyP3LqAQ6TKksFzB9N Aq2D/UhXcU4puEw0LhEDjSQA44nsJ+AD1cPAmemCnBc2YApN6lwuiLngjyiAmsGlpUsc TL+g== X-Gm-Message-State: AOAM532CiftSyziq3Q2eA+ntNNcCiA2I1qUEUPoIKiXNT9JFsnkCAKPt ++PLecD8FmI15H+tyWe5c/QQs13Sj8eRow== X-Received: by 2002:a05:6512:12c9:b0:477:c583:ed10 with SMTP id p9-20020a05651212c900b00477c583ed10mr4278948lfg.20.1653518581956; Wed, 25 May 2022 15:43:01 -0700 (PDT) Received: from mutt (c-7303e555.07-21-73746f28.bbcust.telenor.se. [85.229.3.115]) by smtp.gmail.com with ESMTPSA id g7-20020a056512118700b0047255d21104sm3286144lfr.51.2022.05.25.15.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 May 2022 15:43:01 -0700 (PDT) Date: Thu, 26 May 2022 00:42:59 +0200 From: Anders Roxell To: Kees Cook Cc: Guenter Roeck , Alexander Popov , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: Re: [PATCH] gcc-plugins: Change all version strings match kernel Message-ID: <20220525224259.GA16698@mutt> References: <20220510235412.3627034-1-keescook@chromium.org> <20220523143054.GA3164771@roeck-us.net> <202205231251.39D012E@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202205231251.39D012E@keescook> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-05-23 12:54, Kees Cook wrote: > On Mon, May 23, 2022 at 07:30:54AM -0700, Guenter Roeck wrote: > > On Tue, May 10, 2022 at 04:54:12PM -0700, Kees Cook wrote: > > > It's not meaningful for the GCC plugins to track their versions separately > > > from the rest of the kernel. Switch all versions to the kernel version. > > > > > > Fix mismatched indenting while we're at it. > > > > > > Cc: linux-hardening@vger.kernel.org > > > Signed-off-by: Kees Cook > > > > I see random build failures with this patch in linux-next. > > > > Error log: > > cc1plus: fatal error: ./include/generated/utsrelease.h: No such file or directory > > > > The problem doesn't happen all the time. Is there some missing dependency ? > > Here's a prior report I hadn't been able to repro: > https://lore.kernel.org/linux-mm/202205230239.EZxeZ3Fv-lkp@intel.com > > But now I can: I see it with a -j1 build. This fixes it for me: I could see this issue when I built an arm64 allmodconfig mainline [1] kernel, on sha 7e062cda7d90 ("Merge tag 'net-next-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") To reproduce what I built tuxmake [2] can be used: $ tuxmake --runtime podman --target-arch arm64 --toolchain gcc-11 --kconfig http://ix.io/3YBi kernel > > diff --git a/Makefile b/Makefile > index 91c91fcf3c24..c04420d5aa3d 100644 > --- a/Makefile > +++ b/Makefile > @@ -1175,7 +1175,7 @@ include/config/kernel.release: FORCE > # Carefully list dependencies so we do not try to build scripts twice > # in parallel > PHONY += scripts > -scripts: scripts_basic scripts_dtc > +scripts: include/generated/utsrelease.h scripts_basic scripts_dtc > $(Q)$(MAKE) $(build)=$(@) > > # Things we need to do before we recursively start building the kernel > diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile > index 6f0aecad5d67..c29334669a16 100644 > --- a/scripts/gcc-plugins/Makefile > +++ b/scripts/gcc-plugins/Makefile > @@ -64,5 +64,5 @@ $(foreach m, $(notdir $(plugin-multi)), $(eval $(obj)/$m: $(addprefix $(obj)/, $ > quiet_cmd_plugin_cxx_o_c = HOSTCXX $@ > cmd_plugin_cxx_o_c = $(HOSTCXX) $(plugin_cxxflags) -c -o $@ $< > > -$(plugin-objs): $(obj)/%.o: $(src)/%.c FORCE > +$(plugin-objs): $(obj)/%.o: $(src)/%.c $(objdir)/include/generated/utsrelease.h FORCE > $(call if_changed_dep,plugin_cxx_o_c) > > Both "include/generated/utsrelease.h" and "scripts" were same-level > deps, so they were racing. This patch patch solved the build error. Cheers, Anders [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ [2] https://tuxmake.org/install-pypi/