mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagi@grimberg.me>, Keith Busch <kbusch@kernel.org>,
	Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvme-tcp: Check if request has started before processing it
Date: Mon, 15 Feb 2021 11:40:20 +0100	[thread overview]
Message-ID: <20210215104020.yyithlo2hkxqvguj@beryllium.lan> (raw)
In-Reply-To: <73e4914e-f867-c899-954d-4b61ae2b4c33@suse.de>

On Sat, Feb 13, 2021 at 09:46:41AM +0100, Hannes Reinecke wrote:
> On 2/12/21 10:49 PM, Sagi Grimberg wrote:
> > 
> > > > > blk_mq_tag_to_rq() will always return a request if the command_id is
> > > > > in the valid range. Check if the request has been started. If we
> > > > > blindly process the request we might double complete a request which
> > > > > can be fatal.
> > > > 
> > > > How did you get to this one? did the controller send a completion for
> > > > a completed/bogus request?
> > > 
> > > If that is the case, then that must mean it's possible the driver could
> > > have started the command id just before the bogus completion check. Data
> > > iorruption, right?

'during TCP LIF toggles and aggr relocates' testing the host
crashes. TBH, I do not really know what is happening or what the test
does. Still trying to figure out what's going on. I was just very
surprised how much the code trusts the other side to behave correctly.

> > Yes, which is why I don't think this check is very useful..
> 
> I actually view that as a valid protection against spoofed frames.
> Without it it's easy to crash the machine by injecting fake completions with
> random command ids.

In this test scenario it's not even a spoofed frame; maybe just a
confused controller.

  reply	other threads:[~2021-02-15 10:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 18:17 Daniel Wagner
2021-02-12 20:58 ` Sagi Grimberg
2021-02-12 21:09   ` Keith Busch
2021-02-12 21:49     ` Sagi Grimberg
2021-02-13  8:46       ` Hannes Reinecke
2021-02-15 10:40         ` Daniel Wagner [this message]
2021-02-15 21:29           ` Sagi Grimberg
2021-02-26 12:35             ` Daniel Wagner
2021-02-26 12:54               ` Hannes Reinecke
2021-02-26 16:13                 ` Keith Busch
2021-02-26 16:42                   ` Hannes Reinecke
2021-02-26 17:19                     ` Keith Busch
2021-03-01 13:26                       ` Daniel Wagner
2021-03-01 13:55                         ` Hannes Reinecke
2021-03-01 16:05                           ` Keith Busch
2021-03-01 16:53                             ` Hannes Reinecke
2021-03-01 20:59                               ` Keith Busch
2021-03-02  7:18                                 ` Hannes Reinecke
2021-03-02 18:45                                   ` Keith Busch
2021-02-15 21:23         ` Sagi Grimberg
2021-02-16  8:51           ` Hannes Reinecke
2021-02-13  8:42 ` Hannes Reinecke

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=20210215104020.yyithlo2hkxqvguj@beryllium.lan \
    --to=dwagner@suse.de \
    --cc=axboe@fb.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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

all inboxes | Powered by JetHome®