From: Herbert Xu <herbert@gondor.apana.org.au>
To: Michael Bommarito <michael.bommarito@gmail.com>
Cc: Olivia Mackall <olivia@selenic.com>,
linux-crypto@vger.kernel.org,
"Michael S . Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>, Kees Cook <kees@kernel.org>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
virtualization@lists.linux.dev, linux-kernel@vger.kernel.org,
Dan Williams <djbw@kernel.org>, Ingo Molnar <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
torvalds@linux-foundation.org, alan@linux.intel.com,
tglx@linutronix.de
Subject: Re: [PATCH v3] hwrng: virtio: clamp device-reported used.len at copy_data()
Date: Thu, 11 Jun 2026 12:43:09 +0800 [thread overview]
Message-ID: <aio83ZWadVTiuNpR@gondor.apana.org.au> (raw)
In-Reply-To: <20260531142251.2792061-1-michael.bommarito@gmail.com>
On Sun, May 31, 2026 at 10:22:51AM -0400, Michael Bommarito wrote:
>
> + size = min_t(unsigned int, size, avail - vi->data_idx);
> + idx = array_index_nospec(vi->data_idx, sizeof(vi->data));
> + memcpy(buf, vi->data + idx, size);
I don't see how nospec can help here. Please enlighten me.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2026-06-11 4:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 14:22 [PATCH v3] hwrng: virtio: clamp device-reported used.len at copy_data() Michael Bommarito
2026-06-11 4:43 ` Herbert Xu [this message]
2026-06-11 7:30 ` Michael S. Tsirkin
2026-06-11 7:46 ` Herbert Xu
2026-06-11 7:58 ` Michael S. Tsirkin
2026-06-11 8:18 ` Herbert Xu
2026-06-11 9:10 ` Michael S. Tsirkin
2026-06-11 9:19 ` Herbert Xu
2026-06-11 10:42 ` Michael S. Tsirkin
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=aio83ZWadVTiuNpR@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=alan@linux.intel.com \
--cc=borntraeger@linux.ibm.com \
--cc=djbw@kernel.org \
--cc=hpa@zytor.com \
--cc=jasowang@redhat.com \
--cc=kees@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.bommarito@gmail.com \
--cc=mingo@redhat.com \
--cc=mst@redhat.com \
--cc=olivia@selenic.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=virtualization@lists.linux.dev \
/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