qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: Ira Weiny <ira.weiny@intel.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	qemu-devel@nongnu.org, Fan Ni <fan.ni@samsung.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [PATCH] hw/cxl: Fix read from bogus memory
Date: Mon, 3 Jun 2024 11:05:13 -0400	[thread overview]
Message-ID: <20240603110458-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <48ebd16f-3eda-4292-9257-bcac9c82cc5c@linaro.org>

On Mon, Jun 03, 2024 at 02:53:35PM +0200, Philippe Mathieu-Daudé wrote:
> On 31/5/24 18:22, Ira Weiny wrote:
> > Peter and coverity report:
> > 
> > 	We've passed '&data' to address_space_write(), which means "read
> > 	from the address on the stack where the function argument 'data'
> > 	lives", so instead of writing 64 bytes of data to the guest ,
> > 	we'll write 64 bytes which start with a host pointer value and
> > 	then continue with whatever happens to be on the host stack
> > 	after that.
> > 
> > Indeed the intention was to write 64 bytes of data at the address given.
> > 
> > Fix the parameter to address_space_write().
> > 
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Link: https://lore.kernel.org/all/CAFEAcA-u4sytGwTKsb__Y+_+0O2-WwARntm3x8WNhvL1WfHOBg@mail.gmail.com/
> > Fixes: 6bda41a69bdc ("hw/cxl: Add clear poison mailbox command support.")
> > Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > Signed-off-by: Ira Weiny <ira.weiny@intel.com>
> > ---
> > Compile tested only.  Jonathan please double check me.
> > ---
> >   hw/mem/cxl_type3.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Thanks, patch queued.

Had it queued too but sure, I can drop.

-- 
MST



  reply	other threads:[~2024-06-03 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 16:22 [PATCH] hw/cxl: Fix read from bogus memory Ira Weiny
2024-05-31 16:29 ` Peter Maydell
2024-06-02 19:25 ` Michael S. Tsirkin
2024-06-03 11:57 ` Jonathan Cameron via
2024-06-03 12:53 ` Philippe Mathieu-Daudé
2024-06-03 15:05   ` Michael S. Tsirkin [this message]
2024-06-03 15:10     ` Philippe Mathieu-Daudé

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=20240603110458-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=fan.ni@samsung.com \
    --cc=ira.weiny@intel.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@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 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).