All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Leon Alrae <leon.alrae@imgtec.com>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/pci-host/bonito: Avoid buffer overrun for bad LDMA/COP accesses
Date: Fri, 31 Jul 2015 00:02:01 +0200	[thread overview]
Message-ID: <20150730220201.GA4735@aurel32.net> (raw)
In-Reply-To: <1438270422-18018-1-git-send-email-peter.maydell@linaro.org>

On 2015-07-30 16:33, Peter Maydell wrote:
> The LDMA and COP memory regions represent four 32 bit registers
> each, but the memory regions themselves are 0x100 bytes large.
> Add guards to the read and write accessors so that bogus accesses
> beyond the four defined registers don't just run off the end of
> the bonldma and boncop structs and into whatever lies beyond.

Thanks for finding that. I don't know if it is better to reduce the
memory region or just ignore the access as in your patch. I haven't
found any documentation about the bonito northbridge, so I think it's
safer to go like in your patch.

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I don't have a fulong2e image, so this is compile tested only...

I have just tested, it still boots fine with the change.

>  hw/pci-host/bonito.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

Acked-by: Aurelien Jarno <aurelien@aurel32.net>

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2015-07-30 22:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30 15:33 [Qemu-devel] [PATCH] hw/pci-host/bonito: Avoid buffer overrun for bad LDMA/COP accesses Peter Maydell
2015-07-30 22:02 ` Aurelien Jarno [this message]
2015-07-30 22:35   ` Peter Maydell

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=20150730220201.GA4735@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=leon.alrae@imgtec.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.