syzbot


kernel BUG in trace_dma_map_sg

Status: upstream: reported on 2024/09/25 13:45
Subsystems: iommu
[Documentation on labels]
Reported-by: syzbot+d409db2070842f867cd1@syzkaller.appspotmail.com
First crash: 60d, last: 60d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [iommu?] kernel BUG in trace_dma_map_sg 0 (1) 2024/09/25 13:45

Sample crash report:
FAULT_INJECTION: forcing a failure.
name fail_usercopy, interval 1, probability 0, space 0, times 1
CPU: 0 UID: 0 PID: 5101 Comm: syz.0.0 Not tainted 6.11.0-syzkaller-07462-g1868f9d0260e #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:93 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
 fail_dump lib/fault-inject.c:52 [inline]
 should_fail_ex+0x3b0/0x4e0 lib/fault-inject.c:153
 _inline_copy_to_user include/linux/uaccess.h:177 [inline]
 _copy_to_user+0x2f/0xb0 lib/usercopy.c:26
 copy_to_user include/linux/uaccess.h:209 [inline]
 simple_read_from_buffer+0xca/0x150 fs/libfs.c:1124
 proc_fail_nth_read+0x1e9/0x250 fs/proc/base.c:1481
 vfs_read+0x201/0xbc0 fs/read_write.c:567
 ksys_read+0x1a0/0x2c0 fs/read_write.c:712
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f145197c93c
Code: ec 28 48 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 69 8e 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 48 89 44 24 08 e8 bf 8e 02 00 48
RSP: 002b:00007f1452852030 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f1451b35f80 RCX: 00007f145197c93c
RDX: 000000000000000f RSI: 00007f14528520a0 RDI: 0000000000000004
RBP: 00007f1452852090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007f1451b35f80 R15: 00007ffd70304738
 </TASK>
------------[ cut here ]------------
kernel BUG at include/linux/scatterlist.h:171!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5101 Comm: syz.0.0 Not tainted 6.11.0-syzkaller-07462-g1868f9d0260e #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:sg_page include/linux/scatterlist.h:171 [inline]
RIP: 0010:sg_phys include/linux/scatterlist.h:389 [inline]
RIP: 0010:perf_trace_dma_map_sg+0xf34/0xf40 include/trace/events/dma.h:178
Code: 00 00 00 fc ff df e9 60 fc ff ff e8 c6 81 17 00 48 c7 c7 40 84 94 8e 4c 89 f6 e8 a7 70 72 03 e9 e3 f2 ff ff e8 ad 81 17 00 90 <0f> 0b e8 b5 eb 41 0a 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90
RSP: 0000:ffffc9000308e9e0 EFLAGS: 00010093
RAX: ffffffff817d3d73 RBX: ffffe8ffffc40d6d RCX: ffff88801fb54880
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc9000308eb40 R08: ffffffff817d33c4 R09: 322e66313a30303a
R10: dffffc0000000000 R11: fffff91ffff881ae R12: ffff888000ae26a8
R13: 0000000000000038 R14: 0000000000000008 R15: ffff88804b9e1781
FS:  00007f14528526c0(0000) GS:ffff88801fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f14519dc900 CR3: 000000001ffb0000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 trace_dma_map_sg+0x1da/0x240 include/trace/events/dma.h:178
 __dma_map_sg_attrs+0x106/0x1a0 kernel/dma/mapping.c:222
 dma_map_sg_attrs+0x34/0x50 kernel/dma/mapping.c:254
 ata_sg_setup drivers/ata/libata-core.c:4651 [inline]
 ata_qc_issue+0x4cf/0xf40 drivers/ata/libata-core.c:4963
 ata_scsi_translate drivers/ata/libata-scsi.c:1760 [inline]
 __ata_scsi_queuecmd+0x9fb/0x1030 drivers/ata/libata-scsi.c:4189
 ata_scsi_queuecmd+0x3bb/0x530 drivers/ata/libata-scsi.c:4234
 scsi_dispatch_cmd drivers/scsi/scsi_lib.c:1608 [inline]
 scsi_queue_rq+0x1d7c/0x2e90 drivers/scsi/scsi_lib.c:1850
 blk_mq_dispatch_rq_list+0xb89/0x1b30 block/blk-mq.c:2032
 __blk_mq_do_dispatch_sched block/blk-mq-sched.c:170 [inline]
 blk_mq_do_dispatch_sched block/blk-mq-sched.c:184 [inline]
 __blk_mq_sched_dispatch_requests+0xb8a/0x1840 block/blk-mq-sched.c:309
 blk_mq_sched_dispatch_requests+0xcb/0x140 block/blk-mq-sched.c:331
 blk_mq_run_hw_queue+0x9a5/0xae0 block/blk-mq.c:2245
 blk_mq_flush_plug_list+0x1127/0x1890 block/blk-mq.c:2797
 __blk_flush_plug+0x420/0x500 block/blk-core.c:1199
 blk_finish_plug+0x5e/0x80 block/blk-core.c:1226
 read_pages+0x644/0x840 mm/readahead.c:183
 page_cache_ra_unbounded+0x24c/0x8a0 mm/readahead.c:257
 do_sync_mmap_readahead+0x499/0x970
 filemap_fault+0x820/0x1750 mm/filemap.c:3325
 __do_fault+0x135/0x460 mm/memory.c:4670
 do_read_fault mm/memory.c:5076 [inline]
 do_fault mm/memory.c:5206 [inline]
 do_pte_missing mm/memory.c:3962 [inline]
 handle_pte_fault+0x3228/0x7010 mm/memory.c:5536
 __handle_mm_fault mm/memory.c:5679 [inline]
 handle_mm_fault+0x1106/0x1bb0 mm/memory.c:5847
 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7f1451951958
Code: 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 62 e2 7d 28 7a ce 89 f8 25 ff 0f 00 00 3d e0 0f 00 00 0f 87 b8 01 00 00 <62> e1 fe 28 6f 17 62 a1 f5 20 ef da 62 a1 6d 20 da db 62 b2 66 20
RSP: 002b:00007f145284f8b8 EFLAGS: 00010283
RAX: 0000000000000900 RBX: 00007f145284fe30 RCX: 0000000000000000
RDX: 00007f1452851f78 RSI: 0000000000000025 RDI: 00007f14519dc900
RBP: 00000000fbad8004 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f145284fe10
R13: 00007f1452851f78 R14: 00007f1451b35f80 R15: 00007ffd70304738
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:sg_page include/linux/scatterlist.h:171 [inline]
RIP: 0010:sg_phys include/linux/scatterlist.h:389 [inline]
RIP: 0010:perf_trace_dma_map_sg+0xf34/0xf40 include/trace/events/dma.h:178
Code: 00 00 00 fc ff df e9 60 fc ff ff e8 c6 81 17 00 48 c7 c7 40 84 94 8e 4c 89 f6 e8 a7 70 72 03 e9 e3 f2 ff ff e8 ad 81 17 00 90 <0f> 0b e8 b5 eb 41 0a 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90
RSP: 0000:ffffc9000308e9e0 EFLAGS: 00010093
RAX: ffffffff817d3d73 RBX: ffffe8ffffc40d6d RCX: ffff88801fb54880
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc9000308eb40 R08: ffffffff817d33c4 R09: 322e66313a30303a
R10: dffffc0000000000 R11: fffff91ffff881ae R12: ffff888000ae26a8
R13: 0000000000000038 R14: 0000000000000008 R15: ffff88804b9e1781
FS:  00007f14528526c0(0000) GS:ffff88801fe00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f14519dc900 CR3: 000000001ffb0000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/21 13:42 upstream 1868f9d0260e 6f888b75 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in trace_dma_map_sg
* Struck through repros no longer work on HEAD.