All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [block?] WARNING in bdev_file_open_by_dev
@ 2024-02-09 18:08 syzbot
  2024-02-09 22:34 ` Christian Brauner
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: syzbot @ 2024-02-09 18:08 UTC (permalink / raw)
  To: axboe, linux-block, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    445a555e0623 Add linux-next specific files for 20240209
git tree:       linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=147c85b8180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=85aa3388229f9ea9
dashboard link: https://syzkaller.appspot.com/bug?extid=96f61f1ad84e33cee93e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=178b1e20180000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=143db9f4180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/9188bb84c998/disk-445a555e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3ce0c98eabb2/vmlinux-445a555e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ab801b1c1d6d/bzImage-445a555e.xz

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 5075 at block/bdev.c:930 blk_to_file_flags block/bdev.c:930 [inline]
WARNING: CPU: 1 PID: 5075 at block/bdev.c:930 bdev_file_open_by_dev+0x112/0x270 block/bdev.c:963
Modules linked in:
CPU: 1 PID: 5075 Comm: syz-executor215 Not tainted 6.8.0-rc3-next-20240209-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:blk_to_file_flags block/bdev.c:930 [inline]
RIP: 0010:bdev_file_open_by_dev+0x112/0x270 block/bdev.c:963
Code: 04 b2 14 fd 44 89 e8 83 e0 02 75 23 44 89 ee 83 e6 01 45 31 e4 31 ff e8 ec b1 14 fd 44 89 e8 83 e0 01 75 18 e8 9f ad 14 fd 90 <0f> 0b 90 eb 12 e8 94 ad 14 fd 41 bc 01 00 00 00 eb 05 e8 87 ad 14
RSP: 0018:ffffc90003457b58 EFLAGS: 00010293
RAX: ffffffff847f2dc1 RBX: 0000000000000000 RCX: ffff8880786e9e00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88801d0a8000 R08: ffffffff847f2db4 R09: 1ffff11003a1510b
R10: dffffc0000000000 R11: ffffed1003a1510c R12: 0000000000000000
R13: 0000000000000010 R14: 0000000000000000 R15: 0000000000000000
FS:  0000555556bbe380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000005fdeb8 CR3: 00000000785f2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 disk_scan_partitions+0x1be/0x2b0 block/genhd.c:369
 blkdev_common_ioctl+0x15cc/0x2880 block/ioctl.c:558
 blkdev_ioctl+0x532/0x740 block/ioctl.c:627
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:857
 do_syscall_64+0xfb/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f07197090e9
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffd2bd39c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fffd2bd3b98 RCX: 00007f07197090e9
RDX: 0000000000000000 RSI: 000000000000125f RDI: 0000000000000003
RBP: 00007f071977c610 R08: 002364626e2f7665 R09: 00007fffd2bd3b98
R10: 000000000000001f R11: 0000000000000246 R12: 0000000000000001
R13: 00007fffd2bd3b88 R14: 0000000000000001 R15: 0000000000000001
 </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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [block?] WARNING in bdev_file_open_by_dev
  2024-02-09 18:08 [syzbot] [block?] WARNING in bdev_file_open_by_dev syzbot
@ 2024-02-09 22:34 ` Christian Brauner
  2024-02-09 22:35 ` Christian Brauner
  2024-02-10 15:32 ` syzbot
  2 siblings, 0 replies; 7+ messages in thread
From: Christian Brauner @ 2024-02-09 22:34 UTC (permalink / raw)
  To: syzbot; +Cc: axboe, linux-block, linux-kernel, syzkaller-bugs

On Fri, Feb 09, 2024 at 10:08:27AM -0800, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    445a555e0623 Add linux-next specific files for 20240209
> git tree:       linux-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=147c85b8180000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=85aa3388229f9ea9
> dashboard link: https://syzkaller.appspot.com/bug?extid=96f61f1ad84e33cee93e
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=178b1e20180000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=143db9f4180000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/9188bb84c998/disk-445a555e.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/3ce0c98eabb2/vmlinux-445a555e.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/ab801b1c1d6d/bzImage-445a555e.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+96f61f1ad84e33cee93e@syzkaller.appspotmail.com
> 
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 5075 at block/bdev.c:930 blk_to_file_flags block/bdev.c:930 [inline]
> WARNING: CPU: 1 PID: 5075 at block/bdev.c:930 bdev_file_open_by_dev+0x112/0x270 block/bdev.c:963
> Modules linked in:
> CPU: 1 PID: 5075 Comm: syz-executor215 Not tainted 6.8.0-rc3-next-20240209-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
> RIP: 0010:blk_to_file_flags block/bdev.c:930 [inline]

So, the gist is O_* flags are annoying. The longer story is that you can
open any file with int fd = open("bla", O_RDWR | O_WRONLY). That's
mostly nonsensical. But the VFS layer will record file->f_flags |=
O_RDWR | O_WRONLY. And for the block layer this translates to
BLK_OPEN_WRITE_IOCTL. Which is meaningless except for the floppy driver
from When The West Was One. So we need to account for that nonsense when
we translate block flags bag into O_* flags. Fix pushed.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [block?] WARNING in bdev_file_open_by_dev
  2024-02-09 18:08 [syzbot] [block?] WARNING in bdev_file_open_by_dev syzbot
  2024-02-09 22:34 ` Christian Brauner
@ 2024-02-09 22:35 ` Christian Brauner
  2024-02-10  0:17   ` syzbot
  2024-02-10 15:32 ` syzbot
  2 siblings, 1 reply; 7+ messages in thread
From: Christian Brauner @ 2024-02-09 22:35 UTC (permalink / raw)
  To: syzbot; +Cc: axboe, linux-block, linux-kernel, syzkaller-bugs

On Fri, Feb 09, 2024 at 10:08:27AM -0800, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    445a555e0623 Add linux-next specific files for 20240209
> git tree:       linux-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=147c85b8180000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=85aa3388229f9ea9
> dashboard link: https://syzkaller.appspot.com/bug?extid=96f61f1ad84e33cee93e
> compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=178b1e20180000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=143db9f4180000
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/9188bb84c998/disk-445a555e.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/3ce0c98eabb2/vmlinux-445a555e.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/ab801b1c1d6d/bzImage-445a555e.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+96f61f1ad84e33cee93e@syzkaller.appspotmail.com

#syz test: git@gitlab.com:brauner/linux.git vfs.super

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [block?] WARNING in bdev_file_open_by_dev
  2024-02-09 22:35 ` Christian Brauner
@ 2024-02-10  0:17   ` syzbot
  2024-02-10  8:52     ` Christian Brauner
  0 siblings, 1 reply; 7+ messages in thread
From: syzbot @ 2024-02-10  0:17 UTC (permalink / raw)
  To: axboe, brauner, linux-block, linux-kernel, syzkaller-bugs

Hello,

syzbot tried to test the proposed patch but the build/boot failed:

failed to checkout kernel repo git@gitlab.com:brauner/linux.git/vfs.super: failed to run ["git" "fetch" "--force" "81e322358ba96b4e95306c1d79b01e0c61095de5" "vfs.super"]: exit status 128
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.



Tested on:

commit:         [unknown 
git tree:       git@gitlab.com:brauner/linux.git vfs.super
kernel config:  https://syzkaller.appspot.com/x/.config?x=85aa3388229f9ea9
dashboard link: https://syzkaller.appspot.com/bug?extid=96f61f1ad84e33cee93e
compiler:       

Note: no patches were applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [block?] WARNING in bdev_file_open_by_dev
  2024-02-10  0:17   ` syzbot
@ 2024-02-10  8:52     ` Christian Brauner
  2024-02-10  9:23       ` syzbot
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Brauner @ 2024-02-10  8:52 UTC (permalink / raw)
  To: syzbot; +Cc: axboe, linux-block, linux-kernel, syzkaller-bugs

On Fri, Feb 09, 2024 at 04:17:04PM -0800, syzbot wrote:
> Hello,
> 
> syzbot tried to test the proposed patch but the build/boot failed:
> 
> failed to checkout kernel repo git@gitlab.com:brauner/linux.git/vfs.super: failed to run ["git" "fetch" "--force" "81e322358ba96b4e95306c1d79b01e0c61095de5" "vfs.super"]: exit status 128
> Host key verification failed.
> fatal: Could not read from remote repository.
> 
> Please make sure you have the correct access rights
> and the repository exists.

#syz test: https://gitlab.com/brauner/linux vfs.super

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [block?] WARNING in bdev_file_open_by_dev
  2024-02-10  8:52     ` Christian Brauner
@ 2024-02-10  9:23       ` syzbot
  0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-02-10  9:23 UTC (permalink / raw)
  To: axboe, brauner, linux-block, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+96f61f1ad84e33cee93e@syzkaller.appspotmail.com

Tested on:

commit:         672cf418 Merge series 'Open block devices as files' of..
git tree:       https://gitlab.com/brauner/linux vfs.super
console output: https://syzkaller.appspot.com/x/log.txt?x=157f9cec180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=1ee6536d236103ff
dashboard link: https://syzkaller.appspot.com/bug?extid=96f61f1ad84e33cee93e
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Note: no patches were applied.
Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [syzbot] [block?] WARNING in bdev_file_open_by_dev
  2024-02-09 18:08 [syzbot] [block?] WARNING in bdev_file_open_by_dev syzbot
  2024-02-09 22:34 ` Christian Brauner
  2024-02-09 22:35 ` Christian Brauner
@ 2024-02-10 15:32 ` syzbot
  2 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2024-02-10 15:32 UTC (permalink / raw)
  To: axboe, brauner, hch, jack, linux-block, linux-kernel, syzkaller-bugs

syzbot has bisected this issue to:

commit e6d7c6cd8e6aeb8b4add207d31dff240680ff573
Author: Christian Brauner <brauner@kernel.org>
Date:   Tue Jan 23 13:26:20 2024 +0000

    block/genhd: port disk_scan_partitions() to file

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=15805cec180000
start commit:   445a555e0623 Add linux-next specific files for 20240209
git tree:       linux-next
final oops:     https://syzkaller.appspot.com/x/report.txt?x=17805cec180000
console output: https://syzkaller.appspot.com/x/log.txt?x=13805cec180000
kernel config:  https://syzkaller.appspot.com/x/.config?x=85aa3388229f9ea9
dashboard link: https://syzkaller.appspot.com/bug?extid=96f61f1ad84e33cee93e
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=178b1e20180000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=143db9f4180000

Reported-by: syzbot+96f61f1ad84e33cee93e@syzkaller.appspotmail.com
Fixes: e6d7c6cd8e6a ("block/genhd: port disk_scan_partitions() to file")

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-02-10 15:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-09 18:08 [syzbot] [block?] WARNING in bdev_file_open_by_dev syzbot
2024-02-09 22:34 ` Christian Brauner
2024-02-09 22:35 ` Christian Brauner
2024-02-10  0:17   ` syzbot
2024-02-10  8:52     ` Christian Brauner
2024-02-10  9:23       ` syzbot
2024-02-10 15:32 ` syzbot

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.