Re: [PATCH v7 3/7] x86/sgx: Initial poison handling for dirty and free pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 30, 2021 at 05:40:18PM +0300, Jarkko Sakkinen wrote:
> On Tue, 2021-09-28 at 13:53 -0700, Luck, Tony wrote:
> > > Couldn't it be a blob with 8 bytes for each address?
> > 
> > It could be a blob. But that would require some perl/python
> > instead of simple shell to do the above persistence trick.
> 
> The way I've understood it, a list of values breaks sysfs conventions.
> There can be only single value per attribute. Even, if the blob is
> interpreted as a list of integers, it is still a value, as far as sysfs
> is concerned.
> 
> I'd also consider programs written with C, or perhaps Rust, when we
> (ever) add any new sysfs for SGX. In my opinion, it makes sense to make
> any uapi things we add accesible to as many tools as we can.
> 
> Such a trivially constructed blob is not enormously hard to parse in any
> language, but at least I don't enjoy parsing list of strings in C code,
> whereas loading a blob is effortless.
> 
> This kind of shows why the current sysfs conventions make sense in the
> first place: they enforce to design attributes in the manner that they
> are as reachable as possible. That's why I would follow the conventions
> in a strict manner.
> 
> Finally, I would make a proper sysfs attribute out of this (and a separate
> patch), which would be available per node.

Those are all good points. I'm going to drop any interface from this
series (because that's above and beyond the goal of "basic machine check
support"). We can spend some time to come up with the right interface
and add that in a future series.

-Tony



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux