[syzbot] WARNING in drm_gem_shmem_vm_open

15 views
Skip to first unread message

syzbot

unread,
Aug 19, 2021, 4:21:25 AM8/19/21
to air...@linux.ie, christia...@amd.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, linaro...@lists.linaro.org, linux-...@vger.kernel.org, linux...@vger.kernel.org, maarten....@linux.intel.com, mri...@kernel.org, sumit....@linaro.org, syzkall...@googlegroups.com, tzimm...@suse.de
Hello,

syzbot found the following issue on:

HEAD commit: 614cb2751d31 Merge tag 'trace-v5.14-rc6' of git://git.kern..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1462cb61300000
kernel config: https://syzkaller.appspot.com/x/.config?x=96f0602203250753
dashboard link: https://syzkaller.appspot.com/bug?extid=91525b2bd4b5dff71619
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122bce0e300000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+91525b...@syzkaller.appspotmail.com

------------[ cut here ]------------
WARNING: CPU: 0 PID: 11697 at drivers/gpu/drm/drm_gem_shmem_helper.c:562 drm_gem_shmem_vm_open+0x96/0xb0 drivers/gpu/drm/drm_gem_shmem_helper.c:562
Modules linked in:
CPU: 0 PID: 11697 Comm: syz-executor.3 Not tainted 5.14.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:drm_gem_shmem_vm_open+0x96/0xb0 drivers/gpu/drm/drm_gem_shmem_helper.c:562
Code: 89 c6 e8 7d ec 23 fd 85 db 75 1a e8 34 e5 23 fd 48 89 ef 5b 5d 41 5c e9 e8 61 f5 ff e8 23 e5 23 fd 0f 0b eb ca e8 1a e5 23 fd <0f> 0b eb dd e8 b1 1f 6a fd eb 89 e8 aa 1f 6a fd eb a8 0f 1f 84 00
RSP: 0018:ffffc9000b3cfb90 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 00000000fffffffc RCX: 0000000000000000
RDX: ffff8880364eb880 RSI: ffffffff8451c3e6 RDI: 0000000000000003
RBP: ffff888033c70948 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff8451c3c3 R11: 0000000000000001 R12: ffff888146490800
R13: ffff888033c70a50 R14: 0000000020166000 R15: ffff888033c709d8
FS: 00007fbe43056700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005422b8 CR3: 0000000036274000 CR4: 0000000000350ef0
Call Trace:
__split_vma+0x23c/0x550 mm/mmap.c:2764
__do_munmap+0x32a/0x11c0 mm/mmap.c:2868
do_munmap mm/mmap.c:2922 [inline]
munmap_vma_range mm/mmap.c:604 [inline]
mmap_region+0x85a/0x1760 mm/mmap.c:1753
do_mmap+0x86e/0x1180 mm/mmap.c:1584
vm_mmap_pgoff+0x1b7/0x290 mm/util.c:519
ksys_mmap_pgoff+0x4a8/0x620 mm/mmap.c:1635
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:0x4665e9
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:00007fbe43056188 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9
RDX: 0000000000000000 RSI: 0000000000002000 RDI: 0000000020166000
RBP: 00000000004bfcc4 R08: 0000000000000004 R09: 0000000000000000
R10: 0000000000000013 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007fffb615701f R14: 00007fbe43056300 R15: 0000000000022000
----------------
Code disassembly (best guess):
0: 89 c6 mov %eax,%esi
2: e8 7d ec 23 fd callq 0xfd23ec84
7: 85 db test %ebx,%ebx
9: 75 1a jne 0x25
b: e8 34 e5 23 fd callq 0xfd23e544
10: 48 89 ef mov %rbp,%rdi
13: 5b pop %rbx
14: 5d pop %rbp
15: 41 5c pop %r12
17: e9 e8 61 f5 ff jmpq 0xfff56204
1c: e8 23 e5 23 fd callq 0xfd23e544
21: 0f 0b ud2
23: eb ca jmp 0xffffffef
25: e8 1a e5 23 fd callq 0xfd23e544
2a: 0f 0b ud2 <-- trapping instruction
2c: eb dd jmp 0xb
2e: e8 b1 1f 6a fd callq 0xfd6a1fe4
33: eb 89 jmp 0xffffffbe
35: e8 aa 1f 6a fd callq 0xfd6a1fe4
3a: eb a8 jmp 0xffffffe4
3c: 0f .byte 0xf
3d: 1f (bad)
3e: 84 00 test %al,(%rax)


---
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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Aug 20, 2021, 11:45:08 AM8/20/21
to air...@linux.ie, christia...@amd.com, daniel...@ffwll.ch, daniel...@intel.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, linaro-mm...@lists.linaro.org, linaro...@lists.linaro.org, linux-...@vger.kernel.org, linux...@vger.kernel.org, maarten....@linux.intel.com, melis...@gmail.com, mri...@kernel.org, sumit....@linaro.org, syzkall...@googlegroups.com, tzimm...@suse.de
syzbot has bisected this issue to:

commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
Author: Daniel Vetter <daniel...@ffwll.ch>
Date: Fri Oct 9 23:21:56 2020 +0000

drm/vkms: fbdev emulation support

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11c31d55300000
start commit: 614cb2751d31 Merge tag 'trace-v5.14-rc6' of git://git.kern..
git tree: upstream
final oops: https://syzkaller.appspot.com/x/report.txt?x=13c31d55300000
console output: https://syzkaller.appspot.com/x/log.txt?x=15c31d55300000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122bce0e300000

Reported-by: syzbot+91525b...@syzkaller.appspotmail.com
Fixes: ea40d7857d52 ("drm/vkms: fbdev emulation support")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

Thomas Zimmermann

unread,
Aug 20, 2021, 3:23:55 PM8/20/21
to syzbot, air...@linux.ie, christia...@amd.com, daniel...@ffwll.ch, daniel...@intel.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, linaro-mm...@lists.linaro.org, linaro...@lists.linaro.org, linux-...@vger.kernel.org, linux...@vger.kernel.org, maarten....@linux.intel.com, melis...@gmail.com, mri...@kernel.org, sumit....@linaro.org, syzkall...@googlegroups.com
Hi

Am 20.08.21 um 17:45 schrieb syzbot:
> syzbot has bisected this issue to:

Good bot!

>
> commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
> Author: Daniel Vetter <daniel...@ffwll.ch>
> Date: Fri Oct 9 23:21:56 2020 +0000
>
> drm/vkms: fbdev emulation support

Here's a guess.

GEM SHMEM + fbdev emulation requires that
(drm_mode_config.prefer_shadow_fbdev = true). Otherwise, deferred I/O
and SHMEM conflict over the use of page flags IIRC.

From a quick grep, vkms doesn't set prefer_shadow_fbdev and an alarming
amount of SHMEM-based drivers don't do either.

Best regards
Thomas

>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11c31d55300000
> start commit: 614cb2751d31 Merge tag 'trace-v5.14-rc6' of git://git.kern..
> git tree: upstream
> final oops: https://syzkaller.appspot.com/x/report.txt?x=13c31d55300000
> console output: https://syzkaller.appspot.com/x/log.txt?x=15c31d55300000
> kernel config: https://syzkaller.appspot.com/x/.config?x=96f0602203250753
> dashboard link: https://syzkaller.appspot.com/bug?extid=91525b2bd4b5dff71619
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122bce0e300000
>
> Reported-by: syzbot+91525b...@syzkaller.appspotmail.com
> Fixes: ea40d7857d52 ("drm/vkms: fbdev emulation support")
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

OpenPGP_signature

Daniel Vetter

unread,
Aug 20, 2021, 3:33:29 PM8/20/21
to Thomas Zimmermann, syzbot, Dave Airlie, Christian König, Daniel Vetter, dri-devel, linaro-mm...@lists.linaro.org, moderated list:DMA BUFFER SHARING FRAMEWORK, Linux Kernel Mailing List, open list:DMA BUFFER SHARING FRAMEWORK, Maarten Lankhorst, Melissa Wen, Maxime Ripard, Sumit Semwal, syzkaller-bugs
On Fri, Aug 20, 2021 at 9:23 PM Thomas Zimmermann <tzimm...@suse.de> wrote:
> Hi
>
> Am 20.08.21 um 17:45 schrieb syzbot:
> > syzbot has bisected this issue to:
>
> Good bot!
>
> >
> > commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
> > Author: Daniel Vetter <daniel...@ffwll.ch>
> > Date: Fri Oct 9 23:21:56 2020 +0000
> >
> > drm/vkms: fbdev emulation support
>
> Here's a guess.
>
> GEM SHMEM + fbdev emulation requires that
> (drm_mode_config.prefer_shadow_fbdev = true). Otherwise, deferred I/O
> and SHMEM conflict over the use of page flags IIRC.

But we should only set up defio if fb->dirty is set, which vkms
doesn't do. So there's something else going on? So there must be
something else funny going on here I think ... No idea what's going on
really.
-Daniel

> From a quick grep, vkms doesn't set prefer_shadow_fbdev and an alarming
> amount of SHMEM-based drivers don't do either.
>
> Best regards
> Thomas
>
> >
> > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11c31d55300000
> > start commit: 614cb2751d31 Merge tag 'trace-v5.14-rc6' of git://git.kern..
> > git tree: upstream
> > final oops: https://syzkaller.appspot.com/x/report.txt?x=13c31d55300000
> > console output: https://syzkaller.appspot.com/x/log.txt?x=15c31d55300000
> > kernel config: https://syzkaller.appspot.com/x/.config?x=96f0602203250753
> > dashboard link: https://syzkaller.appspot.com/bug?extid=91525b2bd4b5dff71619
> > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122bce0e300000
> >
> > Reported-by: syzbot+91525b...@syzkaller.appspotmail.com
> > Fixes: ea40d7857d52 ("drm/vkms: fbdev emulation support")
> >
> > For information about bisection process see: https://goo.gl/tpsmEJ#bisection
> >
>
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
>


--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

syzbot

unread,
Jan 31, 2022, 2:50:09 AM1/31/22
to air...@linux.ie, bugs...@moonlit-rail.com, christia...@amd.com, daniel...@ffwll.ch, daniel...@intel.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, jav...@redhat.com, linaro-mm...@lists.linaro.org, linaro...@lists.linaro.org, linux-...@vger.kernel.org, linux...@vger.kernel.org, maarten....@linux.intel.com, max...@cerno.tech, melis...@gmail.com, mri...@kernel.org, sumit....@linaro.org, syzkall...@googlegroups.com, tzimm...@suse.de
syzbot suspects this issue was fixed by commit:

commit 0499f419b76f94ede08304aad5851144813ac55c
Author: Javier Martinez Canillas <jav...@redhat.com>
Date: Mon Jan 10 09:56:25 2022 +0000

video: vga16fb: Only probe for EGA and VGA 16 color graphic cards

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=126571e0700000
start commit: 5d6ab0bb408f Merge tag 'xtensa-20211008' of git://github.c..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=32e6048063923b7b
dashboard link: https://syzkaller.appspot.com/bug?extid=91525b2bd4b5dff71619
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11073300b00000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: video: vga16fb: Only probe for EGA and VGA 16 color graphic cards

Dmitry Vyukov

unread,
May 12, 2022, 9:10:50 AM5/12/22
to syzbot, air...@linux.ie, bugs...@moonlit-rail.com, christia...@amd.com, daniel...@ffwll.ch, daniel...@intel.com, dan...@ffwll.ch, dri-...@lists.freedesktop.org, jav...@redhat.com, linaro-mm...@lists.linaro.org, linaro...@lists.linaro.org, linux-...@vger.kernel.org, linux...@vger.kernel.org, maarten....@linux.intel.com, max...@cerno.tech, melis...@gmail.com, mri...@kernel.org, sumit....@linaro.org, syzkall...@googlegroups.com, tzimm...@suse.de
Not sure, but maybe:
Reply all
Reply to author
Forward
0 new messages