[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191007061212.GA17978@infradead.org>
Date: Sun, 6 Oct 2019 23:12:12 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Alan Mikhak <alan.mikhak@...ive.com>, linux-kernel@...r.kernel.org,
martin.petersen@...cle.com, alexios.zavras@...el.com,
ming.lei@...hat.com, gregkh@...uxfoundation.org,
tglx@...utronix.de, christophe.leroy@....fr, palmer@...ive.com,
paul.walmsley@...ive.com
Subject: Re: [PATCH] scatterlist: Validate page before calling PageSlab()
On Tue, Oct 01, 2019 at 09:16:23AM -0300, Jason Gunthorpe wrote:
> > If the virtual address obtained from ioremap() is not
> > backed by a page struct, virt_to_page() returns an
> > invalid page pointer. However, sg_copy_buffer() can
> > correctly recover the original virtual address. Such
> > addresses can successfully be assigned to scatterlist
> > segments to transfer data across the PCI bus with
> > sg_copy_buffer() if it were not for the crash in
> > PageSlab() when called by sg_miter_stop().
>
> I thought we already agreed in general that putting things that don't
> have struct page into the scatter list was not allowed?
Yes, that absolutely is the case.
Powered by blists - more mailing lists