stack smashing detected with 'nvme sanitize-log /dev/nvme0'

Christoph Hellwig hch at lst.de
Mon Aug 28 02:18:50 PDT 2023


On Mon, Aug 21, 2023 at 03:37:55PM +0200, Daniel Wagner wrote:
>    --- a/drivers/nvme/host/core.c
>    +++ b/drivers/nvme/host/core.c
>    @@ -1871,7 +1871,6 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
>                    blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX));
>            }
>            blk_queue_virt_boundary(q, NVME_CTRL_PAGE_SIZE - 1);
>    -       blk_queue_dma_alignment(q, 3);
>            blk_queue_write_cache(q, vwc, vwc);
>    }
> 

> So what's the best way forward from here? Introduce a quirk and always
> use bounce buffer?

Add a quirk for the device so that we require 512 byte alignment for it.
I suspect the same one will apply to this whole family of buggy MAXIO
devices..



More information about the Linux-nvme mailing list