[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da9db10e-98fd-405c-9167-a29235f5470b@linux.dev>
Date: Thu, 17 Oct 2024 10:31:40 -0400
From: Sean Anderson <sean.anderson@...ux.dev>
To: Christoph Hellwig <hch@....de>,
syzbot <syzbot+b4bfacdec173efaa8567@...kaller.appspotmail.com>
Cc: iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
m.szyprowski@...sung.com, robin.murphy@....com,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [iommu?] kernel BUG in dma_alloc_attrs
On 10/16/24 04:02, Christoph Hellwig wrote:
> The problem is that the dma alloc/free tracing calls virt_to_phys
> on the allocated/free memory. But that memory can be vmalloced as
> in this case. I think we don't have weirdo allocators or pools any
> more that are neither in the direct kernel mapping or vmalloc, so
> we might be able to do an
>
> if (is_vmalloc_addr())
> page_to_phys(vmalloc_to_page()))
Do we need offset_in_page?
> else
> virt_to_page()
>
> here. Or just switch to tracing the virtual address to always be
> on the safe side.
>
Since this function returns a virtual address, I think that would be
fine.
--Sean
Powered by blists - more mailing lists