[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251118112338.GDaRxXOqONunUHGgV6@fat_crate.local>
Date: Tue, 18 Nov 2025 12:23:38 +0100
From: Borislav Petkov <bp@...en8.de>
To: Sohil Mehta <sohil.mehta@...el.com>
Cc: x86@...nel.org, Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Jonathan Corbet <corbet@....net>,
"H . Peter Anvin" <hpa@...or.com>,
Andy Lutomirski <luto@...nel.org>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ard Biesheuvel <ardb@...nel.org>,
"Kirill A . Shutemov" <kas@...nel.org>, Xin Li <xin@...or.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Sean Christopherson <seanjc@...gle.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
Vegard Nossum <vegard.nossum@...cle.com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Randy Dunlap <rdunlap@...radead.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Kees Cook <kees@...nel.org>, Tony Luck <tony.luck@...el.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-efi@...r.kernel.org
Subject: Re: [PATCH v12 6/8] x86/traps: Communicate a LASS violation in #GP
message
On Mon, Nov 17, 2025 at 11:45:38AM -0800, Sohil Mehta wrote:
> Would this update to the comment help clarify?
Yap, that LGTM.
> /*
> * A NULL pointer dereference usually causes a #PF. However, it
> * can result in a #GP when LASS is active. Provide the same
> * hint in the rare case that the condition is hit without LASS.
> */
> if (*addr < PAGE_SIZE)
> return GP_NULL_POINTER;
>
> /*
> * Assume that LASS caused the exception, because the address is
> * canonical and in the user half.
> */
> if (cpu_feature_enabled(X86_FEATURE_LASS))
> return GP_LASS_VIOLATION;
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists