Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/1] nvme-pci: check that sqid match in nvme cqe
Date: Wed, 9 Jan 2019 19:35:21 +0100	[thread overview]
Message-ID: <20190109183521.GA21992@lst.de> (raw)
In-Reply-To: <d45e8fe6-5c58-f8f5-5b74-3e261222e089@mellanox.com>

On Sun, Jan 06, 2019@02:21:53PM +0200, Max Gurtovoy wrote:
> maybe it wasn't a good example but let's say I can change 1 line in QEMU 
> code (@hw/block/nvme.c) to trigger this issue.
>
> if I'll change
>
> req->cqe.sq_id = cpu_to_le16(sq->sqid);
>
> to be
>
> req->cqe.sq_id = 0;
>
> we'll always get wrong sq_id except of admin queue commands.
>
> This patch tries to protect against HW/FW bugs and we need to decide if 
> it's in of our driver interest to do so.
>
> if not, let's abandon this commit.

Yes, but hardware that gets this wrong will just blow up and timeout
anyway.  I'm not sure this case is worth adding a special detetion
in the slow path.

  reply	other threads:[~2019-01-09 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-01 13:37 [PATCH 1/1] nvme-pci: check that sqid match in nvme cqe Max Gurtovoy
2019-01-04 18:13 ` Christoph Hellwig
2019-01-06 12:21   ` Max Gurtovoy
2019-01-09 18:35     ` Christoph Hellwig [this message]
2019-01-09 18:35       ` Christoph Hellwig

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=20190109183521.GA21992@lst.de \
    --to=hch@lst.de \
    /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