lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <939cf309-b7e4-461a-93e6-dd6212887d08@app.fastmail.com>
Date:   Wed, 11 Oct 2023 14:12:36 +0200
From:   "Arnd Bergmann" <arnd@...db.de>
To:     "Alexander Graf" <graf@...zon.com>, linux-kernel@...r.kernel.org
Cc:     linux-crypto@...r.kernel.org,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Herbert Xu" <herbert@...dor.apana.org.au>,
        "Olivia Mackall" <olivia@...enic.com>,
        "Petre Eftime" <petre.eftime@...il.com>,
        "Erdem Meydanlli" <meydanli@...zon.nl>,
        "Benjamin Herrenschmidt" <benh@...nel.crashing.org>,
        "David Woodhouse" <dwmw@...zon.co.uk>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        "Jason Wang" <jasowang@...hat.com>,
        "Xuan Zhuo" <xuanzhuo@...ux.alibaba.com>,
        "Christophe JAILLET" <christophe.jaillet@...adoo.fr>
Subject: Re: [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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ