linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: syzbot <syzbot+55b80301d2f1b98738ce@syzkaller.appspotmail.com>
To: jstultz@google.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,  sboyd@kernel.org,
	syzkaller-bugs@googlegroups.com, tglx@linutronix.de
Subject: [syzbot] [mm?] KCSAN: data-race in do_sync_mmap_readahead / do_sync_mmap_readahead (7)
Date: Fri, 06 Sep 2024 03:46:27 -0700	[thread overview]
Message-ID: <0000000000008b6aa30621711e8f@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    c3f2d783a459 Merge tag 'mm-hotfixes-stable-2024-08-17-19-3..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16475bd3980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=77bd8f74037eecb
dashboard link: https://syzkaller.appspot.com/bug?extid=55b80301d2f1b98738ce
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7d33f08b7d45/disk-c3f2d783.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/06f0ae9609a1/vmlinux-c3f2d783.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e319fa11563c/bzImage-c3f2d783.xz

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

==================================================================
BUG: KCSAN: data-race in do_sync_mmap_readahead / do_sync_mmap_readahead

write to 0xffff88810f822480 of 4 bytes by task 4192 on cpu 0:
 do_sync_mmap_readahead+0x236/0x2a0 mm/filemap.c:3172
 filemap_fault+0x331/0xa60 mm/filemap.c:3314
 __do_fault+0xb6/0x200 mm/memory.c:4655
 do_shared_fault mm/memory.c:5121 [inline]
 do_fault mm/memory.c:5195 [inline]
 do_pte_missing mm/memory.c:3947 [inline]
 handle_pte_fault mm/memory.c:5521 [inline]
 __handle_mm_fault mm/memory.c:5664 [inline]
 handle_mm_fault+0xc0a/0x2940 mm/memory.c:5832
 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x296/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 rep_movs_alternative+0x33/0x70 arch/x86/lib/copy_user_64.S:57
 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline]
 _inline_copy_to_user include/linux/uaccess.h:181 [inline]
 _copy_to_user+0x77/0xa0 lib/usercopy.c:26
 copy_to_user include/linux/uaccess.h:209 [inline]
 put_timespec64+0x64/0xb0 kernel/time/time.c:910
 __do_sys_clock_gettime kernel/time/posix-timers.c:1144 [inline]
 __se_sys_clock_gettime kernel/time/posix-timers.c:1132 [inline]
 __x64_sys_clock_gettime+0x138/0x180 kernel/time/posix-timers.c:1132
 x64_sys_call+0x27b5/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:229
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff88810f822480 of 4 bytes by task 4191 on cpu 1:
 do_sync_mmap_readahead+0x236/0x2a0 mm/filemap.c:3172
 filemap_fault+0x331/0xa60 mm/filemap.c:3314
 __do_fault+0xb6/0x200 mm/memory.c:4655
 do_shared_fault mm/memory.c:5121 [inline]
 do_fault mm/memory.c:5195 [inline]
 do_pte_missing mm/memory.c:3947 [inline]
 handle_pte_fault mm/memory.c:5521 [inline]
 __handle_mm_fault mm/memory.c:5664 [inline]
 handle_mm_fault+0xc0a/0x2940 mm/memory.c:5832
 do_user_addr_fault arch/x86/mm/fault.c:1389 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x296/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
 rep_movs_alternative+0x33/0x70 arch/x86/lib/copy_user_64.S:57
 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline]
 raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline]
 _inline_copy_to_user include/linux/uaccess.h:181 [inline]
 _copy_to_user+0x77/0xa0 lib/usercopy.c:26
 copy_to_user include/linux/uaccess.h:209 [inline]
 put_timespec64+0x64/0xb0 kernel/time/time.c:910
 __do_sys_clock_gettime kernel/time/posix-timers.c:1144 [inline]
 __se_sys_clock_gettime kernel/time/posix-timers.c:1132 [inline]
 __x64_sys_clock_gettime+0x138/0x180 kernel/time/posix-timers.c:1132
 x64_sys_call+0x27b5/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:229
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000 -> 0x00000020

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4191 Comm: syz.0.141 Not tainted 6.11.0-rc3-syzkaller-00338-gc3f2d783a459 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================


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


                 reply	other threads:[~2024-09-06 10:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0000000000008b6aa30621711e8f@google.com \
    --to=syzbot+55b80301d2f1b98738ce@syzkaller.appspotmail.com \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sboyd@kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox