Re: [PATCH v3 02/18] nitro_enclaves: Define the PCI device interface
From: Benjamin Herrenschmidt
Date: Sun May 31 2020 - 22:59:34 EST
On Wed, 2020-05-27 at 00:21 +0200, Greg KH wrote:
> > There are a couple of data structures with more than one member and multiple
> > field sizes. And for the ones that are not, gathered as feedback from
> > previous rounds of review that should consider adding a "flags" field in
> > there for further extensibility.
>
> Please do not do that in ioctls. Just create new calls instead of
> trying to "extend" existing ones. It's always much easier.
>
> > I can modify to have "__packed" instead of the attribute callout.
>
> Make sure you even need that, as I don't think you do for structures
> like the above one, right?
Hrm, my impression (granted I only just started to look at this code)
is that these are protocol messages with the PCI devices, not strictly
just ioctl arguments (though they do get conveyed via such ioctls).
Andra-Irina, did I get that right ? :-)
That said, I still think that by carefully ordering the fields and
using explicit padding, we can avoid the need of the packed attributed.
Cheers,
Ben.