From: Jason Gunthorpe <jgg@ziepe.ca>
To: Will Deacon <will@kernel.org>
Cc: syzbot <syzbot+e06bb7478e687f235ad7@syzkaller.appspotmail.com>,
iommu@lists.linux.dev, joro@8bytes.org,
linux-kernel@vger.kernel.org, robin.murphy@arm.com,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [iommu?] kernel BUG in iommu_pages_start_incoherent
Date: Fri, 12 Dec 2025 02:47:49 -0400 [thread overview]
Message-ID: <aTu6lckiUr5R7MsQ@ziepe.ca> (raw)
In-Reply-To: <aTp0jpmWZ49Ql-Kp@google.com>
On Thu, Dec 11, 2025 at 04:36:46PM +0900, Will Deacon wrote:
> > kernel BUG at arch/x86/mm/physaddr.c:28!
> > Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
> > CPU: 0 UID: 0 PID: 5336 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
> > Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
> > RIP: 0010:__phys_addr+0x16b/0x180 arch/x86/mm/physaddr.c:28
> > Code: 8b b3 00 e9 45 ff ff ff e8 b2 af 4b 00 48 c7 c7 f0 33 fb 8d 48 89 de 4c 89 f2 e8 50 c0 52 03 e9 4d ff ff ff e8 96 af 4b 00 90 <0f> 0b e8 8e af 4b 00 90 0f 0b e8 86 af 4b 00 90 0f 0b 0f 1f 00 90
> > RSP: 0018:ffffc9000aae5f80 EFLAGS: 00010093
> > RAX: ffffffff817610fa RBX: 0000778000000000 RCX: ffff8880007ca4c0
> > RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000778000000000
> > RBP: ffffc9000aae6130 R08: ffffffff8e26c433 R09: 1ffffffff1c4d886
> > R10: dffffc0000000000 R11: fffffbfff1c4d887 R12: 0000000000000011
> > R13: dffffc0000000000 R14: 0000000080000000 R15: dffffc0000000000
> > FS: 00007fae02b026c0(0000) GS:ffff88808d23e000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 00007fae01d2dea0 CR3: 000000000b669000 CR4: 0000000000352ef0
> > Call Trace:
> > <TASK>
> > virt_to_folio include/linux/mm.h:1432 [inline]
> > virt_to_ioptdesc drivers/iommu/iommu-pages.h:49 [inline]
> > iommu_pages_start_incoherent+0x52/0x310 drivers/iommu/iommu-pages.c:148
> > _table_alloc drivers/iommu/generic_pt/iommu_pt.h:377 [inline]
> > table_alloc drivers/iommu/generic_pt/iommu_pt.h:408 [inline]
I think it is:
+++ b/drivers/iommu/generic_pt/iommu_pt.h
@@ -372,7 +372,7 @@ static inline struct pt_table_p *_table_alloc(struct pt_common *common,
table_mem = iommu_alloc_pages_node_sz(iommu_table->nid, gfp,
log2_to_int(lg2sz));
- if (pt_feature(common, PT_FEAT_DMA_INCOHERENT) &&
+ if (pt_feature(common, PT_FEAT_DMA_INCOHERENT) && table_mem &&
mode == ALLOC_NORMAL) {
int ret = iommu_pages_start_incoherent(
table_mem, iommu_table->iommu_device);
Fault injection triggered an allocation failure while emulating a VT-d
iommu that uses cache flushing..
I will send a fix when I'm able.
Jason
prev parent reply other threads:[~2025-12-12 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-11 3:26 [syzbot] [iommu?] kernel BUG in iommu_pages_start_incoherent syzbot
2025-12-11 7:36 ` Will Deacon
2025-12-12 6:47 ` Jason Gunthorpe [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=aTu6lckiUr5R7MsQ@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=syzbot+e06bb7478e687f235ad7@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=will@kernel.org \
/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.