From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org, Martin Schwidefsky <schwidefsky@de.ibm.com>,
cotte@de.ibm.com
Subject: Re: [PATCHv2] kvm-s390: fix potential array overrun in intercept handling
Date: Thu, 21 Jan 2010 12:32:15 +0100 [thread overview]
Message-ID: <201001211232.15630.borntraeger@de.ibm.com> (raw)
In-Reply-To: <20100121112418.GA7335@osiris.boeblingen.de.ibm.com>
Am Donnerstag 21 Januar 2010 12:24:18 schrieb Heiko Carstens:
> > - if (code & 3 || code > 0x48)
> > + if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs))
> > return -ENOTSUPP;
>
> Not that it matters for this patch, but -ENOTSUPP should not leak to
> userspace. Not sure if it does somewhere, but it is used all over the
> place within arch/s390/kvm...
> Use -EOPNOTSUPP or something similar instead.
AFAICS it does not leak to userspace, ENOTSUPP is an internal code. see
kvm_arch_vcpu_ioctl_run:
[...]
if (rc == -ENOTSUPP) {
/* intercept cannot be handled in-kernel, prepare kvm-run */
kvm_run->exit_reason = KVM_EXIT_S390_SIEIC;
kvm_run->s390_sieic.icptcode = vcpu->arch.sie_block->icptcode;
kvm_run->s390_sieic.ipa = vcpu->arch.sie_block->ipa;
kvm_run->s390_sieic.ipb = vcpu->arch.sie_block->ipb;
rc = 0;
}
[...]
next prev parent reply other threads:[~2010-01-21 11:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-21 10:56 [PATCH] kvm-s390: fix potential array overrun in intercept handling Christian Borntraeger
2010-01-21 11:00 ` Avi Kivity
2010-01-21 11:19 ` [PATCHv2] " Christian Borntraeger
2010-01-21 11:24 ` Heiko Carstens
2010-01-21 11:32 ` Christian Borntraeger [this message]
2010-01-21 17:36 ` Marcelo Tosatti
2010-01-21 23:15 ` Alexander Graf
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=201001211232.15630.borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=avi@redhat.com \
--cc=cotte@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--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