Re: [PATCH 2/5] x86/sgx: Use memchr_inv() in sgx_validate_secinfo()

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

 



On Wed, 2019-08-21 at 20:47 -0700, Sean Christopherson wrote:
> > +	if (memchr_inv(secinfo->reserved, 0, SGX_SECINFO_RESERVED_SIZE))
> 
> Doing 'sizeof(secinfo->reserved)' would be preferable, that way we're not
> dependent on SGX_SECINFO_RESERVED_SIZE being in bytes (I had to check).
> 
> Obviously not in this patch, but the same cleanup can be applied to
> sgx_validate_secs().

Thanks for the valid remark, I squashed with that change. I also
edited prepending commit and removed the constant altogether.

/Jarkko




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

  Powered by Linux