All of lore.kernel.org
 help / color / mirror / Atom feed
* [syzbot] WARNING in is_valid_gup_args
@ 2023-02-07  6:23 syzbot
  2023-02-07 12:21 ` Hillf Danton
  0 siblings, 1 reply; 2+ messages in thread
From: syzbot @ 2023-02-07  6:23 UTC (permalink / raw)
  To: akpm, linux-kernel, linux-mm, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    49a8133221c7 Add linux-next specific files for 20230207
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=15016013480000
kernel config:  https://syzkaller.appspot.com/x/.config?x=3691b32dd4410e01
dashboard link: https://syzkaller.appspot.com/bug?extid=1f0c9407f4d20f7488b9
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.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6277c699d71e/disk-49a81332.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cbef27c2f238/vmlinux-49a81332.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7c0c68d93ac8/bzImage-49a81332.xz

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

------------[ cut here ]------------
WARNING: CPU: 1 PID: 11452 at mm/gup.c:2121 is_valid_gup_args+0x1d8/0x230 mm/gup.c:2121
Modules linked in:
CPU: 1 PID: 11452 Comm: syz-executor.0 Not tainted 6.2.0-rc7-next-20230207-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
RIP: 0010:is_valid_gup_args+0x1d8/0x230 mm/gup.c:2121
Code: c7 ff 48 83 3c 24 00 0f 85 7a ff ff ff e8 10 3a c7 ff 0f 0b 45 31 e4 eb cd e8 04 3a c7 ff 0f 0b 45 31 e4 eb c1 e8 f8 39 c7 ff <0f> 0b 45 31 e4 eb b5 e8 ec 39 c7 ff 0f 0b 45 31 e4 eb a9 e8 e0 39
RSP: 0018:ffffc900091f72c0 EFLAGS: 00010212
RAX: 000000000000165e RBX: 0000000000040000 RCX: ffffc90003dc1000
RDX: 0000000000040000 RSI: ffffffff81bd3248 RDI: 0000000000000005
RBP: ffffc900091f7320 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000040000 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000040000 R15: 0000000000040000
FS:  00007f31c3ca4700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b31624000 CR3: 0000000027a30000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 pin_user_pages_fast+0x83/0x100 mm/gup.c:3089
 iov_iter_extract_user_pages lib/iov_iter.c:2160 [inline]
 iov_iter_extract_pages+0x2b9/0x1e20 lib/iov_iter.c:2229
 __bio_iov_iter_get_pages block/bio.c:1267 [inline]
 bio_iov_iter_get_pages block/bio.c:1340 [inline]
 bio_iov_iter_get_pages+0x354/0x1580 block/bio.c:1327
 iomap_dio_bio_iter+0x830/0x1440 fs/iomap/direct-io.c:323
 iomap_dio_iter fs/iomap/direct-io.c:436 [inline]
 __iomap_dio_rw+0xd81/0x1d80 fs/iomap/direct-io.c:594
 iomap_dio_rw+0x40/0xa0 fs/iomap/direct-io.c:682
 ext4_dio_write_iter fs/ext4/file.c:587 [inline]
 ext4_file_write_iter+0x1053/0x1710 fs/ext4/file.c:698
 call_write_iter include/linux/fs.h:1851 [inline]
 do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735
 do_iter_write+0x182/0x700 fs/read_write.c:861
 vfs_writev+0x1aa/0x670 fs/read_write.c:934
 do_pwritev+0x1b6/0x270 fs/read_write.c:1031
 __do_sys_pwritev2 fs/read_write.c:1090 [inline]
 __se_sys_pwritev2 fs/read_write.c:1081 [inline]
 __x64_sys_pwritev2+0xef/0x150 fs/read_write.c:1081
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f31c2e8c0c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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:00007f31c3ca4168 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007f31c2fabf80 RCX: 00007f31c2e8c0c9
RDX: 0000000000000001 RSI: 0000000020000240 RDI: 0000000000000003
RBP: 00007f31c2ee7ae9 R08: 0000000000000000 R09: 0000000000000003
R10: 0000000000001400 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff54ef18ef R14: 00007f31c3ca4300 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] 2+ messages in thread

* Re: [syzbot] WARNING in is_valid_gup_args
  2023-02-07  6:23 [syzbot] WARNING in is_valid_gup_args syzbot
@ 2023-02-07 12:21 ` Hillf Danton
  0 siblings, 0 replies; 2+ messages in thread
From: Hillf Danton @ 2023-02-07 12:21 UTC (permalink / raw)
  To: syzbot; +Cc: David Howells, akpm, linux-kernel, linux-mm, syzkaller-bugs

On Mate:   Mon, 06 Feb 2023 22:23:56 -0800
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    49a8133221c7 Add linux-next specific files for 20230207
> git tree:       linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=15016013480000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=3691b32dd4410e01
> dashboard link: https://syzkaller.appspot.com/bug?extid=1f0c9407f4d20f7488b9
> 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.
> 
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/6277c699d71e/disk-49a81332.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/cbef27c2f238/vmlinux-49a81332.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/7c0c68d93ac8/bzImage-49a81332.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+1f0c9407f4d20f7488b9@syzkaller.appspotmail.com
> 
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 11452 at mm/gup.c:2121 is_valid_gup_args+0x1d8/0x230 mm/gup.c:2121
> Modules linked in:
> CPU: 1 PID: 11452 Comm: syz-executor.0 Not tainted 6.2.0-rc7-next-20230207-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
> RIP: 0010:is_valid_gup_args+0x1d8/0x230 mm/gup.c:2121
> Code: c7 ff 48 83 3c 24 00 0f 85 7a ff ff ff e8 10 3a c7 ff 0f 0b 45 31 e4 eb cd e8 04 3a c7 ff 0f 0b 45 31 e4 eb c1 e8 f8 39 c7 ff <0f> 0b 45 31 e4 eb b5 e8 ec 39 c7 ff 0f 0b 45 31 e4 eb a9 e8 e0 39
> RSP: 0018:ffffc900091f72c0 EFLAGS: 00010212
> RAX: 000000000000165e RBX: 0000000000040000 RCX: ffffc90003dc1000
> RDX: 0000000000040000 RSI: ffffffff81bd3248 RDI: 0000000000000005
> RBP: ffffc900091f7320 R08: 0000000000000005 R09: 0000000000000000
> R10: 0000000000040000 R11: 0000000000000000 R12: 0000000000000000
> R13: 0000000000000000 R14: 0000000000040000 R15: 0000000000040000
> FS:  00007f31c3ca4700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000001b31624000 CR3: 0000000027a30000 CR4: 00000000003506e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
>  <TASK>
>  pin_user_pages_fast+0x83/0x100 mm/gup.c:3089
>  iov_iter_extract_user_pages lib/iov_iter.c:2160 [inline]
>  iov_iter_extract_pages+0x2b9/0x1e20 lib/iov_iter.c:2229
>  __bio_iov_iter_get_pages block/bio.c:1267 [inline]
>  bio_iov_iter_get_pages block/bio.c:1340 [inline]
>  bio_iov_iter_get_pages+0x354/0x1580 block/bio.c:1327
>  iomap_dio_bio_iter+0x830/0x1440 fs/iomap/direct-io.c:323
>  iomap_dio_iter fs/iomap/direct-io.c:436 [inline]
>  __iomap_dio_rw+0xd81/0x1d80 fs/iomap/direct-io.c:594
>  iomap_dio_rw+0x40/0xa0 fs/iomap/direct-io.c:682
>  ext4_dio_write_iter fs/ext4/file.c:587 [inline]
>  ext4_file_write_iter+0x1053/0x1710 fs/ext4/file.c:698
>  call_write_iter include/linux/fs.h:1851 [inline]
>  do_iter_readv_writev+0x20b/0x3b0 fs/read_write.c:735
>  do_iter_write+0x182/0x700 fs/read_write.c:861
>  vfs_writev+0x1aa/0x670 fs/read_write.c:934
>  do_pwritev+0x1b6/0x270 fs/read_write.c:1031
>  __do_sys_pwritev2 fs/read_write.c:1090 [inline]
>  __se_sys_pwritev2 fs/read_write.c:1081 [inline]
>  __x64_sys_pwritev2+0xef/0x150 fs/read_write.c:1081
>  do_syscall_x64 arch/x86/entry/common.c:50 [inline]
>  do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
>  entry_SYSCALL_64_after_hwframe+0x63/0xcd

Quick fix like the diff below can be test when a reproducer is available.

--- x/lib/iov_iter.c
+++ y/lib/iov_iter.c
@@ -2140,7 +2140,7 @@ static ssize_t iov_iter_extract_user_pag
 					   size_t *offset0)
 {
 	unsigned long addr;
-	unsigned int gup_flags = FOLL_PIN;
+	unsigned int gup_flags = 0;
 	size_t offset;
 	int res;
 


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

end of thread, other threads:[~2023-02-07 12:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07  6:23 [syzbot] WARNING in is_valid_gup_args syzbot
2023-02-07 12:21 ` Hillf Danton

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.