On 6/6/19 3:04 PM, Andy Lutomirski wrote: >> But, that seems broken. If we have supervisor state, we can't >> always defer the load until return to userspace, so we'll never?? >> have TIF_NEED_FPU_LOAD. That would certainly be true for >> cet_kernel_state. > > Ugh. I was sort of imagining that we would treat supervisor state completely separately from user state. But can you maybe give examples of exactly what you mean? > >> It seems like we actually need three classes of XSAVE states: 1. >> User state > > This is FPU, XMM, etc, right? Yep. >> 2. Supervisor state that affects user mode > > User CET? Yep. >> 3. Supervisor state that affects kernel mode > > Like supervisor CET? If we start doing supervisor shadow stack, the > context switches will be real fun. We may need to handle this in > asm. Yeah, that's what I was thinking. I have the feeling Yu-cheng's patches don't comprehend this since Sebastian's patches went in after he started working on shadow stacks. > Where does PKRU fit in? Maybe we can treat it as #3? I thought Sebastian added specific PKRU handling to make it always eager. It's actually user state that affect kernel mode. :)
- Re: [PATCH v7 22/27] binfmt_elf: Extract .not... Florian Weimer
- Re: [PATCH v7 22/27] binfmt_elf: Extract ... Dave Martin
- [PATCH v7 09/27] mm/mmap: Prevent Shadow Stack VMA merges Yu-cheng Yu
- [PATCH v7 19/27] x86/cet/shstk: User-mode shadow stack sup... Yu-cheng Yu
- [PATCH v7 01/27] Documentation/x86: Add CET description Yu-cheng Yu
- [PATCH v7 16/27] mm: Handle THP/HugeTLB shadow stack page ... Yu-cheng Yu
- [PATCH v7 10/27] x86/mm: Change _PAGE_DIRTY to _PAGE_DIRTY... Yu-cheng Yu
- [PATCH v7 04/27] x86/fpu/xstate: Introduce XSAVES system s... Yu-cheng Yu
- Re: [PATCH v7 04/27] x86/fpu/xstate: Introduce XSAVES... Dave Hansen
- Re: [PATCH v7 04/27] x86/fpu/xstate: Introduce XS... Andy Lutomirski
- Re: [PATCH v7 04/27] x86/fpu/xstate: Introduc... Dave Hansen
- Re: [PATCH v7 04/27] x86/fpu/xstate: Intr... Yu-cheng Yu
- Re: [PATCH v7 04/27] x86/fpu/xstate: Intr... Andy Lutomirski
- [PATCH v7 15/27] mm: Handle shadow stack page fault Yu-cheng Yu
- Re: [PATCH v7 15/27] mm: Handle shadow stack page fau... Peter Zijlstra
- [PATCH v7 03/27] x86/fpu/xstate: Change names to separate ... Yu-cheng Yu
- [PATCH v7 24/27] x86/cet/shstk: Handle thread shadow stack Yu-cheng Yu
- [PATCH v7 26/27] x86/cet/shstk: Add arch_prctl functions f... Yu-cheng Yu
- [PATCH v7 25/27] mm/mmap: Add Shadow stack pages to memory... Yu-cheng Yu