All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Daniel Wagner <dwagner@suse.de>
Cc: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Guangwu Zhang <guazhang@redhat.com>,
	Ming Lei <ming.lei@redhat.com>, Christoph Hellwig <hch@lst.de>,
	Keith Busch <kbusch@kernel.org>
Subject: Re: stack smashing detected with 'nvme sanitize-log /dev/nvme0'
Date: Wed, 26 Jul 2023 15:16:43 +0200	[thread overview]
Message-ID: <20230726131643.GA16186@lst.de> (raw)
In-Reply-To: <dckvq3ohgqdkxg7wz4vslf36gaivgldl742vew67oyh2buj5nr@7ypn5ydt6kss>

On Wed, Jul 26, 2023 at 01:52:04PM +0200, Daniel Wagner wrote:
> FYI, I got a a bug report [1] with a 'stack smashing detected' when running
> 'nvme sanitize-log /dev/nvme0' on Debian. Originally, it was reported against
> udisk. udisk recently added libnvme which does now a sanitize-log call, so this
> problem might exists for a while.
> 
> We figured out that an older kernel such as 4.19.289 work but newer not (it's a
> bit hard for the reporter to test all combinations on his setup due to compiler
> changes etc.).
> 
> There was a bit of refactoring in v5.2 which could be the cause of the stack
> smash, because saw this recent fix:
> 
>  b8f6446b6853 ("nvme-pci: fix DMA direction of unmapping integrity data")
> 
> [1] https://github.com/storaged-project/udisks/issues/1152

If you think it is related to DMA, there are good ways to check for:

  1) force that an IOMMU is used for this device
  2) hack nvme or the blk-map code that we never do the direct mapping
     to user space but do the copy based version, and then enable
     all kernel memory debugging helpers, most importantly KASAN


  reply	other threads:[~2023-07-26 13:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 11:52 stack smashing detected with 'nvme sanitize-log /dev/nvme0' Daniel Wagner
2023-07-26 13:16 ` Christoph Hellwig [this message]
2023-08-21 13:37   ` Daniel Wagner
2023-08-21 15:11     ` Keith Busch
2023-08-22  7:55       ` Daniel Wagner
2023-08-23 15:37         ` Keith Busch
2023-08-25  6:36           ` Daniel Wagner
2023-08-28  9:21             ` Christoph Hellwig
2023-09-25 15:09               ` Daniel Wagner
2023-09-25 15:19                 ` Christoph Hellwig
2023-08-28  9:20       ` Christoph Hellwig
2023-08-29 13:29         ` Keith Busch
2023-08-28  9:18     ` Christoph Hellwig
2023-07-27  1:30 ` Ming Lei
2023-07-27  1:37   ` Guangwu Zhang
2023-07-27  7:23     ` Daniel Wagner

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=20230726131643.GA16186@lst.de \
    --to=hch@lst.de \
    --cc=dwagner@suse.de \
    --cc=guazhang@redhat.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.com \
    /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.