public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vdso/datastore: Zero out newly allocated datastore pages
Date: Thu, 09 Apr 2026 22:21:36 +0200	[thread overview]
Message-ID: <87ik9z28bz.ffs@tglx> (raw)
In-Reply-To: <20260409131620-8b31cf24-e2da-4650-a3f6-97a35fdaeb36@linutronix.de>

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@finisterre.sirena.org.uk/
>> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>> ---
>> 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.

      reply	other threads:[~2026-04-09 20:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 11:14 [PATCH] vdso/datastore: Zero out newly allocated datastore pages Thomas Weißschuh
2026-04-09 11:17 ` Thomas Weißschuh
2026-04-09 20:21   ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ik9z28bz.ffs@tglx \
    --to=tglx@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox