From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "Lutomirski, Andy" <luto@kernel.org>,
"alexander.shishkin@linux.intel.com"
<alexander.shishkin@linux.intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"Shankar, Ravi V" <ravi.v.shankar@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Luck, Tony" <tony.luck@intel.com>,
"Mehta, Sohil" <sohil.mehta@intel.com>
Subject: Re: [PATCH v3 00/12] Enable Linear Address Space Separation support
Date: Fri, 4 Aug 2023 23:52:58 +0000 [thread overview]
Message-ID: <4f6fb42fe5099f650c5595d05a54e9b421456d80.camel@intel.com> (raw)
In-Reply-To: <d6b79dd5d85a30baf2eb138036910890fb060e52.camel@intel.com>
On Mon, 2023-07-31 at 15:36 -0700, Rick Edgecombe wrote:
> On Fri, 2023-06-09 at 21:36 +0300, Alexander Shishkin wrote:
>
>
> What do NULL pointer de-references look like with LASS enabled? They
> will be a #GP instead of a #PF, right? Currently the kernel prints
> out
> several types of helpful messages:
> - "BUG: kernel NULL pointer dereference, address: %lx"
> - "BUG: unable to handle page fault for address: %px
> - "unable to execute userspace code (SMEP?) (uid: %d)"
> - etc
>
> These will go away I guess, and you will get a more opaque "general
> protection fault" message?
>
> Assuming that is all right, I don't know if it might be worth
> tweaking
> that #GP message, so people aren't confused when debugging. Something
> that explains to turn off LASS to get more debugging info.
Maybe get_kernel_gp_address() could be enhanced to give hints for some
of those cases like it does for non-canonical addresses?
Separately, I think there is a tiny userspace visible change with this.
If userspace tries to access the kernel half of the cannonical address
space they will get a segfault. It seems previously the signal would
have REG_TRAPNO as 14 (X86_TRAP_PF) in this case, but with LASS it will
be 13 (X86_TRAP_GP).
I did a quick search and couldn't find any applications that seemed to
be relying on this behavior (not surprising). Some are looking for
REG_TRAPNO as 14, but none appeared to be relying on accesses to kernel
memory so I guess this should be ok. Still, it is probably appropriate
to call out the change and CC linux-api.
It makes me wonder if it should match for LASS and not LASS going
forward though. Like maybe always do X86_TRAP_GP for user->kernel
accesses instead of having it vary by whether LASS is used? Since there
isn't enough information to do REG_TRAPNO X86_TRAP_PF when LASS is
used.
prev parent reply other threads:[~2023-08-04 23:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 18:36 Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 01/12] x86/cpu: Enumerate the LASS feature bits Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 02/12] x86/asm: Introduce inline memcpy and memset Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 03/12] x86/alternatives: Disable LASS when patching kernel alternatives Alexander Shishkin
2023-07-31 22:41 ` Edgecombe, Rick P
2023-08-01 21:10 ` Sohil Mehta
2023-08-01 21:50 ` Edgecombe, Rick P
2023-06-09 18:36 ` [PATCH v3 04/12] x86/cpu: Enable LASS during CPU initialization Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 05/12] x86/cpu: Remove redundant comment during feature setup Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 06/12] x86/vsyscall: Reorganize the #PF emulation code Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 07/12] x86/traps: Consolidate user fixups in exc_general_protection() Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 08/12] x86/vsyscall: Add vsyscall emulation for #GP Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 09/12] x86/vsyscall: Disable LASS if vsyscall mode is set to EMULATE Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 10/12] x86/vsyscall: Document the fact that vsyscall=emulate disables LASS Alexander Shishkin
2023-06-09 18:36 ` [PATCH v3 11/12] x86/cpu: Set LASS CR4 bit as pinning sensitive Alexander Shishkin
2023-06-09 18:36 ` [RFC v3 12/12] x86/efi: Disable LASS enforcement when switching to EFI MM Alexander Shishkin
2023-07-31 18:00 ` [PATCH v3 00/12] Enable Linear Address Space Separation support Alexander Shishkin
2023-07-31 22:36 ` Edgecombe, Rick P
2023-08-01 19:50 ` Sohil Mehta
2023-08-01 20:38 ` Edgecombe, Rick P
2023-08-04 23:52 ` Edgecombe, Rick P [this message]
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=4f6fb42fe5099f650c5595d05a54e9b421456d80.camel@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=ravi.v.shankar@intel.com \
--cc=sohil.mehta@intel.com \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®