[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <009a98b0999891d59e30b8d818e60adb35958fc7.camel@intel.com>
Date: Wed, 8 Oct 2025 17:42:49 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Mehta, Sohil" <sohil.mehta@...el.com>, "tglx@...utronix.de"
<tglx@...utronix.de>, "mingo@...hat.com" <mingo@...hat.com>, "Hansen, Dave"
<dave.hansen@...el.com>, "x86@...nel.org" <x86@...nel.org>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "bp@...en8.de"
<bp@...en8.de>
CC: "corbet@....net" <corbet@....net>, "ardb@...nel.org" <ardb@...nel.org>,
"david.laight.linux@...il.com" <david.laight.linux@...il.com>,
"luto@...nel.org" <luto@...nel.org>, "jpoimboe@...nel.org"
<jpoimboe@...nel.org>, "Luck, Tony" <tony.luck@...el.com>,
"alexander.shishkin@...ux.intel.com" <alexander.shishkin@...ux.intel.com>,
"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"seanjc@...gle.com" <seanjc@...gle.com>, "xin@...or.com" <xin@...or.com>,
"kas@...nel.org" <kas@...nel.org>, "vegard.nossum@...cle.com"
<vegard.nossum@...cle.com>, "dwmw@...zon.co.uk" <dwmw@...zon.co.uk>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"rdunlap@...radead.org" <rdunlap@...radead.org>, "kees@...nel.org"
<kees@...nel.org>, "hpa@...or.com" <hpa@...or.com>, "peterz@...radead.org"
<peterz@...radead.org>, "geert@...ux-m68k.org" <geert@...ux-m68k.org>
Subject: Re: [PATCH v10 08/15] x86/vsyscall: Reorganize the page fault
emulation code
On Tue, 2025-10-07 at 15:52 -0700, Sohil Mehta wrote:
> >
> > If indeed we should add a check, it should probably go in one of the later
> > patches and not this one.
>
> We already check CS before calling emulate_vsyscall_gp().
>
> if (user_mode(regs)) {
>
> ...
> if (emulate_vsyscall_gp(regs))
> goto exit;
>
> ...
> }
Ah, right, I missed that. But in the new code, the way to get there is by taking
a GP with an RIP in the vsyscall range. Does this seem a bit stale though?
/*
* No point in checking CS -- the only way to get here is a user mode
* trap to a high address, which means that we're in 64-bit user code.
*/
For one, "No point in checking CS", while true kind of implies that CS wasn't
already checked. The second half I guess is still true if you call the fetch #GP
a trap, and actually maybe more accurate for LASS then it was for the older
paradigm with the "high address" verbiage.
I'm fine either way.
Powered by blists - more mailing lists