[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <168860030766.22647.15542339368600249770.b4-ty@rivosinc.com>
Date: Wed, 05 Jul 2023 16:38:27 -0700
From: Palmer Dabbelt <palmer@...osinc.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
John Hubbard <jhubbard@...dia.com>
Cc: Albert Ou <aou@...s.berkeley.edu>,
Alexandre Ghiti <alexghiti@...osinc.com>,
Andrew Jones <ajones@...tanamicro.com>,
Hugh Dickins <hughd@...gle.com>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Qinglin Pan <panqinglin2020@...as.ac.cn>,
linux-riscv@...ts.infradead.org, linux-mm@...ck.org,
LKML <linux-kernel@...r.kernel.org>,
James Houghton <jthoughton@...gle.com>,
Ryan Roberts <ryan.roberts@....com>
Subject: Re: [PATCH] mm: riscv: fix an unsafe pte read in huge_pte_alloc()
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@...osinc.com>
Powered by blists - more mailing lists