From: Paolo Bonzini <pbonzini@redhat.com>
To: David Hildenbrand <david@redhat.com>,
Eric Farman <farman@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-s390@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: s390: Fix potential spectre warnings
Date: Wed, 17 Apr 2019 15:13:00 +0200 [thread overview]
Message-ID: <2b8a0bab-576b-190d-1213-acea61f94a85@redhat.com> (raw)
In-Reply-To: <bdea8892-6818-93fa-fa2a-b2bad69a50d1@redhat.com>
On 17/04/19 09:49, David Hildenbrand wrote:
> return kvm->arch.adapters[array_index_nospec(id, MAX_S390_IO_ADAPTERS)];
>
> should exactly fit into a single line if I am not wrong.
git grep "\\[.*array_index_nospec" suggests that the preferred idiom is
var = array_index_nospec(var, SIZE)
which makes sense since it sanitizes var once and for all.
Paolo
next prev parent reply other threads:[~2019-04-17 13:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 0:54 [PATCH] KVM: s390: Fix potential spectre warnings Eric Farman
2019-04-17 7:49 ` David Hildenbrand
2019-04-17 13:13 ` Paolo Bonzini [this message]
2019-04-17 14:23 ` Eric Farman
2019-04-17 14:24 ` David Hildenbrand
2019-04-17 13:09 ` Paolo Bonzini
2019-04-17 13:10 ` Christian Borntraeger
2019-04-18 7:19 ` Christian Borntraeger
2019-04-18 8:02 ` Cornelia Huck
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=2b8a0bab-576b-190d-1213-acea61f94a85@redhat.com \
--to=pbonzini@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=farman@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.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