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

From: Tejun Heo

Date: Tue Jun 02 2026 - 18:09:20 EST


On Mon, Jun 01, 2026 at 08:15:34PM +0000, bot+bpf-ci@xxxxxxxxxx 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