lkml.org 
[lkml]   [2023]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6] misc: Add Nitro Secure Module driver
On Wed, Oct 11, 2023, at 13:31, Arnd Bergmann wrote:

>> +/* Maximum length output data */
>> +struct nsm_data_resp {
>> + __u32 len;
>> + __u8 data[NSM_RESPONSE_MAX_SIZE];
>> +};
>
> You have endian-conversion for some of the data fields
> but not the 'len field here, I guess these should be
> __le32 instead of __u32, with the appropriate le32_to_cpu()
> and cpu_to_le32() conversion when passing the native
> u32 word from userspace.

Ignore this one, I misread how the length field is used, this
is obviously not fixed endian as it is only used for
communicating with the kernel's virtio code, not the device.

Arnd

\
 
 \ /
  Last update: 2023-10-11 14:17    [W:0.074 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site