[syzbot] WARNING in drm_gem_shmem_vm_open

Started by syzbot on Aug 19, 2021 · 6 messages from 4 authors · Last reply May 12, 2022

open the first message on its own page

Message details and related content
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: <redacted>

------------[ 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

47 more lines

Message details and related content
syzbot has bisected this issue to:

commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
Author: Daniel Vetter [off-list ref]
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
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: <redacted>
Fixes: ea40d7857d52 ("drm/vkms: fbdev emulation support")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Message details and related content
Hi

Am 20.08.21 um 17:45 schrieb syzbot:
syzbot has bisected this issue to:
Good bot!
commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
Author: Daniel Vetter [off-list ref]
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: <redacted>
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
Message details and related content
On Fri, Aug 20, 2021 at 9:23 PM Thomas Zimmermann [off-list ref] wrote:
Hi

Am 20.08.21 um 17:45 schrieb syzbot:
quoted
syzbot has bisected this issue to:
Good bot!
quoted
commit ea40d7857d5250e5400f38c69ef9e17321e9c4a2
Author: Daniel Vetter [off-list ref]
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
quoted
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: <redacted>
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
Message details and related content
syzbot suspects this issue was fixed by commit:

commit 0499f419b76f94ede08304aad5851144813ac55c
Author: Javier Martinez Canillas [off-list ref]
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

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Message details and related content
On Mon, 31 Jan 2022 at 08:50, syzbot
[off-list ref] wrote:
syzbot suspects this issue was fixed by commit:

commit 0499f419b76f94ede08304aad5851144813ac55c
Author: Javier Martinez Canillas [off-list ref]
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
Not sure, but maybe:

#syz fix: video: vga16fb: Only probe for EGA and VGA 16 color graphic cards
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help