Subject: Re: [PATCH bpf-next] bpf: Replace scratch PTE atomically when allocating arena pages

From: Tejun Heo <[email-masked]>
Date: Tue, 02 Jun 2026 12:09:11 -1000

On Mon, Jun 01, 2026 at 08:15:34PM +0000, [email-masked] wrote:
> After the real page is installed without a flush, can that stale
> kaddr -> scratch_page translation persist, so that later kernel-side
> accesses at kaddr reach the shared per-arena scratch page instead of
> the freshly allocated page?

It can on x86, but it's harmless: that CPU faulted on an unallocated
address and got scratch-recovered, so reaching either the scratch or the
real page is fine. No flush needed.

Thanks.

--
tejun