From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Igor Mammedov <imammedo@redhat.com>,
linux-kernel@vger.kernel.org, david@redhat.com,
cohuck@redhat.com, Janosch Frank <frankja@linux.ibm.com>
Subject: Re: [PATCH] kvm_s390_vm_start_migration: check dirty_bitmap before using it as target for memset()
Date: Tue, 10 Sep 2019 12:21:12 +0200 [thread overview]
Message-ID: <20190910122112.098e3494@p-imbrenda.boeblingen.de.ibm.com> (raw)
In-Reply-To: <4668e4e9-c0bc-3647-6387-20c6f8107ed3@de.ibm.com>
On Mon, 9 Sep 2019 18:21:47 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
[...]
> > diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> > index f329dcb3f44c..dfba51c9d60c 100644
> > --- a/arch/s390/kvm/kvm-s390.c
> > +++ b/arch/s390/kvm/kvm-s390.c
> > @@ -1018,6 +1018,10 @@ static int
> > kvm_s390_vm_start_migration(struct kvm *kvm) /* mark all the pages
> > in active slots as dirty */ for (slotnr = 0; slotnr <
> > slots->used_slots; slotnr++) { ms = slots->memslots + slotnr;
> > + if (!ms->dirty_bitmap) {
> > + WARN(1, "ms->dirty_bitmap == NULL\n");
>
> I would prefer to not have a WARN_ON. Otherwise this would allow a
> malicious user to spam the log.
I agree, the WARN is not needed.
>
> > + return -EINVAL;
> > + }
> > /*
> > * The second half of the bitmap is only used on
> > x86,
> > * and would be wasted otherwise, so we put it to
> > good
Otherwise it looks good.
Claudio Imbrenda
prev parent reply other threads:[~2019-09-10 10:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 14:55 [PATCH] kvm_s390_vm_start_migration: check dirty_bitmap before using it as target for memset() Igor Mammedov
2019-09-09 15:47 ` David Hildenbrand
2019-09-09 16:17 ` Igor Mammedov
2019-09-09 16:22 ` David Hildenbrand
2019-09-09 16:21 ` Christian Borntraeger
2019-09-10 10:21 ` Claudio Imbrenda [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=20190910122112.098e3494@p-imbrenda.boeblingen.de.ibm.com \
--to=imbrenda@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imammedo@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).