From: Sean Anderson <sean.anderson@linux.dev>
To: Christoph Hellwig <hch@lst.de>
Cc: syzbot <syzbot+b4bfacdec173efaa8567@syzkaller.appspotmail.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
m.szyprowski@samsung.com, robin.murphy@arm.com,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [iommu?] kernel BUG in dma_alloc_attrs
Date: Thu, 17 Oct 2024 10:48:00 -0400 [thread overview]
Message-ID: <32ad3314-c2bc-4d3c-b4ae-28f96ac965af@linux.dev> (raw)
In-Reply-To: <20241017144020.GA22666@lst.de>
On 10/17/24 10:40, Christoph Hellwig wrote:
> On Thu, Oct 17, 2024 at 10:31:40AM -0400, Sean Anderson wrote:
>> 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?
>
> The DMA allocator always returns page aligned memory.
>
>> Since this function returns a virtual address, I think that would be
>> fine.
>
> Ok, I'll look into that. I'll need to check if %p gets obsfucated
> for traces like it does for normal dmesg first, though.
>
I have a patch written up for this; will send it after testing.
--Sean
prev parent reply other threads:[~2024-10-17 14:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 19:09 [syzbot] [iommu?] kernel BUG in dma_alloc_attrs syzbot
2024-10-16 8:02 ` Christoph Hellwig
2024-10-17 14:31 ` Sean Anderson
2024-10-17 14:40 ` Christoph Hellwig
2024-10-17 14:48 ` Sean Anderson [this message]
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=32ad3314-c2bc-4d3c-b4ae-28f96ac965af@linux.dev \
--to=sean.anderson@linux.dev \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
--cc=syzbot+b4bfacdec173efaa8567@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox