From: Palmer Dabbelt <palmer@rivosinc.com>
To: Andrew Morton <akpm@linux-foundation.org>,
John Hubbard <jhubbard@nvidia.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alexghiti@rivosinc.com>,
Andrew Jones <ajones@ventanamicro.com>,
Hugh Dickins <hughd@google.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Qinglin Pan <panqinglin2020@iscas.ac.cn>,
linux-riscv@lists.infradead.org, linux-mm@kvack.org,
LKML <linux-kernel@vger.kernel.org>,
James Houghton <jthoughton@google.com>,
Ryan Roberts <ryan.roberts@arm.com>
Subject: Re: [PATCH] mm: riscv: fix an unsafe pte read in huge_pte_alloc()
Date: Wed, 05 Jul 2023 16:38:27 -0700 [thread overview]
Message-ID: <168860030766.22647.15542339368600249770.b4-ty@rivosinc.com> (raw)
In-Reply-To: <20230703190044.311730-1-jhubbard@nvidia.com>
On Mon, 03 Jul 2023 12:00:44 -0700, John Hubbard wrote:
> The WARN_ON_ONCE() statement in riscv's huge_pte_alloc() is susceptible
> to false positives, because the pte is read twice at the C language
> level, locklessly, within the same conditional statement. Depending on
> compiler behavior, this can lead to generated machine code that actually
> reads the pte just once, or twice. Reading twice will expose the code to
> changing pte values and cause incorrect behavior.
>
> [...]
Applied, thanks!
[1/1] mm: riscv: fix an unsafe pte read in huge_pte_alloc()
https://git.kernel.org/palmer/c/62ba41d27612
Best regards,
--
Palmer Dabbelt <palmer@rivosinc.com>
next prev parent reply other threads:[~2023-07-05 23:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 19:00 John Hubbard
2023-07-04 6:01 ` Andrew Jones
2023-07-04 7:06 ` Ryan Roberts
2023-07-05 23:38 ` Palmer Dabbelt [this message]
2023-07-05 23:50 ` patchwork-bot+linux-riscv
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=168860030766.22647.15542339368600249770.b4-ty@rivosinc.com \
--to=palmer@rivosinc.com \
--cc=ajones@ventanamicro.com \
--cc=akpm@linux-foundation.org \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=hughd@google.com \
--cc=jhubbard@nvidia.com \
--cc=jthoughton@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=panqinglin2020@iscas.ac.cn \
--cc=paul.walmsley@sifive.com \
--cc=ryan.roberts@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