Re: [PATCH v3 09/20] kbuild: implement and use depcheck to check dependency timestamps
From: Kees Cook
Date: Sat Sep 19 2026 - 23:48:09 EST
On Sat, Sep 19, 2026 at 06:02:46PM +0100, Lorenzo Stoakes (ARM) wrote:
> On Thu, Sep 17, 2026 at 01:59:26PM -0700, Kees Cook wrote:
> > So, yeah, it makes me nervous, and it may make incremental builds less
> > idempotent. But I can't really find extant problems and the demo is
> > slightly contrived, but not exactly an impossible situation.
>
> Ack thanks for this!
>
> There is definitely an issue here, your example is fine in the stock kernel
> but one run late in v3.
>
> Solution is to have depcheck treat any dependency that is itself a target
> of the same run as never being 'fresh' (it already reads every .cmd file in
> the directory so has all the dependency information it needs), so that's
> fixed in v4.
>
> Confirmed that it fixes the demo'd bug here, that touching a header
> rebuilds exactly the same objects as it did before and that noop build perf
> was not harmed by the change.
Oh very nice! Thank you for finding a solution there. :)
--
Kees Cook