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
| ||
|
Message-Id: <35EEB9F0-D99A-4664-9628-27029B52CFD1@gmail.com> Date: Mon, 3 Oct 2022 16:17:51 -0700 From: Nadav Amit <nadav.amit@...il.com> To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.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>, "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>, "Eranian, Stephane" <eranian@...gle.com>, "linux-mm@...ck.org" <linux-mm@...ck.org>, "fweimer@...hat.com" <fweimer@...hat.com>, "jannh@...gle.com" <jannh@...gle.com>, "dethoma@...rosoft.com" <dethoma@...rosoft.com>, "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>, "kcc@...gle.com" <kcc@...gle.com>, "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>, Andy Lutomirski <luto@...nel.org>, "pavel@....cz" <pavel@....cz>, "arnd@...db.de" <arnd@...db.de>, "Moreira, Joao" <joao.moreira@...el.com>, Thomas Gleixner <tglx@...utronix.de>, "mike.kravetz@...cle.com" <mike.kravetz@...cle.com>, "x86@...nel.org" <x86@...nel.org>, "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>, "jamorris@...ux.microsoft.com" <jamorris@...ux.microsoft.com>, "john.allen@....com" <john.allen@....com>, "rppt@...nel.org" <rppt@...nel.org>, "mingo@...hat.com" <mingo@...hat.com>, "Shankar, Ravi V" <ravi.v.shankar@...el.com>, "corbet@....net" <corbet@....net>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-api@...r.kernel.org" <linux-api@...r.kernel.org>, "gorcunov@...il.com" <gorcunov@...il.com> Subject: Re: [PATCH v2 12/39] x86/mm: Update ptep_set_wrprotect() and pmdp_set_wrprotect() for transition from _PAGE_DIRTY to _PAGE_COW On Oct 3, 2022, at 3:28 PM, Edgecombe, Rick P <rick.p.edgecombe@...el.com> wrote: > On Mon, 2022-10-03 at 11:11 -0700, Nadav Amit wrote: >> Did you have a look at ptep_set_access_flags() and friends and >> checked they >> do not need to be changed too? > > ptep_set_access_flags() doesn't actually set any additional dirty bits > on x86, so I think it's ok. Are you sure about that? (lost my confidence today so I am hesitant). Looking on insert_pfn(), I see: entry = maybe_mkwrite(pte_mkdirty(entry), vma); if (ptep_set_access_flags(vma, addr, pte, entry, 1)) ... This appears to set the dirty bit while potentially leaving the write-bit clear. This is the scenario you want to avoid, no? >> Perhaps you should at least add some >> assertion just to ensure nothing breaks. > > You mean in ptep_set_access_flags()? I think some assertions would be > really great, I'm just not sure where. Yes, on x86’s version of the function.
Powered by blists - more mailing lists