lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 3 Oct 2022 22:20:20 +0000 From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com> To: "jannh@...gle.com" <jannh@...gle.com> CC: "bsingharora@...il.com" <bsingharora@...il.com>, "hpa@...or.com" <hpa@...or.com>, "Syromiatnikov, Eugene" <esyr@...hat.com>, "peterz@...radead.org" <peterz@...radead.org>, "rdunlap@...radead.org" <rdunlap@...radead.org>, "keescook@...omium.org" <keescook@...omium.org>, "Yu, Yu-cheng" <yu-cheng.yu@...el.com>, "Eranian, Stephane" <eranian@...gle.com>, "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>, "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "linux-mm@...ck.org" <linux-mm@...ck.org>, "fweimer@...hat.com" <fweimer@...hat.com>, "nadav.amit@...il.com" <nadav.amit@...il.com>, "dethoma@...rosoft.com" <dethoma@...rosoft.com>, "kcc@...gle.com" <kcc@...gle.com>, "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>, "bp@...en8.de" <bp@...en8.de>, "oleg@...hat.com" <oleg@...hat.com>, "hjl.tools@...il.com" <hjl.tools@...il.com>, "Yang, Weijiang" <weijiang.yang@...el.com>, "Lutomirski, Andy" <luto@...nel.org>, "jamorris@...ux.microsoft.com" <jamorris@...ux.microsoft.com>, "arnd@...db.de" <arnd@...db.de>, "Moreira, Joao" <joao.moreira@...el.com>, "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>, "pavel@....cz" <pavel@....cz>, "mike.kravetz@...cle.com" <mike.kravetz@...cle.com>, "x86@...nel.org" <x86@...nel.org>, "tglx@...utronix.de" <tglx@...utronix.de>, "john.allen@....com" <john.allen@....com>, "rppt@...nel.org" <rppt@...nel.org>, "mingo@...hat.com" <mingo@...hat.com>, "Hansen, Dave" <dave.hansen@...el.com>, "Shankar, Ravi V" <ravi.v.shankar@...el.com>, "corbet@....net" <corbet@....net>, "linux-api@...r.kernel.org" <linux-api@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "gorcunov@...il.com" <gorcunov@...il.com> Subject: Re: [PATCH v2 10/39] x86/mm: Introduce _PAGE_COW On Mon, 2022-10-03 at 23:54 +0200, Jann Horn wrote: > > > These X86_FEATURE_SHSTK checks make me uneasy. Maybe use the > > > _PAGE_COW > > > logic for all machines with 64-bit entries. It will get you much > > > more > > > coverage and more universal rules. > > > > Yes, I didn't like them either at first. The reasoning originally > > was > > that _PAGE_COW is a bit more work and it might show up for some > > benchmark. > > > > Looking at this again though, it is just a few more operations on > > memory that is already getting touched either way. It must be a > > very > > tiny amount of impact if any. I'm fine removing them. Having just > > one > > set of logic around this would make it easier to reason about. > > > > Dave, any thoughts on this? > > But the rules wouldn't actually be universal - you'd still have to > look at X86_FEATURE_SHSTK in code that wants to figure out whether a > PTE is shadow stack (on a newer CPU) or readonly dirty (on an older > CPU that can set dirty bits on non-present PTEs), right? Good point. It still would need a check in pte_shstk() or pte_write(), so pte_write() doesn't think CPU created Write=0,Dirty=1 memory is writable. Which then percolates to most of the other checks anyway.
Powered by blists - more mailing lists