From: Sohil Mehta <sohil.mehta@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: <x86@kernel.org>, Dave Hansen <dave.hansen@linux.intel.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"H . Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ard Biesheuvel <ardb@kernel.org>,
"Kirill A . Shutemov" <kas@kernel.org>, Xin Li <xin@zytor.com>,
David Woodhouse <dwmw@amazon.co.uk>,
Sean Christopherson <seanjc@google.com>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
Vegard Nossum <vegard.nossum@oracle.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Randy Dunlap <rdunlap@infradead.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Kees Cook <kees@kernel.org>, Tony Luck <tony.luck@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-efi@vger.kernel.org>
Subject: Re: [PATCH v12 6/8] x86/traps: Communicate a LASS violation in #GP message
Date: Mon, 17 Nov 2025 09:24:20 -0800 [thread overview]
Message-ID: <bfce23cc-bf7f-494e-a443-baea41f33381@intel.com> (raw)
In-Reply-To: <20251117144840.GIaRs1yNEYjdNF0SHu@fat_crate.local>
On 11/17/2025 6:48 AM, Borislav Petkov wrote:
> Why is the first page frame special to justify a special check?
>
Any dereference to a very low address (the first page frame) is
typically considered as a "NULL" pointer dereference.
$ git log | grep "BUG: kernel NULL pointer dereference"
BUG: kernel NULL pointer dereference, address: 0000000000000000
BUG: kernel NULL pointer dereference, address: 0000000000000010
BUG: kernel NULL pointer dereference, address: 0000000000000008
BUG: kernel NULL pointer dereference, address: 0000000000000008
BUG: kernel NULL pointer dereference, address: 0000000000000040
BUG: kernel NULL pointer dereference, address: 0000000000000264
BUG: kernel NULL pointer dereference, address: 0000000000000000
BUG: kernel NULL pointer dereference, address: 0000000000000098
BUG: kernel NULL pointer dereference, address: 0000000000000000
BUG: kernel NULL pointer dereference, address: 00000000000003c0
The page fault error messages have similar logic:
if (address < PAGE_SIZE && !user_mode(regs))
pr_alert("BUG: kernel NULL pointer dereference, address: %px\n",
(void *)address);
I believe the check is to account for arithmetic or other operations
that may have happened on the "NULL" pointer before it is dereferenced.
next prev parent reply other threads:[~2025-11-17 17:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 22:41 [PATCH v12 0/8] x86: Enable base Linear Address Space Separation support Sohil Mehta
2025-11-13 22:41 ` [PATCH v12 1/8] x86/cpufeatures: Enumerate the LASS feature bits Sohil Mehta
2025-11-13 22:41 ` [PATCH v12 2/8] x86/cpu: Add an LASS dependency on SMAP Sohil Mehta
2025-11-13 22:41 ` [PATCH v12 3/8] x86/asm: Introduce inline memcpy and memset Sohil Mehta
2025-11-13 22:42 ` [PATCH v12 4/8] x86/alternatives: Disable LASS when patching kernel code Sohil Mehta
2025-11-13 22:42 ` [PATCH v12 5/8] x86/kexec: Disable LASS during relocate kernel Sohil Mehta
2025-11-13 22:42 ` [PATCH v12 6/8] x86/traps: Communicate a LASS violation in #GP message Sohil Mehta
2025-11-17 14:48 ` Borislav Petkov
2025-11-17 17:24 ` Sohil Mehta [this message]
2025-11-17 18:29 ` Borislav Petkov
2025-11-17 19:45 ` Sohil Mehta
2025-11-18 11:23 ` Borislav Petkov
2025-11-13 22:42 ` [PATCH v12 7/8] selftests/x86: Update the negative vsyscall tests to expect a #GP Sohil Mehta
2025-11-13 22:42 ` [PATCH v12 8/8] x86/cpu: Enable LASS during CPU initialization Sohil Mehta
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=bfce23cc-bf7f-494e-a443-baea41f33381@intel.com \
--to=sohil.mehta@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw@amazon.co.uk \
--cc=geert@linux-m68k.org \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=kas@kernel.org \
--cc=kees@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vegard.nossum@oracle.com \
--cc=x86@kernel.org \
--cc=xin@zytor.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