From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24EC0378814 for ; Fri, 3 Jul 2026 10:06:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783073212; cv=none; b=ekosGKkYJ074DgL7V5inA7W4bjEW5tywIh2xXum+DzhF+IfUkuqwlsS/aR95pMU82bGA5fOIK64Ui2v+kFJBNbEJhXBsafWewew9YoavmF2pXKSo0udTnMUZWwVRnzwzL/o/oa889dPk4ObPIZUmaMT64qfwDoMJ0vtbF2xaZU0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783073212; c=relaxed/simple; bh=laBEFR0I3RWvs1+Is2iqG1fnTejy7x7hXOUjl6aoww4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fCSOaS2knsKmlIRZo/KUkMZvM9pCSrm48Z2IWiGTxTHLRZS+B0tJ5ELc/ZIaUtg168xsEGcR36oYIOneBo8PfC0XoQ7U3utZVPjAzSL3l6wFEd32eBbt2iouMVnW2MaozMhSkyFI+0XXO6y+e0Dqvcj2c1pL+Uj7oIAqZHP5ti0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=AXSqgqyP; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="AXSqgqyP" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-493c733f15aso3537295e9.0 for ; Fri, 03 Jul 2026 03:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1783073208; x=1783678008; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=yYQ94JtDIgj0sKRw/RmLXkJVierqwHbIhkMFu0H0wXY=; b=AXSqgqyPkphxZTpDJjdfE/o0kG7+xOXP741IGKwTN9NxNBPQaNgzZ9tesMhVLMQb4b zn7mvGPDPSpB4EhOQBUSwSZpzM/uodes4u2rr0ewOgkNuCnAVrOFapNFvdUSJMrHsvTU TjZp4qmoJPME64API5/BTz1uKPR5sYwcW0x83JLycC7vFcm7puBQ/ZhDjVXFobcc+aTi 7yaHP3V3njXIqPG7Veb6yxmrVnPO1wiJIr7W0BuAs5GhVzdTiSlfytvmjDwLcmdH0r9s LRZdvhpzo0gnCDkuxRDwh/JIOc96x2bFCJ5PNsFUMx0tFVbPiDx/osMGur4B2MBNfRjO itnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783073208; x=1783678008; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yYQ94JtDIgj0sKRw/RmLXkJVierqwHbIhkMFu0H0wXY=; b=CZdkU41QoRJI/kB2OpwdKQOyYMKzq2Qc6ZbXihDaHK+aAkQMFY2LNPfwlgQSpx2FV3 OFgs11QBBOiWyg9YyJTe9b8i7p9kq0m4kgZxZ7V/+Sew41d9vkYcalpJQzz14c87aIOw WPepth71inYTnao4OykXsWddyglw8KcS3F2iq8y4eZ05WC55Vzxcg/KIlLxT5j3d30+B nD6LkJighRre0bJW9fiDqQhMdxiXzcsZCTrhRIGB4MBbp+8MOypMRSamMT4LLSVwKSE6 Pcouyev47muES/vYRO3D16puQR1Z7tNuzEyTfYPGH9H7fVDfFTJTL9nQBml8spqDGln1 zMYw== X-Forwarded-Encrypted: i=1; AFNElJ/W8BFX/1ukBP56zdRnQrIyE5U2csH7A2bst6gkDxcKld83WgW91NdliRYVdtyxPVnw5JbsaKKxda8rTtk=@vger.kernel.org X-Gm-Message-State: AOJu0YwuD+r2YwaRei+cY1ZXwoAMx15amtndTjYn0Il+t5RMX8FrVp6e HDPkMQo07/4/JfHy/RVCq0CbX9F4aSfmKWZdbz6U48Ua7dKLQwUK3VCFa6c0kV2E07o= X-Gm-Gg: AfdE7ckksvktTGXW1uGHVuGebZd6mJHU/8kjQAIp3Z5dE3q3E9Paw4KSSMctrYlikSA 6tjpd0VKXeEPuaFF4IlXKHhwWRX2O8x45IHO3MzYL0QT5C5+5p8jb2GR8PtxqL7+8mlRISZEgNI Bjh2ehxlR+nH8+5TpdawuFRqtPqMZf1dwLGgWZGXICpX1HOfM4SOWmnl+QRwo6oni/j3EBy2WWM wxdzHls1ir5HQsY7/MRd+yznxFBGCjQXM6mdmYFShMmPs4eQeEpDWPoXyv1AOXpPSPX3sv9/RrR 7e2HegR2GfkiEESGP/1vGRUn7Wuy5muJ8DIjeRoFUMDFM94V91EwqdAafoU/V5UoZddknqo/Lt6 2fcOEmEoTSFDFmIPuGUnGjyhN/Y358fmCsn/jaTDPAPQrmhW5b4xW0tHN978MYwfVYWYkCng9Tj F0XHKCuDco3L+9+74= X-Received: by 2002:a05:600c:350f:b0:490:b8c0:d470 with SMTP id 5b1f17b1804b1-493c2b6e607mr144501925e9.19.1783073208553; Fri, 03 Jul 2026 03:06:48 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493bef183e7sm222444665e9.2.2026.07.03.03.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2026 03:06:48 -0700 (PDT) Date: Fri, 3 Jul 2026 12:06:46 +0200 From: Petr Mladek To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: sashiko-reviews@lists.linux.dev, Nathan Chancellor , Nicolas Schier , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Miroslav Benes , shuah@kernel.org, Zelin Deng , linux-kbuild@vger.kernel.org Subject: Re: [PATCH] kbuild: unset sub_make_done before calling kselftest build system Message-ID: References: <20260703-makefile-unset-submake-done-v1-1-6899248f3d6a@linutronix.de> <20260703061449.246801F000E9@smtp.kernel.org> <20260703113019-678f1eb6-a061-435e-91a4-c0d76794b2cf@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260703113019-678f1eb6-a061-435e-91a4-c0d76794b2cf@linutronix.de> On Fri 2026-07-03 11:32:30, Thomas Weißschuh wrote: > On Fri, Jul 03, 2026 at 10:26:07AM +0200, Petr Mladek wrote: > > On Fri 2026-07-03 06:14:48, sashiko-bot@kernel.org wrote: > > > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > > > - [Medium] Incomplete fix and inconsistent state: The patch correctly unsets `sub_make_done` for the `kselftest` targets to allow Kbuild command-line reevaluation when building external kernel modules. However, it fails to apply the same logic to the `tools/` and `tools/%` targets, introducing a discrepancy between build entry points. > > > -- > > > > > > commit 06c418388d65deb3d8494a6e8e7071c0e709186b > > > Author: Thomas Weißschuh > > > > > > kbuild: unset sub_make_done before calling kselftest build system > > > > > > This commit unsets sub_make_done before invoking the kselftest build system to > > > ensure Kbuild reevaluates command-line flags when building test modules. It > > > mirrors a previous fix done for scripts/install.sh. > > > > > > > diff --git a/Makefile b/Makefile > > > > index b9c5792c79e01..f717a4dc96d6a 100644 > > > > --- a/Makefile > > > > +++ b/Makefile > > > > @@ -1591,10 +1591,10 @@ tools/%: FORCE > > > > > > > > PHONY += kselftest > > > > kselftest: headers > > > > - $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests > > > > + $(Q)unset sub_make_done; $(MAKE) -C $(srctree)/tools/testing/selftests run_tests > > > > > > [Severity: Medium] > > > Will make tools/selftests still fail after this change? > > > > > > The tools/ and tools/% targets in Makefile delegate to the tools build > > > system, which can also trigger external kernel module builds (like bpf_testmod). > > > > > > Because sub_make_done is not unset for these targets, invoking commands like > > > make tools/selftests or make tools/all will skip Kbuild's M= argument parsing. > > > > > > Should sub_make_done also be unset in the tools/ and tools/% targets to maintain > > > consistency across the build entry points? > > > > This might make sense. I see that the tools: and tools/%: targets are > > defined right above the kselftest*: ones. And they are even advertised > > in "make help" or "make tools/help". > > I am not sure how the tools/ targets can reach back into kbuild. > The example with bpf_testmod above is bogus, as tools/* is only for > top-level tools directories. Subdirectories in tools/testing/selftests/ > don't seem to be reachable. I see. > > Well it probably should be done in a separate patch. It would be better > > for bisecting potential regressions. Thomas, Zelin, what do you think, please? > > If we do it for consistency it should be its own patch, agreed. I would keep it as is until anyone reports a real problem. Thanks a lot for explanation. Best Regards, Petr