qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@xilinx.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Alistair Francis <alistair.francis@xilinx.com>,
	Huawei PSIRT <psirt@huawei.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Prasad J Pandit <pjp@fedoraproject.org>
Subject: Re: [Qemu-devel] [PATCH v1 1/1] cadence_uart: Check baud rate generator and divider values on migration
Date: Mon, 7 Nov 2016 14:43:48 -0800	[thread overview]
Message-ID: <CAKmqyKO9TG7WsUqHWyrcZ0z3ywzZGWirV8RxS91Tj2QU7UzC9Q@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9QT9VphrTDCYxLQu_MWJ1KPV7Y61qiDown_UEDS4hFLw@mail.gmail.com>

On Mon, Nov 7, 2016 at 2:13 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 7 November 2016 at 21:53, Alistair Francis
> <alistair.francis@xilinx.com> wrote:
>> On Sat, Nov 5, 2016 at 6:51 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> Usually we just fail the migration if the incoming
>>> data is bogus -- any particular reason not to take that
>>> approach here?
>>
>> There is no reason, it just seemed a bit much to abort just for this.
>>
>> Should I change it to abort?
>
> I think there are two cases:
>  (1) migration from an old version could be in these
> bogus states (without having crashed the old version
> in the process) -- in that case you can argue for
> sanitizing as being most helpful to the user
> (and should comment that that's why we accept-but-squash)

I think this is actually very unlikely, anyone setting these values by
accident has probably already seen crashes.

>  (2) the out-of-bounds values only happen if somebody
> is deliberately feeding QEMU a bogus incoming data
> stream -- in this case (which is the usual one for
> bounds checks) it's best to return 1 to fail the
> migration.

This seems more likely, so it sounds like I should fail the migration.

Thanks,

Alistair

>
> thanks
> -- PMM
>

      reply	other threads:[~2016-11-07 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-05  0:00 [Qemu-devel] [PATCH v1 1/1] cadence_uart: Check baud rate generator and divider values on migration Alistair Francis
2016-11-05 13:51 ` Peter Maydell
2016-11-07 21:53   ` Alistair Francis
2016-11-07 22:13     ` Peter Maydell
2016-11-07 22:43       ` Alistair Francis [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=CAKmqyKO9TG7WsUqHWyrcZ0z3ywzZGWirV8RxS91Tj2QU7UzC9Q@mail.gmail.com \
    --to=alistair.francis@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=pjp@fedoraproject.org \
    --cc=psirt@huawei.com \
    --cc=qemu-devel@nongnu.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).