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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152f757d37d3fd834a06fadad18165cbf44b1b48.camel@intel.com>
Date:   Sat, 21 Aug 2021 19:20:32 +0000
From:   "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To:     "Xu, Pengfei" <pengfei.xu@...el.com>,
        "bsingharora@...il.com" <bsingharora@...il.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "esyr@...hat.com" <esyr@...hat.com>,
        "Huang, Haitao" <haitao.huang@...el.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>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "fweimer@...hat.com" <fweimer@...hat.com>,
        "nadav.amit@...il.com" <nadav.amit@...il.com>,
        "jannh@...gle.com" <jannh@...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>,
        "pavel@....cz" <pavel@....cz>, "arnd@...db.de" <arnd@...db.de>,
        "tglx@...utronix.de" <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>,
        "Dave.Martin@....com" <Dave.Martin@....com>,
        "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>
CC:     "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH v29 09/32] x86/mm: Introduce _PAGE_COW

+KVM list.

On Fri, 2021-08-20 at 11:11 -0700, Yu-cheng Yu wrote:
>  
>  static inline int pte_write(pte_t pte)
>  {
> -       return pte_flags(pte) & _PAGE_RW;
> +       /*
> +        * Shadow stack pages are always writable - but not by normal
> +        * instructions, and only by shadow stack operations. 
> Therefore,
> +        * the W=0,D=1 test with pte_shstk().
> +        */
> +       return (pte_flags(pte) & _PAGE_RW) || pte_shstk(pte);
>  }
>  
KVM uses this in a couple places when checking EPT ptes. But bit 6
(dirty) is a totally different meaning in EPT. I think it's just used
to trigger an optimization, but wondering if KVM should have its own
TDP specific function instead of using pte_write().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ