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:   Thu, 20 May 2021 21:18:48 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Andi Kleen <ak@...ux.intel.com>
Cc:     "Kuppuswamy, Sathyanarayanan" 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Tony Luck <tony.luck@...el.com>,
        Kirill Shutemov <kirill.shutemov@...ux.intel.com>,
        Kuppuswamy Sathyanarayanan <knsathya@...nel.org>,
        Raj Ashok <ashok.raj@...el.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC v2 27/32] x86/tdx: Exclude Shared bit from __PHYSICAL_MASK

On Thu, May 20, 2021, Andi Kleen wrote:
> 
> On 5/20/2021 1:16 PM, Sean Christopherson wrote:
> > On Thu, May 20, 2021, Kuppuswamy, Sathyanarayanan wrote:
> > > So what is your proposal? "tdx_guest_" / "tdx_host_" ?
> >    1. Abstract things where appropriate, e.g. I'm guessing there is a clever way
> >       to deal with the shared vs. private inversion and avoid tdg_shared_mask
> >       altogether.
> > 
> >    2. Steal what SEV-ES did for the #VC handlers and use ve_ as the prefix for
> >       handlers.
> > 
> >    3. Use tdx_ everywhere else and handle the conflicts on a case-by-case basis
> >       with a healthy dose of common sense.  E.g. there should be no need to worry
> >       about "static __cpuidle void tdg_safe_halt(void)" colliding because neither
> >       the guest nor KVM should be exposing tdx_safe_halt() outside of its
> >       compilation unit.
> 
> 
> Sorry Sean, but your suggestion is against all good code hygiene practices.
> Normally we try to pick unique prefixes for every module, and trying to
> coordinate with lots of other code that is maintained by other people is
> just a long term recipe for annoying merging problems.  Same with
> coordinating with SEV-ES for ve_.

For ve_?  SEV-ES uses vc_...

I'd buy that argument if series as a whole was consistent, but there are
individual function prototypes that aren't consistent, e.g.

+static int __tdg_map_gpa(phys_addr_t gpa, int numpages,
+                        enum tdx_map_type map_type)

a number of functions that use tdx_ isntead of tdg_ (I'll give y'all a break on
is_tdx_guest()), the files are all tdx.{c,h}, the shortlogs all use x86/tdx, the
comments all use TDX, and so on and so forth.

I understand the desire to have a unique prefix, but tdg is is _too_ close to
tdx.  I don't want to spend the next N years wondering if tdg is a typo or intended.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ