All of lore.kernel.org
 help / color / mirror / Atom feed
From: Klaus Jensen <its@irrelevant.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: "Klaus Jensen" <k.jensen@samsung.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org,
	"Qiuhao Li" <Qiuhao.Li@outlook.com>
Subject: Re: [PATCH] hw/nvme: fix CVE-2021-3929
Date: Thu, 20 Jan 2022 21:13:11 +0100	[thread overview]
Message-ID: <YenCV0EU3xQ7NgRu@apples> (raw)
In-Reply-To: <20220120151008.GA383746@dhcp-10-100-145-180.wdc.com>

[-- Attachment #1: Type: text/plain, Size: 765 bytes --]

On Jan 20 07:10, Keith Busch wrote:
> On Thu, Jan 20, 2022 at 09:01:55AM +0100, Klaus Jensen wrote:
> > +static inline bool nvme_addr_is_iomem(NvmeCtrl *n, hwaddr addr)
> > +{
> > +    hwaddr hi, lo;
> > +
> > +    lo = n->bar0.addr;
> > +    hi = lo + int128_get64(n->bar0.size);
> > +
> > +    return addr >= lo && addr < hi;
> 
> Looks fine considering this implementation always puts CMB in an
> exclusive BAR. From a spec consideration though, you can put a CMB at a
> BAR0 offset. I don't think that's going to happen anytime soon here, but
> may be worth a comment to notify this function needs to be updated if
> that assumption ever changes.
> 
> Reviewed-by: Keith Busch <kbusch@kernel.org>

Nice catch Keith. A comment would be wise!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2022-01-21  0:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20  8:01 [PATCH] hw/nvme: fix CVE-2021-3929 Klaus Jensen
2022-01-20 15:10 ` Keith Busch
2022-01-20 20:13   ` Klaus Jensen [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=YenCV0EU3xQ7NgRu@apples \
    --to=its@irrelevant.dk \
    --cc=Qiuhao.Li@outlook.com \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.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.