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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 29 Aug 2023 02:57:50 +0300
From:   "kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>
To:     "Michael Kelley (LINUX)" <mikelley@...rosoft.com>
Cc:     KY Srinivasan <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        "wei.liu@...nel.org" <wei.liu@...nel.org>,
        Dexuan Cui <decui@...rosoft.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "bp@...en8.de" <bp@...en8.de>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "hpa@...or.com" <hpa@...or.com>,
        "luto@...nel.org" <luto@...nel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "thomas.lendacky@....com" <thomas.lendacky@....com>,
        "sathyanarayanan.kuppuswamy@...ux.intel.com" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "rick.p.edgecombe@...el.com" <rick.p.edgecombe@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>
Subject: Re: [RFC PATCH 1/1] x86/mm: Mark CoCo VM pages invalid while moving
 between private and shared

On Mon, Aug 28, 2023 at 11:23:55PM +0000, Michael Kelley (LINUX) wrote:
> > I guess in this case it is better to use slow_virt_to_phys(), but have a
> > comment somewhere why it is self. Maybe also add comment inside
> > slow_virt_to_phys() to indicate that we don't check present bit for a
> > reason.
> > 
> 
> OK, works for me.  I'll turn my original RFC patch into a small patch
> set that's pretty much as the RFC version is coded, along with the
> appropriate comments in slow_virt_to_phys().  Additional patches
> in the set will remove code that becomes unnecessary or that can
> be simplified.

Oh, I just realized that it conflicts with another patchset that I am
currently working on. This patchset adds kexec support for TDX. One thing
I do in this patchset is revert all shared pages to private during kexec,
so that the next kernel can use them[1]. I determine the shared status by
checking the shared bit in the kernel page tables.

If I understand correctly, your change will work with my patch because
my patch is buggy and does not check the preset bit (irony detected).

Ugh. This gets messy.

[1] https://github.com/intel/tdx/commit/4b63531fc315551c3c42023ea655206c77eef5a1
-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ