* [syzbot] WARNING in __dma_map_sg_attrs
@ 2021-12-01 18:18 ` syzbot
0 siblings, 0 replies; 16+ messages in thread
From: syzbot @ 2021-12-01 18:18 UTC (permalink / raw)
To: christian.koenig, dri-devel, hch, iommu, linaro-mm-sig,
linux-kernel, linux-media, m.szyprowski, robin.murphy,
sumit.semwal, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: c5c17547b778 Merge tag 'net-5.16-rc3' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13a73609b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf85c53718a1e697
dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
Unfortunately, I don't have any reproducer for this issue yet.
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 2 PID: 17169 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 0 PID: 17169 Comm: syz-executor.3 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d 70 6d b1 0d e9 db fe ff ff e8 86 ff 12 00 0f 0b e8 7f ff 12 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 70 ff 12 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc90002c0fb20 EFLAGS: 00010216
RAX: 0000000000013018 RBX: 0000000000000020 RCX: ffffc900037d4000
RDX: 0000000000040000 RSI: ffffffff8163d361 RDI: ffff8880182ae4d0
RBP: ffff8880182ae088 R08: 0000000000000002 R09: ffff888017ba054f
R10: ffffffff8163d242 R11: 000000000008808a R12: 0000000000000000
R13: ffff888024ca5700 R14: 0000000000000001 R15: 0000000000000000
FS: 00007fa269e34700(0000) GS:ffff88802cb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000040c120 CR3: 000000006c77c000 CR4: 0000000000150ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
drm_gem_map_dma_buf+0x12a/0x1e0 drivers/gpu/drm/drm_prime.c:633
__map_dma_buf drivers/dma-buf/dma-buf.c:675 [inline]
dma_buf_map_attachment+0x39a/0x5b0 drivers/dma-buf/dma-buf.c:954
drm_gem_prime_import_dev.part.0+0x85/0x220 drivers/gpu/drm/drm_prime.c:939
drm_gem_prime_import_dev drivers/gpu/drm/drm_prime.c:982 [inline]
drm_gem_prime_import+0xc8/0x200 drivers/gpu/drm/drm_prime.c:982
virtgpu_gem_prime_import+0x49/0x150 drivers/gpu/drm/virtio/virtgpu_prime.c:166
drm_gem_prime_fd_to_handle+0x21d/0x550 drivers/gpu/drm/drm_prime.c:318
drm_prime_fd_to_handle_ioctl+0x9b/0xd0 drivers/gpu/drm/drm_prime.c:374
drm_ioctl_kernel+0x27d/0x4e0 drivers/gpu/drm/drm_ioctl.c:782
drm_ioctl+0x51e/0x9d0 drivers/gpu/drm/drm_ioctl.c:885
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fa26c8beae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa269e34188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fa26c9d1f60 RCX: 00007fa26c8beae9
RDX: 00000000200004c0 RSI: 00000000c00c642e RDI: 0000000000000005
RBP: 00007fa26c918f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc0019c51f R14: 00007fa269e34300 R15: 0000000000022000
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [syzbot] WARNING in __dma_map_sg_attrs
@ 2021-12-01 18:18 ` syzbot
0 siblings, 0 replies; 16+ messages in thread
From: syzbot @ 2021-12-01 18:18 UTC (permalink / raw)
To: christian.koenig, dri-devel, hch, iommu, linaro-mm-sig,
linux-kernel, linux-media, m.szyprowski, robin.murphy,
sumit.semwal, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: c5c17547b778 Merge tag 'net-5.16-rc3' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13a73609b00000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf85c53718a1e697
dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
Unfortunately, I don't have any reproducer for this issue yet.
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 2 PID: 17169 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 0 PID: 17169 Comm: syz-executor.3 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d 70 6d b1 0d e9 db fe ff ff e8 86 ff 12 00 0f 0b e8 7f ff 12 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 70 ff 12 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc90002c0fb20 EFLAGS: 00010216
RAX: 0000000000013018 RBX: 0000000000000020 RCX: ffffc900037d4000
RDX: 0000000000040000 RSI: ffffffff8163d361 RDI: ffff8880182ae4d0
RBP: ffff8880182ae088 R08: 0000000000000002 R09: ffff888017ba054f
R10: ffffffff8163d242 R11: 000000000008808a R12: 0000000000000000
R13: ffff888024ca5700 R14: 0000000000000001 R15: 0000000000000000
FS: 00007fa269e34700(0000) GS:ffff88802cb00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000040c120 CR3: 000000006c77c000 CR4: 0000000000150ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
drm_gem_map_dma_buf+0x12a/0x1e0 drivers/gpu/drm/drm_prime.c:633
__map_dma_buf drivers/dma-buf/dma-buf.c:675 [inline]
dma_buf_map_attachment+0x39a/0x5b0 drivers/dma-buf/dma-buf.c:954
drm_gem_prime_import_dev.part.0+0x85/0x220 drivers/gpu/drm/drm_prime.c:939
drm_gem_prime_import_dev drivers/gpu/drm/drm_prime.c:982 [inline]
drm_gem_prime_import+0xc8/0x200 drivers/gpu/drm/drm_prime.c:982
virtgpu_gem_prime_import+0x49/0x150 drivers/gpu/drm/virtio/virtgpu_prime.c:166
drm_gem_prime_fd_to_handle+0x21d/0x550 drivers/gpu/drm/drm_prime.c:318
drm_prime_fd_to_handle_ioctl+0x9b/0xd0 drivers/gpu/drm/drm_prime.c:374
drm_ioctl_kernel+0x27d/0x4e0 drivers/gpu/drm/drm_ioctl.c:782
drm_ioctl+0x51e/0x9d0 drivers/gpu/drm/drm_ioctl.c:885
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fa26c8beae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa269e34188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fa26c9d1f60 RCX: 00007fa26c8beae9
RDX: 00000000200004c0 RSI: 00000000c00c642e RDI: 0000000000000005
RBP: 00007fa26c918f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc0019c51f R14: 00007fa269e34300 R15: 0000000000022000
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
2021-12-01 18:18 ` syzbot
@ 2021-12-02 6:55 ` Christoph Hellwig
-1 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2021-12-02 6:55 UTC (permalink / raw)
To: syzbot
Cc: christian.koenig, dri-devel, hch, iommu, linaro-mm-sig,
linux-kernel, linux-media, m.szyprowski, robin.murphy,
sumit.semwal, syzkaller-bugs
This means the virtgpu driver uses dma mapping helpers but has not set up
a DMA mask (which most likely suggests it is some kind of virtual device).
On Wed, Dec 01, 2021 at 10:18:21AM -0800, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: c5c17547b778 Merge tag 'net-5.16-rc3' of git://git.kernel...
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=13a73609b00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=bf85c53718a1e697
> dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> WARNING: CPU: 2 PID: 17169 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Modules linked in:
> CPU: 0 PID: 17169 Comm: syz-executor.3 Not tainted 5.16.0-rc2-syzkaller #0
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
> RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d 70 6d b1 0d e9 db fe ff ff e8 86 ff 12 00 0f 0b e8 7f ff 12 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 70 ff 12 00 49 8d 7f 50 48 b8 00
> RSP: 0018:ffffc90002c0fb20 EFLAGS: 00010216
> RAX: 0000000000013018 RBX: 0000000000000020 RCX: ffffc900037d4000
> RDX: 0000000000040000 RSI: ffffffff8163d361 RDI: ffff8880182ae4d0
> RBP: ffff8880182ae088 R08: 0000000000000002 R09: ffff888017ba054f
> R10: ffffffff8163d242 R11: 000000000008808a R12: 0000000000000000
> R13: ffff888024ca5700 R14: 0000000000000001 R15: 0000000000000000
> FS: 00007fa269e34700(0000) GS:ffff88802cb00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000000000040c120 CR3: 000000006c77c000 CR4: 0000000000150ee0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
> drm_gem_map_dma_buf+0x12a/0x1e0 drivers/gpu/drm/drm_prime.c:633
> __map_dma_buf drivers/dma-buf/dma-buf.c:675 [inline]
> dma_buf_map_attachment+0x39a/0x5b0 drivers/dma-buf/dma-buf.c:954
> drm_gem_prime_import_dev.part.0+0x85/0x220 drivers/gpu/drm/drm_prime.c:939
> drm_gem_prime_import_dev drivers/gpu/drm/drm_prime.c:982 [inline]
> drm_gem_prime_import+0xc8/0x200 drivers/gpu/drm/drm_prime.c:982
> virtgpu_gem_prime_import+0x49/0x150 drivers/gpu/drm/virtio/virtgpu_prime.c:166
> drm_gem_prime_fd_to_handle+0x21d/0x550 drivers/gpu/drm/drm_prime.c:318
> drm_prime_fd_to_handle_ioctl+0x9b/0xd0 drivers/gpu/drm/drm_prime.c:374
> drm_ioctl_kernel+0x27d/0x4e0 drivers/gpu/drm/drm_ioctl.c:782
> drm_ioctl+0x51e/0x9d0 drivers/gpu/drm/drm_ioctl.c:885
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:874 [inline]
> __se_sys_ioctl fs/ioctl.c:860 [inline]
> __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
> do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> entry_SYSCALL_64_after_hwframe+0x44/0xae
> RIP: 0033:0x7fa26c8beae9
> Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007fa269e34188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 00007fa26c9d1f60 RCX: 00007fa26c8beae9
> RDX: 00000000200004c0 RSI: 00000000c00c642e RDI: 0000000000000005
> RBP: 00007fa26c918f6d R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
> R13: 00007ffc0019c51f R14: 00007fa269e34300 R15: 0000000000022000
> </TASK>
>
>
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
---end quoted text---
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
@ 2021-12-02 6:55 ` Christoph Hellwig
0 siblings, 0 replies; 16+ messages in thread
From: Christoph Hellwig @ 2021-12-02 6:55 UTC (permalink / raw)
To: syzbot
Cc: sumit.semwal, syzkaller-bugs, linux-kernel, dri-devel, hch,
linaro-mm-sig, iommu, robin.murphy, christian.koenig,
linux-media
This means the virtgpu driver uses dma mapping helpers but has not set up
a DMA mask (which most likely suggests it is some kind of virtual device).
On Wed, Dec 01, 2021 at 10:18:21AM -0800, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: c5c17547b778 Merge tag 'net-5.16-rc3' of git://git.kernel...
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=13a73609b00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=bf85c53718a1e697
> dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> WARNING: CPU: 2 PID: 17169 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Modules linked in:
> CPU: 0 PID: 17169 Comm: syz-executor.3 Not tainted 5.16.0-rc2-syzkaller #0
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
> RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d 70 6d b1 0d e9 db fe ff ff e8 86 ff 12 00 0f 0b e8 7f ff 12 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 70 ff 12 00 49 8d 7f 50 48 b8 00
> RSP: 0018:ffffc90002c0fb20 EFLAGS: 00010216
> RAX: 0000000000013018 RBX: 0000000000000020 RCX: ffffc900037d4000
> RDX: 0000000000040000 RSI: ffffffff8163d361 RDI: ffff8880182ae4d0
> RBP: ffff8880182ae088 R08: 0000000000000002 R09: ffff888017ba054f
> R10: ffffffff8163d242 R11: 000000000008808a R12: 0000000000000000
> R13: ffff888024ca5700 R14: 0000000000000001 R15: 0000000000000000
> FS: 00007fa269e34700(0000) GS:ffff88802cb00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 000000000040c120 CR3: 000000006c77c000 CR4: 0000000000150ee0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
> drm_gem_map_dma_buf+0x12a/0x1e0 drivers/gpu/drm/drm_prime.c:633
> __map_dma_buf drivers/dma-buf/dma-buf.c:675 [inline]
> dma_buf_map_attachment+0x39a/0x5b0 drivers/dma-buf/dma-buf.c:954
> drm_gem_prime_import_dev.part.0+0x85/0x220 drivers/gpu/drm/drm_prime.c:939
> drm_gem_prime_import_dev drivers/gpu/drm/drm_prime.c:982 [inline]
> drm_gem_prime_import+0xc8/0x200 drivers/gpu/drm/drm_prime.c:982
> virtgpu_gem_prime_import+0x49/0x150 drivers/gpu/drm/virtio/virtgpu_prime.c:166
> drm_gem_prime_fd_to_handle+0x21d/0x550 drivers/gpu/drm/drm_prime.c:318
> drm_prime_fd_to_handle_ioctl+0x9b/0xd0 drivers/gpu/drm/drm_prime.c:374
> drm_ioctl_kernel+0x27d/0x4e0 drivers/gpu/drm/drm_ioctl.c:782
> drm_ioctl+0x51e/0x9d0 drivers/gpu/drm/drm_ioctl.c:885
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:874 [inline]
> __se_sys_ioctl fs/ioctl.c:860 [inline]
> __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
> do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> entry_SYSCALL_64_after_hwframe+0x44/0xae
> RIP: 0033:0x7fa26c8beae9
> Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007fa269e34188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 00007fa26c9d1f60 RCX: 00007fa26c8beae9
> RDX: 00000000200004c0 RSI: 00000000c00c642e RDI: 0000000000000005
> RBP: 00007fa26c918f6d R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
> R13: 00007ffc0019c51f R14: 00007fa269e34300 R15: 0000000000022000
> </TASK>
>
>
> ---
> This report is generated by a bot. It may contain errors.
> See https://goo.gl/tpsmEJ for more information about syzbot.
> syzbot engineers can be reached at syzkaller@googlegroups.com.
>
> syzbot will keep track of this issue. See:
> https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
---end quoted text---
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
2021-12-01 18:18 ` syzbot
@ 2022-02-05 20:18 ` syzbot
-1 siblings, 0 replies; 16+ messages in thread
From: syzbot @ 2022-02-05 20:18 UTC (permalink / raw)
To: christian.koenig, dri-devel, hch, iommu, linaro-mm-sig-owner,
linaro-mm-sig, linux-kernel, linux-media, m.szyprowski,
robin.murphy, sumit.semwal, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11b2637c700000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f043113811433a5
dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c65542700000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1163f480700000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f62fcf530f9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
@ 2022-02-05 20:18 ` syzbot
0 siblings, 0 replies; 16+ messages in thread
From: syzbot @ 2022-02-05 20:18 UTC (permalink / raw)
To: christian.koenig, dri-devel, hch, iommu, linaro-mm-sig-owner,
linaro-mm-sig, linux-kernel, linux-media, m.szyprowski,
robin.murphy, sumit.semwal, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11b2637c700000
kernel config: https://syzkaller.appspot.com/x/.config?x=6f043113811433a5
dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c65542700000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1163f480700000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f62fcf530f9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
2022-02-05 20:18 ` syzbot
(?)
@ 2022-02-08 12:26 ` Daniel Vetter
-1 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2022-02-08 12:26 UTC (permalink / raw)
To: syzbot, Gerd Hoffmann
Cc: sumit.semwal, linaro-mm-sig-owner, syzkaller-bugs, linux-kernel,
dri-devel, hch, linaro-mm-sig, iommu, robin.murphy,
christian.koenig, linux-media
On Sat, Feb 05, 2022 at 12:18:23PM -0800, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11b2637c700000
> kernel config: https://syzkaller.appspot.com/x/.config?x=6f043113811433a5
> dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c65542700000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1163f480700000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
Adding Gerd, since this seems to blow up in udmabuf.
I wonder why syzbot didn't figure this out, since it seems to have
correctly added both dma-api and dma-buf people. Just not the maintainer
for the begin_cpu_udmabuf function in the middle of the backtrace?
-Daniel
>
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Modules linked in:
> CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
> RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
> RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
> RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
> R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
> R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
> FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
> get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
> begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
> dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
> dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:874 [inline]
> __se_sys_ioctl fs/ioctl.c:860 [inline]
> __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
> do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> entry_SYSCALL_64_after_hwframe+0x44/0xae
> RIP: 0033:0x7f62fcf530f9
> Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
> RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
> RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
> R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> </TASK>
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
@ 2022-02-08 12:26 ` Daniel Vetter
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2022-02-08 12:26 UTC (permalink / raw)
To: syzbot, Gerd Hoffmann
Cc: christian.koenig, dri-devel, hch, iommu, linaro-mm-sig-owner,
linaro-mm-sig, linux-kernel, linux-media, m.szyprowski,
robin.murphy, sumit.semwal, syzkaller-bugs
On Sat, Feb 05, 2022 at 12:18:23PM -0800, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11b2637c700000
> kernel config: https://syzkaller.appspot.com/x/.config?x=6f043113811433a5
> dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c65542700000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1163f480700000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
Adding Gerd, since this seems to blow up in udmabuf.
I wonder why syzbot didn't figure this out, since it seems to have
correctly added both dma-api and dma-buf people. Just not the maintainer
for the begin_cpu_udmabuf function in the middle of the backtrace?
-Daniel
>
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Modules linked in:
> CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
> RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
> RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
> RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
> R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
> R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
> FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
> get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
> begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
> dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
> dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:874 [inline]
> __se_sys_ioctl fs/ioctl.c:860 [inline]
> __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
> do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> entry_SYSCALL_64_after_hwframe+0x44/0xae
> RIP: 0033:0x7f62fcf530f9
> Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
> RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
> RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
> R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> </TASK>
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
@ 2022-02-08 12:26 ` Daniel Vetter
0 siblings, 0 replies; 16+ messages in thread
From: Daniel Vetter @ 2022-02-08 12:26 UTC (permalink / raw)
To: syzbot, Gerd Hoffmann
Cc: sumit.semwal, linaro-mm-sig-owner, syzkaller-bugs, linux-kernel,
dri-devel, hch, linaro-mm-sig, iommu, m.szyprowski, robin.murphy,
christian.koenig, linux-media
On Sat, Feb 05, 2022 at 12:18:23PM -0800, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=11b2637c700000
> kernel config: https://syzkaller.appspot.com/x/.config?x=6f043113811433a5
> dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c65542700000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1163f480700000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
Adding Gerd, since this seems to blow up in udmabuf.
I wonder why syzbot didn't figure this out, since it seems to have
correctly added both dma-api and dma-buf people. Just not the maintainer
for the begin_cpu_udmabuf function in the middle of the backtrace?
-Daniel
>
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Modules linked in:
> CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
> RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
> RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
> RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
> R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
> R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
> FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
> get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
> begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
> dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
> dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:874 [inline]
> __se_sys_ioctl fs/ioctl.c:860 [inline]
> __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
> do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> entry_SYSCALL_64_after_hwframe+0x44/0xae
> RIP: 0033:0x7f62fcf530f9
> Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
> RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
> RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
> RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
> R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> </TASK>
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
2022-02-08 12:26 ` Daniel Vetter
@ 2022-05-19 12:25 ` Dmitry Vyukov via iommu
-1 siblings, 0 replies; 16+ messages in thread
From: Dmitry Vyukov @ 2022-05-19 12:25 UTC (permalink / raw)
To: syzbot, Gerd Hoffmann, christian.koenig, dri-devel, hch, iommu,
linaro-mm-sig-owner, linaro-mm-sig, linux-kernel, linux-media,
m.szyprowski, robin.murphy, sumit.semwal, syzkaller-bugs
On Tue, 8 Feb 2022 at 13:26, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Sat, Feb 05, 2022 at 12:18:23PM -0800, syzbot wrote:
> > syzbot has found a reproducer for the following issue on:
> >
> > HEAD commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=11b2637c700000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=6f043113811433a5
> > dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
> > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c65542700000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1163f480700000
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
>
> Adding Gerd, since this seems to blow up in udmabuf.
>
> I wonder why syzbot didn't figure this out, since it seems to have
> correctly added both dma-api and dma-buf people. Just not the maintainer
> for the begin_cpu_udmabuf function in the middle of the backtrace?
Hi Daniel,
syzbot selects only 1 file to get maintainers.
Do you suggest using all files in the stack trace? I think it may lead
to too many developers CCed since there can be something like 20 files
including something from scheduler, arch, fs, etc.
> > ------------[ cut here ]------------
> > WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> > Modules linked in:
> > CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> > RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> > Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
> > RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
> > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> > RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
> > RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
> > R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
> > R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
> > FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > Call Trace:
> > <TASK>
> > dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
> > get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
> > begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
> > dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
> > dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
> > vfs_ioctl fs/ioctl.c:51 [inline]
> > __do_sys_ioctl fs/ioctl.c:874 [inline]
> > __se_sys_ioctl fs/ioctl.c:860 [inline]
> > __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
> > do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> > do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> > entry_SYSCALL_64_after_hwframe+0x44/0xae
> > RIP: 0033:0x7f62fcf530f9
> > Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
> > RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> > RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
> > RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
> > RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
> > R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
> > R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> > </TASK>
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/YgJhjdAbRHdnCZ4T%40phenom.ffwll.local.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [syzbot] WARNING in __dma_map_sg_attrs
@ 2022-05-19 12:25 ` Dmitry Vyukov via iommu
0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Vyukov via iommu @ 2022-05-19 12:25 UTC (permalink / raw)
To: syzbot, Gerd Hoffmann, christian.koenig, dri-devel, hch, iommu,
linaro-mm-sig-owner, linaro-mm-sig, linux-kernel, linux-media,
m.szyprowski, robin.murphy, sumit.semwal, syzkaller-bugs
On Tue, 8 Feb 2022 at 13:26, Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Sat, Feb 05, 2022 at 12:18:23PM -0800, syzbot wrote:
> > syzbot has found a reproducer for the following issue on:
> >
> > HEAD commit: 0457e5153e0e Merge tag 'for-linus' of git://git.kernel.org..
> > git tree: upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=11b2637c700000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=6f043113811433a5
> > dashboard link: https://syzkaller.appspot.com/bug?extid=10e27961f4da37c443b2
> > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11c65542700000
> > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1163f480700000
> >
> > IMPORTANT: if you fix the issue, please add the following tag to the commit:
> > Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
>
> Adding Gerd, since this seems to blow up in udmabuf.
>
> I wonder why syzbot didn't figure this out, since it seems to have
> correctly added both dma-api and dma-buf people. Just not the maintainer
> for the begin_cpu_udmabuf function in the middle of the backtrace?
Hi Daniel,
syzbot selects only 1 file to get maintainers.
Do you suggest using all files in the stack trace? I think it may lead
to too many developers CCed since there can be something like 20 files
including something from scheduler, arch, fs, etc.
> > ------------[ cut here ]------------
> > WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188 __dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> > Modules linked in:
> > CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
> > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> > RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
> > Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0 83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45 31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
> > RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
> > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
> > RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
> > RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
> > R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
> > R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
> > FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
> > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
> > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > Call Trace:
> > <TASK>
> > dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
> > get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
> > begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
> > dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
> > dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
> > vfs_ioctl fs/ioctl.c:51 [inline]
> > __do_sys_ioctl fs/ioctl.c:874 [inline]
> > __se_sys_ioctl fs/ioctl.c:860 [inline]
> > __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
> > do_syscall_x64 arch/x86/entry/common.c:50 [inline]
> > do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
> > entry_SYSCALL_64_after_hwframe+0x44/0xae
> > RIP: 0033:0x7f62fcf530f9
> > Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
> > RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> > RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
> > RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
> > RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
> > R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
> > R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
> > </TASK>
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-bugs+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-bugs/YgJhjdAbRHdnCZ4T%40phenom.ffwll.local.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH] udmabuf: Set the DMA mask for the udmabuf device
2022-05-19 12:25 ` Dmitry Vyukov via iommu
(?)
@ 2022-05-20 6:23 ` Vivek Kasireddy
-1 siblings, 0 replies; 16+ messages in thread
From: Vivek Kasireddy @ 2022-05-20 6:23 UTC (permalink / raw)
To: dri-devel; +Cc: Vivek Kasireddy, Gerd Hoffmann
If the DMA mask is not set explicitly, the following warning occurs
when the userspace tries to access the dma-buf via the CPU as
reported by syzbot here:
WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188
__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted
5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0
83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45
31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f62fcf530f9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89
f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01
f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
Reported-by: syzbot+10e27961f4da37c443b2 at syzkaller.appspotmail.com
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
drivers/dma-buf/udmabuf.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index e7330684d3b8..8f9aab9ece32 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -365,7 +365,22 @@ static struct miscdevice udmabuf_misc = {
static int __init udmabuf_dev_init(void)
{
- return misc_register(&udmabuf_misc);
+ int ret;
+
+ ret = misc_register(&udmabuf_misc);
+ if (ret < 0) {
+ pr_err("Could not initialize udmabuf device\n");
+ return ret;
+ }
+
+ ret = dma_coerce_mask_and_coherent(udmabuf_misc.this_device,
+ DMA_BIT_MASK(64));
+ if (ret < 0) {
+ pr_err("Could not setup DMA mask for udmabuf device\n");
+ return ret;
+ }
+
+ return 0;
}
static void __exit udmabuf_dev_exit(void)
--
2.35.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH] udmabuf: Set the DMA mask for the udmabuf device (v2)
2022-05-19 12:25 ` Dmitry Vyukov via iommu
(?)
(?)
@ 2022-05-20 20:52 ` Vivek Kasireddy
-1 siblings, 0 replies; 16+ messages in thread
From: Vivek Kasireddy @ 2022-05-20 20:52 UTC (permalink / raw)
To: dri-devel; +Cc: Gerd Hoffmann, Vivek Kasireddy, syzbot+10e27961f4da37c443b2
If the DMA mask is not set explicitly, the following warning occurs
when the userspace tries to access the dma-buf via the CPU as
reported by syzbot here:
WARNING: CPU: 1 PID: 3595 at kernel/dma/mapping.c:188
__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Modules linked in:
CPU: 0 PID: 3595 Comm: syz-executor249 Not tainted
5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
RIP: 0010:__dma_map_sg_attrs+0x181/0x1f0 kernel/dma/mapping.c:188
Code: 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 71 4c 8b 3d c0
83 b5 0d e9 db fe ff ff e8 b6 0f 13 00 0f 0b e8 af 0f 13 00 <0f> 0b 45
31 e4 e9 54 ff ff ff e8 a0 0f 13 00 49 8d 7f 50 48 b8 00
RSP: 0018:ffffc90002a07d68 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88807e25e2c0 RSI: ffffffff81649e91 RDI: ffff88801b848408
RBP: ffff88801b848000 R08: 0000000000000002 R09: ffff88801d86c74f
R10: ffffffff81649d72 R11: 0000000000000001 R12: 0000000000000002
R13: ffff88801d86c680 R14: 0000000000000001 R15: 0000000000000000
FS: 0000555556e30300(0000) GS:ffff8880b9d00000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200000cc CR3: 000000001d74a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
dma_map_sgtable+0x70/0xf0 kernel/dma/mapping.c:264
get_sg_table.isra.0+0xe0/0x160 drivers/dma-buf/udmabuf.c:72
begin_cpu_udmabuf+0x130/0x1d0 drivers/dma-buf/udmabuf.c:126
dma_buf_begin_cpu_access+0xfd/0x1d0 drivers/dma-buf/dma-buf.c:1164
dma_buf_ioctl+0x259/0x2b0 drivers/dma-buf/dma-buf.c:363
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f62fcf530f9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89
f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01
f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe3edab9b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f62fcf530f9
RDX: 0000000020000200 RSI: 0000000040086200 RDI: 0000000000000006
RBP: 00007f62fcf170e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f62fcf17170
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
v2: Dont't forget to deregister if DMA mask setup fails.
Reported-by: syzbot+10e27961f4da37c443b2@syzkaller.appspotmail.com
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
drivers/dma-buf/udmabuf.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index e7330684d3b8..384cb3d06ff3 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -365,7 +365,23 @@ static struct miscdevice udmabuf_misc = {
static int __init udmabuf_dev_init(void)
{
- return misc_register(&udmabuf_misc);
+ int ret;
+
+ ret = misc_register(&udmabuf_misc);
+ if (ret < 0) {
+ pr_err("Could not initialize udmabuf device\n");
+ return ret;
+ }
+
+ ret = dma_coerce_mask_and_coherent(udmabuf_misc.this_device,
+ DMA_BIT_MASK(64));
+ if (ret < 0) {
+ pr_err("Could not setup DMA mask for udmabuf device\n");
+ misc_deregister(&udmabuf_misc);
+ return ret;
+ }
+
+ return 0;
}
static void __exit udmabuf_dev_exit(void)
--
2.35.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH] udmabuf: Set the DMA mask for the udmabuf device
2022-05-20 6:23 ` [PATCH] udmabuf: Set the DMA mask for the udmabuf device Vivek Kasireddy
(?)
@ 2022-05-23 11:03 ` Dan Carpenter
-1 siblings, 0 replies; 16+ messages in thread
From: kernel test robot @ 2022-05-20 19:32 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3215 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220520062308.3660563-1-vivek.kasireddy@intel.com>
References: <20220520062308.3660563-1-vivek.kasireddy@intel.com>
TO: Vivek Kasireddy <vivek.kasireddy@intel.com>
TO: dri-devel(a)lists.freedesktop.org
CC: Vivek Kasireddy <vivek.kasireddy@intel.com>
CC: Gerd Hoffmann <kraxel@redhat.com>
Hi Vivek,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on linus/master tegra-drm/drm/tegra/for-next v5.18-rc7 next-20220520]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/intel-lab-lkp/linux/commits/Vivek-Kasireddy/udmabuf-Set-the-DMA-mask-for-the-udmabuf-device/20220520-144218
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
:::::: branch date: 13 hours ago
:::::: commit date: 13 hours ago
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205210319.OvuI0mKr-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/dma-buf/udmabuf.c:383 udmabuf_dev_init() warn: '&udmabuf_misc' from misc_register() not released on lines: 380.
Old smatch warnings:
drivers/dma-buf/udmabuf.c:239 udmabuf_create() error: uninitialized symbol 'subpgoff'.
drivers/dma-buf/udmabuf.c:242 udmabuf_create() error: uninitialized symbol 'maxsubpgs'.
vim +383 drivers/dma-buf/udmabuf.c
fbb0de79507819 Gerd Hoffmann 2018-08-27 365
fbb0de79507819 Gerd Hoffmann 2018-08-27 366 static int __init udmabuf_dev_init(void)
fbb0de79507819 Gerd Hoffmann 2018-08-27 367 {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 368 int ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 369
0fdcc793991b9f Vivek Kasireddy 2022-05-19 370 ret = misc_register(&udmabuf_misc);
0fdcc793991b9f Vivek Kasireddy 2022-05-19 371 if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 372 pr_err("Could not initialize udmabuf device\n");
0fdcc793991b9f Vivek Kasireddy 2022-05-19 373 return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 374 }
0fdcc793991b9f Vivek Kasireddy 2022-05-19 375
0fdcc793991b9f Vivek Kasireddy 2022-05-19 376 ret = dma_coerce_mask_and_coherent(udmabuf_misc.this_device,
0fdcc793991b9f Vivek Kasireddy 2022-05-19 377 DMA_BIT_MASK(64));
0fdcc793991b9f Vivek Kasireddy 2022-05-19 378 if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 379 pr_err("Could not setup DMA mask for udmabuf device\n");
0fdcc793991b9f Vivek Kasireddy 2022-05-19 380 return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 381 }
0fdcc793991b9f Vivek Kasireddy 2022-05-19 382
0fdcc793991b9f Vivek Kasireddy 2022-05-19 @383 return 0;
fbb0de79507819 Gerd Hoffmann 2018-08-27 384 }
fbb0de79507819 Gerd Hoffmann 2018-08-27 385
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] udmabuf: Set the DMA mask for the udmabuf device
@ 2022-05-23 11:03 ` Dan Carpenter
0 siblings, 0 replies; 16+ messages in thread
From: Dan Carpenter @ 2022-05-23 11:03 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2117 bytes --]
Hi Vivek,
url: https://github.com/intel-lab-lkp/linux/commits/Vivek-Kasireddy/udmabuf-Set-the-DMA-mask-for-the-udmabuf-device/20220520-144218
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205210319.OvuI0mKr-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/dma-buf/udmabuf.c:383 udmabuf_dev_init() warn: '&udmabuf_misc' from misc_register() not released on lines: 380.
vim +383 drivers/dma-buf/udmabuf.c
fbb0de79507819 Gerd Hoffmann 2018-08-27 366 static int __init udmabuf_dev_init(void)
fbb0de79507819 Gerd Hoffmann 2018-08-27 367 {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 368 int ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 369
0fdcc793991b9f Vivek Kasireddy 2022-05-19 370 ret = misc_register(&udmabuf_misc);
0fdcc793991b9f Vivek Kasireddy 2022-05-19 371 if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 372 pr_err("Could not initialize udmabuf device\n");
0fdcc793991b9f Vivek Kasireddy 2022-05-19 373 return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 374 }
0fdcc793991b9f Vivek Kasireddy 2022-05-19 375
0fdcc793991b9f Vivek Kasireddy 2022-05-19 376 ret = dma_coerce_mask_and_coherent(udmabuf_misc.this_device,
0fdcc793991b9f Vivek Kasireddy 2022-05-19 377 DMA_BIT_MASK(64));
0fdcc793991b9f Vivek Kasireddy 2022-05-19 378 if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 379 pr_err("Could not setup DMA mask for udmabuf device\n");
misc_unregister()?
0fdcc793991b9f Vivek Kasireddy 2022-05-19 380 return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 381 }
0fdcc793991b9f Vivek Kasireddy 2022-05-19 382
0fdcc793991b9f Vivek Kasireddy 2022-05-19 @383 return 0;
fbb0de79507819 Gerd Hoffmann 2018-08-27 384 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH] udmabuf: Set the DMA mask for the udmabuf device
@ 2022-05-23 11:03 ` Dan Carpenter
0 siblings, 0 replies; 16+ messages in thread
From: Dan Carpenter @ 2022-05-23 11:03 UTC (permalink / raw)
To: kbuild, Vivek Kasireddy, dri-devel
Cc: Gerd Hoffmann, kbuild-all, lkp, Vivek Kasireddy
Hi Vivek,
url: https://github.com/intel-lab-lkp/linux/commits/Vivek-Kasireddy/udmabuf-Set-the-DMA-mask-for-the-udmabuf-device/20220520-144218
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220521/202205210319.OvuI0mKr-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/dma-buf/udmabuf.c:383 udmabuf_dev_init() warn: '&udmabuf_misc' from misc_register() not released on lines: 380.
vim +383 drivers/dma-buf/udmabuf.c
fbb0de79507819 Gerd Hoffmann 2018-08-27 366 static int __init udmabuf_dev_init(void)
fbb0de79507819 Gerd Hoffmann 2018-08-27 367 {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 368 int ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 369
0fdcc793991b9f Vivek Kasireddy 2022-05-19 370 ret = misc_register(&udmabuf_misc);
0fdcc793991b9f Vivek Kasireddy 2022-05-19 371 if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 372 pr_err("Could not initialize udmabuf device\n");
0fdcc793991b9f Vivek Kasireddy 2022-05-19 373 return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 374 }
0fdcc793991b9f Vivek Kasireddy 2022-05-19 375
0fdcc793991b9f Vivek Kasireddy 2022-05-19 376 ret = dma_coerce_mask_and_coherent(udmabuf_misc.this_device,
0fdcc793991b9f Vivek Kasireddy 2022-05-19 377 DMA_BIT_MASK(64));
0fdcc793991b9f Vivek Kasireddy 2022-05-19 378 if (ret < 0) {
0fdcc793991b9f Vivek Kasireddy 2022-05-19 379 pr_err("Could not setup DMA mask for udmabuf device\n");
misc_unregister()?
0fdcc793991b9f Vivek Kasireddy 2022-05-19 380 return ret;
0fdcc793991b9f Vivek Kasireddy 2022-05-19 381 }
0fdcc793991b9f Vivek Kasireddy 2022-05-19 382
0fdcc793991b9f Vivek Kasireddy 2022-05-19 @383 return 0;
fbb0de79507819 Gerd Hoffmann 2018-08-27 384 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2022-05-23 11:03 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01 18:18 [syzbot] WARNING in __dma_map_sg_attrs syzbot
2021-12-01 18:18 ` syzbot
2021-12-02 6:55 ` Christoph Hellwig
2021-12-02 6:55 ` Christoph Hellwig
2022-02-05 20:18 ` syzbot
2022-02-05 20:18 ` syzbot
2022-02-08 12:26 ` Daniel Vetter
2022-02-08 12:26 ` Daniel Vetter
2022-02-08 12:26 ` Daniel Vetter
2022-05-19 12:25 ` Dmitry Vyukov
2022-05-19 12:25 ` Dmitry Vyukov via iommu
2022-05-20 6:23 ` [PATCH] udmabuf: Set the DMA mask for the udmabuf device Vivek Kasireddy
2022-05-20 20:52 ` [PATCH] udmabuf: Set the DMA mask for the udmabuf device (v2) Vivek Kasireddy
2022-05-20 19:32 [PATCH] udmabuf: Set the DMA mask for the udmabuf device kernel test robot
2022-05-23 11:03 ` Dan Carpenter
2022-05-23 11:03 ` Dan Carpenter
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.