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: <057511a3-3bc8-f073-e0f8-7b14646f82fe@intel.com>
Date:   Tue, 21 Sep 2021 15:15:17 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Jarkko Sakkinen <jarkko@...nel.org>,
        Tony Luck <tony.luck@...el.com>,
        Sean Christopherson <seanjc@...gle.com>
Cc:     Cathy Zhang <cathy.zhang@...el.com>, linux-sgx@...r.kernel.org,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/7] x86/sgx: Provide indication of life-cycle of EPC
 pages

On 9/21/21 2:28 PM, Jarkko Sakkinen wrote:
>> Since there are multiple uses of the "owner" field with different types
>> change the sgx_epc_page structure to define an anonymous union with
>> each of the uses explicitly called out.
> But it's still always a pointer.
> 
> And not only that, but two alternative fields in that union have *exactly* the
> same type, so it's kind of artifically representing the problem more complex
> than it really is.
> 
> I'm not just getting, why all this complexity, and not a few casts instead?

I suggested this.  It makes the structure more self-describing because
it explicitly lists the possibles uses of the space in the structure.

Maybe I stare at 'struct page' and its 4 unions too much and I'm
enamored by their shininess.  But, in the end, I prefer unions to casting.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ