The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Matt Fleming <matt@readmodwrite.com>
To: Rik van Riel <riel@surriel.com>
Cc: "Henrik Böving" <henrik@lean-fro.org>,
	dave.hansen@linux.intel.com, luto@kernel.org,
	peterz@infradead.org, linux-kernel@vger.kernel.org,
	"Sebastian Ullrich" <sebastian@lean-fro.org>,
	"Joscha Mennicken" <joscha@lean-fro.org>,
	kernel-team@cloudflare.com
Subject: Re: PROBLEM: Probabilistic segfault on AMD hardware with INVLPGB
Date: Tue, 7 Jul 2026 13:18:30 +0100	[thread overview]
Message-ID: <akzuETUv5XEFSRL6@matt-Precision-5490> (raw)
In-Reply-To: <a8f05711934e3341f03a639c9586c3782a2dd148.camel@surriel.com>

Hi Rik and Henrik,

I've got a small C reproducer that triggers this within the first round
on Cloudflare's AMD Turin machines:

  https://gist.github.com/mfleming/ca26ad3f8d65a12d23d62fb176480fc1

Build:

  gcc -O2 -Wall -Wextra -pthread -static -o repro-invlpgb repro-invlpgb.c

Run:

  ./repro-invlpgb --batch --rounds 20 --jobs 32 -d 5 -w 8 -m 2 -s 512 -q

The mutator side holds a pthread rwlock write lock while doing
munmap() + mmap(MAP_FIXED) on the same VA and filling the range with
{cookie, slot, generation, offset} markers. Reader threads hold the read
lock while checking those markers.

The failure mode is usually a CORRUPTION line rather than a direct
SIGSEGV: a read from one virtual offset returns a valid marker for a
different offset. That looks consistent with a stale or wrong translation
after VA reuse.

Thanks,
Matt

  reply	other threads:[~2026-07-07 12:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-19 13:17 PROBLEM: Probabilistic segfault on AMD hardware with INVLPGB Henrik Böving
2026-06-22 19:00 ` Rik van Riel
2026-06-23 12:28   ` Henrik Böving
2026-06-23 13:47     ` Andrew Cooper
2026-06-23 15:59     ` Rik van Riel
2026-07-07 12:18       ` Matt Fleming [this message]
2026-07-07 13:45         ` Henrik Böving
2026-07-07 14:11         ` Rik van Riel
2026-07-08 14:51           ` Dave Hansen
2026-07-07 16:44         ` Rik van Riel
2026-07-08 15:27         ` Rik van Riel
2026-07-08 15:51           ` Borislav Petkov
2026-07-08 16:17         ` Borislav Petkov
2026-07-09  7:21           ` Matt Fleming
2026-07-09 19:17             ` Borislav Petkov

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=akzuETUv5XEFSRL6@matt-Precision-5490 \
    --to=matt@readmodwrite.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=henrik@lean-fro.org \
    --cc=joscha@lean-fro.org \
    --cc=kernel-team@cloudflare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=sebastian@lean-fro.org \
    /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