Re: [PATCH] vdso/datastore: Zero out newly allocated datastore pages
From: Thomas Gleixner
Date: Thu Apr 09 2026 - 16:25:35 EST
On Thu, Apr 09 2026 at 13:17, Thomas Weißschuh wrote:
>> The data pages need to be zeroed initially, as garbage data can break
>> the vDSO userspace logic.
>>
>> Fixes: 05988dba1179 ("vdso/datastore: Allocate data pages dynamically")
>> Link: https://lore.kernel.org/lkml/aQjJNmwniQwwjeBR@xxxxxxxxxxxxxxxxxxxxxxxx/
>> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
>> ---
>> I messed up and dropped __GFP_ZERO again when switching from folio_alloc() to
>> alloc_pages() in v6 of "sparc64: vdso: Switch to the generic vDSO library"
>> Previously the missing __GFP_ZERO triggered boot-failures in -next, but
>> apparently with alloc_pages() we got "lucky" so far.
>
> ... I panicked a bit after looking at the code again and not seeing the
> explicit zeroing. The actually works fine, as the memcpy() from the static
> vdso_initdata will do the zeroing.
>
> Sorry for the noise.
Happens to all of us. Better safe than sorry six weeks down the road.