From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796411910; b=o/67Xc7CvAgDEG4+ijsZTcHYN5yJbIOH253wXdVhvU6V01JW5WIvsMSIg5YAHVg5L5x3 Xj23LFJG5Cruho3IrdCM67errRsHU0ncPywpAtt8ggKYrnPebuwW5KzYbRXVLNyJDPoH8 QpO7vpWgIOph6ySqKhnU07rmOLnz3Y4TuO7groKsN6B+AC2xcgr7Rc790rSNKvWTF/DEW GmYhwkDBAkEHkt6+7azWHLyGVlmS3TDV/H2jri0ChbelIjsufwe+egWJdEF55RZFEomJo Enh5TSB26hg6RmZxuCUUQg6fuVWcySll6kkj2QjuPwXOx4TKKmXOV3Wymk9yeq6QAkg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796411910; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=7Z3mTvOIPnMSgYwHbAx0TjBI4rJ7VJnlq7mLdkxQl1Q=; b=RjCDOMPV9pT/ZY+zqb6H/6f5aUpQDZPAwkTEwsRGo1cv7tBVQT23YZA+nV5z6ap8/V1o KaHcmeFrkSWrJP1PXUXfelBxqiMTuFqvDYDA2HAQGF4ajwqbbxYNCNb6YofSLqvwtjiT9 37VoHWrHNyvguDp9NJGC4PpPXAoQdztvuNi11CyTTPfdJwxGPhRqGn6Ndi8SEp/6L5rQk yYxC5T2Fg9RtYfxX+TMadsa1bel/tuYrpl+39dj9x53KRnt0FR+xfmkLtMyqpP6HW2lWt RsAbU6HUmyfEldB9UtqMyhnC36uF5bzGc1ioR0+hjIqV+cXjGv3uclKMPwkthTQlZnw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LbKT+nQ1; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CE9C606A322 for ; Fri, 4 Dec 2026 19:18:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LbKT+nQ1 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 209231F00936; Fri, 4 Dec 2026 19:18:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796411910; bh=7Z3mTvOIPnMSgYwHbAx0TjBI4rJ7VJnlq7mLdkxQl1Q=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=LbKT+nQ1a/gI8uCuyaOJ/VretFJ9df8YUWBnvp1RiHHMfTJiU60kY9H+eBk6EuQfY mYLURvHdgNTVxNOKkiEVYn4y71zU7ur9fQRG/5e8C9wjRHEHFuA1wWJ/qO/P8/BTO5 Tp40Vez23oyKwHVJclDATtPqTllfX1FdZQeDKVVdFyPFtuT8kXSDUgC0yv66VKIhwJ U+33z97U0BLc62C8yXqYn6kISgCjcQVNsKctFYcS7RxZRr9AF6444eqe81Q41ha0v9 OpAptvDRm8gPGqKk77127wumGzVt0zE6sPQgEx3kLMbn+j4maHgaV3ozk+XhA0juEi J6rb6pCGjMP5A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] kbuild: serialize scripts after scripts_unifdef Reply-To: sashiko-reviews@lists.linux.dev To: "HONG Yifan" , "Nathan Chancellor" , "Nicolas Schier" Cc: "Masahiro Yamada" , linux-kbuild@vger.kernel.org, kernel-team@android.com In-Reply-To: <20261203191820.2576904-1-elsk@google.com> References: <20261203191820.2576904-1-elsk@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 19:18:29 +0000 X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] kbuild: scripts and recursive scripts_unifdef still race on ARCH=3Dum -- commit 4bf37da0ae8b1fb30389763a88c140890a30608d Author: HONG Yifan kbuild: serialize scripts after scripts_unifdef This commit adds scripts_unifdef as a prerequisite of scripts under CONFIG_HEADERS_INSTALL to serialize the two targets during parallel builds. > diff --git a/Makefile b/Makefile > index 5aac6f1b011e1..787e041b5d7e3 100644 > --- a/Makefile > +++ b/Makefile > @@ -1518,6 +1518,7 @@ endif > =20 > ifdef CONFIG_HEADERS_INSTALL > prepare: headers > +scripts: scripts_unifdef > endif > =20 > PHONY +=3D scripts_gen_init_cpio [Severity: Medium] Can scripts still race with scripts_unifdef on ARCH=3Dum? Adding scripts: scripts_unifdef orders scripts after the outer scripts_unifdef, but not after headers. On ARCH=3Dum with CONFIG_HEADERS_INSTALL=3Dy, arch/um/Makefile defines HEADER_ARCH, so headers spawns a recursive make headers that runs scripts_unifdef again: scripts headers $(MAKE) $(build)=3Dscripts $(MAKE) ... SRCARCH=3D$(HEADER_ARCH) headers scripts_unifdef $(MAKE) $(build)=3Dscripts scripts/unifdef cmd_and_fixdep writes -include scripts/.*.cmd scripts/.*.cmd <-- missing separator Both $(build)=3Dscripts invocations include .cmd files for all existing hostprogs in scripts/ via scripts/Makefile.build, while cmd_and_fixdep writes them non-atomically via shell redirection. The recursive scripts_unifdef can read a partial .cmd file and fail with missing separato= r. With CONFIG_WERROR=3Dy (such as ARCH=3Dum allmodconfig), the recursive head= ers sub-make skips auto.conf and drops -Werror and -Wl,--fatal-warnings, so recursive scripts_unifdef also recompiles scripts/unifdef and rewrites scripts/.unifdef.cmd concurrently with scripts. Ordering scripts after headers under CONFIG_HEADERS_INSTALL would serialize both invocations. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203191820.2576= 904-1-elsk@google.com?part=3D1