lkml.org 
[lkml]   [2021]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 1/7] x86/sgx: Provide indication of life-cycle of EPC pages
From
Date
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.

\
 
 \ /
  Last update: 2021-09-22 00:16    [W:0.121 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site