Linux cryptographic layer development
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Alexander Graf" <graf@amazon.com>, linux-kernel@vger.kernel.org
Cc: linux-crypto@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"Olivia Mackall" <olivia@selenic.com>,
	"Petre Eftime" <petre.eftime@gmail.com>,
	"Erdem Meydanlli" <meydanli@amazon.nl>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"David Woodhouse" <dwmw@amazon.co.uk>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
	"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH v6] misc: Add Nitro Secure Module driver
Date: Wed, 11 Oct 2023 14:12:36 +0200	[thread overview]
Message-ID: <939cf309-b7e4-461a-93e6-dd6212887d08@app.fastmail.com> (raw)
In-Reply-To: <fd43fb0d-5d52-423d-bb1d-bc10e64ea3ee@app.fastmail.com>

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

      reply	other threads:[~2023-10-11 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 21:34 [PATCH v6] misc: Add Nitro Secure Module driver Alexander Graf
2023-10-11 11:31 ` Arnd Bergmann
2023-10-11 12:12   ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=939cf309-b7e4-461a-93e6-dd6212887d08@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dwmw@amazon.co.uk \
    --cc=graf@amazon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jasowang@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=meydanli@amazon.nl \
    --cc=mst@redhat.com \
    --cc=olivia@selenic.com \
    --cc=petre.eftime@gmail.com \
    --cc=xuanzhuo@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox