Re: [RFC PATCH v2 18/27] x86/cet/shstk: Introduce WRUSS instruction
From: Andy Lutomirski <luto@amacapital.net>
Date: 2018-07-13 02:21:50
Also in:
linux-api, linux-arch, linux-mm, lkml
On Jul 12, 2018, at 6:50 PM, Dave Hansen [off-list ref] wrote: On 07/12/2018 04:49 PM, Dave Hansen wrote:quoted
quoted
quoted
That seems like something we need to call out if so. It also means we need to update the SDM because some of the text is wrong.It needs to mention the WRUSS case.Ugh. The documentation for this is not pretty. But, I guess this is not fundamentally different from access to U=1 pages when SMAP is in place and we've set EFLAGS.AC=1.I was wrong and misread the docs. We do not get X86_PF_USER set when EFLAGS.AC=1. But, we *do* get X86_PF_USER (otherwise defined to be set when in ring3) when running in ring0 with the WRUSS instruction and some other various shadow-stack-access-related things. I'm sure folks had a good reason for this architecture, but it is a pretty fundamentally *new* architecture that we have to account for.
I think it makes (some) sense. The USER bit is set for a page fault that was done with user privilege. So a descriptor table fault at CPL 3 has USER clear (regardless of the cause of the fault) and WRUSS has USER set.
This new architecture is also not spelled out or accounted for in the SDM as of yet. It's only called out here as far as I know: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf Which reminds me: Yu-cheng, do you have a link to the docs anywhere in your set? If not, you really should.
I am tempted to suggest that the whole series not be merged until there are actual docs. It’s not a fantastic precedent.-- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html