From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D18AC433FE for ; Fri, 30 Sep 2022 23:42:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 744496B0071; Fri, 30 Sep 2022 19:42:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6F4276B0072; Fri, 30 Sep 2022 19:42:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BAB38D0001; Fri, 30 Sep 2022 19:42:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 4A12A6B0071 for ; Fri, 30 Sep 2022 19:42:15 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 18CFD4112C for ; Fri, 30 Sep 2022 23:42:15 +0000 (UTC) X-FDA: 79970377830.08.BBDECFB Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf30.hostedemail.com (Postfix) with ESMTP id A86A780012 for ; Fri, 30 Sep 2022 23:42:14 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9FFC062570; Fri, 30 Sep 2022 23:42:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0CA3C433C1; Fri, 30 Sep 2022 23:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1664581333; bh=SjHTCnm0eXfkdSaDjkhKhnduXwqLaczAAiDOXXWH3NM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vS2lHNnzRZUzRFfv6DBPeWPyPiDiKl63dtUNRWsw4nVcjpqA5LXyE8QFbcuNStQqx s2fZseZLoQodLRvYiGml7QFGUDqbwUDxL1/Cjho8RwP8JEsbUlz7Qijtw4UuI6pdz6 gx+APAx7IVi/q7yrDHPNYvhG/u3l16xxuDPQG8jk= Date: Fri, 30 Sep 2022 16:42:11 -0700 From: Andrew Morton To: syzbot Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Edward Liaw , Axel Rasmussen , Peter Xu , Liu Shixin , Brian Geffon , Mike Kravetz Subject: Re: [syzbot] WARNING in change_protection Message-Id: <20220930164211.b8215770d44e1a3803f1e660@linux-foundation.org> In-Reply-To: <00000000000046580505e9dea8e4@google.com> References: <00000000000046580505e9dea8e4@google.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=vS2lHNnz; spf=pass (imf30.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664581334; a=rsa-sha256; cv=none; b=pe+55G96dtcVp8WOyF8zGEhI2YpfskNHRU5UpawKWmtj+/REdecXUzY+e36gDKgvSwN07q zpN/mOFqR5TnQxgTDB8vq24/60bzXHeoHxTJmX8Iqimk75q0/xR2hFJtSql2AoRNZqbeJx lnCYOIcQVcuPeRgPfJHHQpE+oGF7m9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664581334; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NDyzBrxEme1erzX8D2o5gykWPoool85cIBA5Rjbsv5w=; b=T33TYq6le03Gaau9JOIteanbznIVKXe4YTah8rbuuZ2uTMB878zHD5krEVKZ2vMZ8P7B/I eYMKxJiArZkigkrw8jQosHqoE21Zwp1J6NVRtpSaZoBznWBXTCA98qltptA4f1VFE0Gjnw dxx3hMCzF7T0DwmVT98xe6gkYPky7CQ= Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=vS2lHNnz; spf=pass (imf30.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspam-User: X-Stat-Signature: 8t9hdgyjuauhoow8qq3s56hrapr5b6hu X-Rspamd-Queue-Id: A86A780012 X-Rspamd-Server: rspam05 X-HE-Tag: 1664581334-829521 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 29 Sep 2022 22:56:38 -0700 syzbot wrote: > Hello, Thanks. Let's cc a few userfaultfd people. > syzbot found the following issue on: > > HEAD commit: 511cce163b75 Merge tag 'net-6.0-rc8' of git://git.kernel.o.. > git tree: upstream > console+strace: https://syzkaller.appspot.com/x/log.txt?x=135cf5c4880000 > kernel config: https://syzkaller.appspot.com/x/.config?x=a1992c90769e07 > dashboard link: https://syzkaller.appspot.com/bug?extid=2b9b4f0895be09a6dec3 > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1164d0ec880000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15c3c2e0880000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+2b9b4f0895be09a6dec3@syzkaller.appspotmail.com > > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 make_pte_marker_entry include/linux/swapops.h:323 [inline] > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 make_pte_marker include/linux/swapops.h:346 [inline] > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 change_pte_range mm/mprotect.c:270 [inline] > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 change_pmd_range mm/mprotect.c:409 [inline] > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 change_pud_range mm/mprotect.c:438 [inline] > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 change_p4d_range mm/mprotect.c:459 [inline] > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 change_protection_range mm/mprotect.c:483 [inline] > WARNING: CPU: 1 PID: 3612 at include/linux/swapops.h:323 change_protection+0x16e9/0x4280 mm/mprotect.c:505 > Modules linked in: > CPU: 1 PID: 3612 Comm: syz-executor181 Not tainted 6.0.0-rc7-syzkaller-00130-g511cce163b75 #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 > RIP: 0010:make_pte_marker_entry include/linux/swapops.h:323 [inline] > RIP: 0010:make_pte_marker include/linux/swapops.h:346 [inline] > RIP: 0010:change_pte_range mm/mprotect.c:270 [inline] > RIP: 0010:change_pmd_range mm/mprotect.c:409 [inline] > RIP: 0010:change_pud_range mm/mprotect.c:438 [inline] > RIP: 0010:change_p4d_range mm/mprotect.c:459 [inline] > RIP: 0010:change_protection_range mm/mprotect.c:483 [inline] > RIP: 0010:change_protection+0x16e9/0x4280 mm/mprotect.c:505 > Code: ff 48 8b 84 24 90 00 00 00 80 38 00 0f 85 25 29 00 00 48 8b 44 24 10 48 83 b8 90 00 00 00 00 0f 84 8f f9 ff ff e8 a7 d6 c3 ff <0f> 0b 48 ba 00 00 00 00 00 fc ff df 48 8b 04 24 48 c1 e8 03 80 3c > RSP: 0018:ffffc90002fbf968 EFLAGS: 00010293 > RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000000 > RDX: ffff888073714180 RSI: ffffffff81b76079 RDI: 0000000000000007 > RBP: 0000000000000000 R08: 0000000000000007 R09: 0000000000000000 > R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000000 > R13: ffff8880000001e8 R14: 0000000000000000 R15: 000000002063e000 > FS: 000055555624d300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00000000005d84c8 CR3: 000000007c916000 CR4: 00000000003506e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > Call Trace: > > uffd_wp_range+0xf0/0x180 mm/userfaultfd.c:718 > mwriteprotect_range+0x2ea/0x420 mm/userfaultfd.c:768 > userfaultfd_writeprotect fs/userfaultfd.c:1827 [inline] > userfaultfd_ioctl+0x438/0x43a0 fs/userfaultfd.c:1999 > vfs_ioctl fs/ioctl.c:51 [inline] > __do_sys_ioctl fs/ioctl.c:870 [inline] > __se_sys_ioctl fs/ioctl.c:856 [inline] > __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 > 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+0x63/0xcd > RIP: 0033:0x7f77d7707bb9 > Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 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 c0 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007ffe74be7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 > RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f77d7707bb9 > RDX: 00000000200000c0 RSI: 00000000c018aa06 RDI: 0000000000000003 > RBP: 00007f77d76cbd60 R08: 0000000000000000 R09: 0000000000000000 > R10: 0000000000000000 R11: 0000000000000246 R12: 00007f77d76cbdf0 > R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 > > > > --- > 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. > syzbot can test patches for this issue, for details see: > https://goo.gl/tpsmEJ#testing-patches