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 AA8E3C4345F for ; Wed, 17 Apr 2024 18:56:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3ED1E6B0093; Wed, 17 Apr 2024 14:56:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 39DBA6B0095; Wed, 17 Apr 2024 14:56:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 265166B0098; Wed, 17 Apr 2024 14:56:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 049436B0093 for ; Wed, 17 Apr 2024 14:56:52 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id C255A40EF2 for ; Wed, 17 Apr 2024 18:56:52 +0000 (UTC) X-FDA: 82019930664.09.64D1C16 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf04.hostedemail.com (Postfix) with ESMTP id 2B7E740005 for ; Wed, 17 Apr 2024 18:56:49 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Zj6PRLSX; spf=pass (imf04.hostedemail.com: domain of zokeefe@google.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=zokeefe@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713380210; 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=8+LOjuOeZLA1cB2jFNrrZxNOPlpFBgxe5NMS3Kv4FaI=; b=f7uelaR6Rs7BRCC/ElEicB5Zrwp87NH94S/OjEK5PKlXui/xXCO4Uk5SfK7DKjq/Blp3XP LjGchW1ioZfy8BitRXXlptfV00+z3LNrwu6Abicz4XLI2sjN5dTVKjpCdRxlcPUnUfn3gl pDoM32SQ9TirheQRz1KcrOVA5BxR9Gg= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=Zj6PRLSX; spf=pass (imf04.hostedemail.com: domain of zokeefe@google.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=zokeefe@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713380210; a=rsa-sha256; cv=none; b=Y5BPZXePVm0gZ/6GjSUJWx0w44//p9hziTm7Mubc/4hLQFywQ6ds0X/cJdYRaVOkMcZdWs ooKyrA6VKGFBnzG/CuKORnrdLdgurEBHE70rQlZxQrT6fDvnxh3K9OwYY/tbwP+Yp/ByU4 8MSrkbiemo+LWQqEhhxVOTHym/2vDkg= Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-571b5fba660so2070a12.1 for ; Wed, 17 Apr 2024 11:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1713380208; x=1713985008; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8+LOjuOeZLA1cB2jFNrrZxNOPlpFBgxe5NMS3Kv4FaI=; b=Zj6PRLSXvZOQYsfNb7c71ek3sqYJQrsVZ50FvZsvssyq2tyLK8PR4+wHf5eHxdYPPK h59fZqpVIxTbz6k0JFnxp9/POMZWoxxEIFjbo0Fwtnw/0B6U7w2wBOjXvWlNwPk5t5lO CMVG/m6dGmy4bi7S+VDoHtL+w6lIE3u2kMxCwFhI8TkN5ayYeN2/cuzrZM4si79bUIAk 3kBDXA5Aeh5rMl8ULPsYQhFwqe8Jy79eoUOpx38nJhs5EiWvZ8xAFMitXj9yUCLJEiRY mi8dCqCPzpNUZf61P/GoYYn/KQ4cXL9uQVfg8zC3Ua9cF6HCjb2wsbor+M3pjOWJcDd6 FROA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713380208; x=1713985008; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8+LOjuOeZLA1cB2jFNrrZxNOPlpFBgxe5NMS3Kv4FaI=; b=cvWRWWs4mxvaepm3RTiYr3F5op2d/RoLPWt2Pf/aCZKCTkhxtSUmTL9kN2trICazEa 11GbnIx6ghJv67ErcdnyYoLmsGHELj9QqGsZtosB5NMGDfKXnRURm4Bi5o8lAk+2YQb8 jWvdTJoG7Ho7DaK5NL6pjON4vWMDoWhjrPM2ELKE9FquwzNgoBe1owUpyCTxNP1cMs2E jx+YoK9NNtF6eO42BI5vS5uN10LevRCDLxTTDgd1k3l5vF5H0H0NImwFTBrrnCZ9edjB 5WHiz5kA1CQudaCSkyFq9ZRAv6iCz/6IP0pejY9LIe5nMmvyn9vp5nROvDj1Vg5pgUdl prtA== X-Forwarded-Encrypted: i=1; AJvYcCUH2Ht/SchdCL8IHLDC3Yc/AJnuvo4RXGIOVZ5XG9qPZ345OyQgc2HULnD0W20YXxqnrpQRPs61Ly0pyIILbb+8M8A= X-Gm-Message-State: AOJu0Yzj+lIiqogLH4kRMosDvMUjtVBb9ZESVOHB819OJ8VR91MJyEEF PdesnHJWZZwT5Q4wDcmSGcM/D2AY7Q+Gm+SfVaTKYIAPwnJTgb2PGKPwz3mXI6mpwgvQ5gTppmo rvXinkiaxwYUKWAW/GMN59AxdNCRyKXAYXtKc X-Google-Smtp-Source: AGHT+IFhRlSCCBy0frP0M3uf67g0LNtigXKBw7N9Xg+JN73Z25CPFSqS1XaGM1HBjRSd9jzfZsk0UlVyGc55jTKnrZc= X-Received: by 2002:a05:6402:893:b0:570:481a:8a20 with SMTP id e19-20020a056402089300b00570481a8a20mr19948edy.5.1713380208294; Wed, 17 Apr 2024 11:56:48 -0700 (PDT) MIME-Version: 1.0 References: <0000000000009db84e0615a73698@google.com> <20240409164627.b4803e09c81c01ccb6f55601@linux-foundation.org> In-Reply-To: From: "Zach O'Keefe" Date: Wed, 17 Apr 2024 11:56:09 -0700 Message-ID: Subject: Re: [syzbot] [mm?] general protection fault in hpage_collapse_scan_file To: Andrew Morton Cc: syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Matthew Wilcox , Hugh Dickins Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Stat-Signature: hbznuwiir5kxoxmbzi1phnpa9w56i5e8 X-Rspamd-Queue-Id: 2B7E740005 X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1713380209-887058 X-HE-Meta: U2FsdGVkX19AqdKyEaURoIgmyi/4sIS1KwhnIYyQWRvH/CMe/B1qU7GzbDfqf4P8SaXa/4kI2dF5osEtGujJG7i+241vx6HSlrrblcLVIYJMGqJ63glxAWk0uIvoqHsNGciwAyviDkc6UZuiDVui4qa1Qaq9E+dWxAT6DeuX0lRwEMWC6LUqRyCM+MvoszSWTuODtePmGGHfWwY/1ck1172T3iOHnHgKJttLl3YY1Y0WTGmoa4q0c6G8d5aWEhx9rclmm6WKz/jLbdsVh2hIbEuheSohCcwSpDA51hw1p21RtENXAfEqyuON2VSBkCZFVO0p0Ikc1VGWbQl6v+XIkJBiNMKe3sOTpIdo5HLhY/KVJ2m4MVD3UC6YKBktKPjOzmaAeQPzYjKVy+e/mb9G7NNWbOux1h+x9aLJhppWTUrREcMa/X8KnCGbZiEHOsI8GolByKQUh1n+9lDCCPv9QnwRuMBqJGfuoHZi46u555QXShLpv5z8Vugf6p0IU4TIfH6D3JIzrIT4++POcTsxn0j1TWPl7GBVoqeCTE8Pyc+Oach1jZfadjLJ53qnDGxIdmQWeFI0yK3DfgmLaVly+cMH5OAQ35ESZplvqOID1D/HQLvNFb6wH4/eAq4lVhoVD0zyo3gVhT0uLLzmODTEpgq8DiZVUEzI9zUTqstuRZuT/WNaNTR3xkS+MbVHESSw4+mFv3ESIhIW+BUM8mwmstXabuvN8GB3QghOmWE5bMymgWKUzTJBiw8jKKYqgRzupbCb/AdIu/0jG46UNltOc9PNIRFjNzD/4pnvwc2bN+5LwU0DaPQHrP61DAjBkcaBsvYhUCeOV4M7WrscIdVxzFI7MMcAc6OPzl4KwCMxBBxIxN/Y3jRwzyyVM4iafCg7E8amd2Q+6+BzecQ5uilnZNP8ejUamlsKYTOf/e8WCXEKxOpJ1A6xMBZ6tYbV/XviBnFZv/RpAHRYu8eSD+1 hwKKol3O PK7Gy2f+lTFGLblFzCbPAc3d2e0rWqV0m4rD5RgF3lS/WyOd7tj/coDb4zUazWcnr2+XQhG5kmthInwY0xkdkhCTphk6udIKVg0sX9ovB+DsagWBP5cLZhyQSP6p9qhnMKGbG+RmKJshkwbFpEoYOPH0Qjn9v8+9sCgUD7SBLTmadwlaJNQzk3+JiNV79cTLOgrxbzhb+5twInsZkU7eY50Qy9gRN5byJFrpQhc22AwBXpnJqAuoTJ18/anGT22Og8AGLVK3d/mZgsIoI5Aeru18apv1rW9Aess6C4zIdVxDZ0UE= 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: List-Subscribe: List-Unsubscribe: On Tue, Apr 16, 2024 at 4:07=E2=80=AFPM Zach O'Keefe w= rote: > > On Tue, Apr 9, 2024 at 5:32=E2=80=AFPM Zach O'Keefe = wrote: > > > > On Tue, Apr 9, 2024 at 4:46=E2=80=AFPM Andrew Morton wrote: > > > > > > On Tue, 09 Apr 2024 03:16:20 -0700 syzbot wrote: > > > > > > > Hello, > > > > > > > > syzbot found the following issue on: > > > > > > > > HEAD commit: 8568bb2ccc27 Add linux-next specific files for 2024= 0405 > > > > git tree: linux-next > > > > console+strace: https://syzkaller.appspot.com/x/log.txt?x=3D152f480= 5180000 > > > > kernel config: https://syzkaller.appspot.com/x/.config?x=3D48ca5ac= f8d2eb3bc > > > > dashboard link: https://syzkaller.appspot.com/bug?extid=3D57adb2a4b= 9d206521bc2 > > > > compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils f= or Debian) 2.40 > > > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=3D12682= 58d180000 > > > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=3D1256598= d180000 > > > > > > Help. From a quick look this seems to be claiming that collapse_file= () > > > got to > > > > > > VM_BUG_ON_FOLIO(!folio_test_locked(folio), folio); > > > > > > with folio=3D=3DNULL, but the code look solid regarding this. > > > > > > Given that we have a reproducer, can we expect the bot to perform a > > > bisection for us? > > > > > > > I often don't see a successful automatic bisect, even with > > reproducers. Hit or miss. I will take a closer look tomorrow -- the > > reproducer doesn't look to be doing anything crazy. > > I've only been able to reproduce this using the disk image provided by sy= zbot. > > What is happening is we are calling MADV_COLLAPSE on an empty mapping > -- which actually reaches collapse_file() -> filemap_lock_folio() > after page_cache_sync_readahead() attempt. This of course fails > correctly, and I can see right before GPF that the returned pointer is > 0xfffffffffffffffe, which is correctly ERR_PTR(-ENOENT). This should > be causing us to take the if (IS_ERR(folio)) {..} path .. but we > don't, and I don't know why. I haven't yet attempted to repro this > against other images. Will continue looking, but wanted to provide > some type of update -- even if it is a disappointing one -- so as to > not appear like I've disappeared. Ugh. Was looking at the wrong source. Thanks hughd@ for mentioning that IS_ERR(folio) changed recently, else I'd have spent more time on it. Fixed by https://lore.kernel.org/all/ZhIWX8K0E2tSyMSr@casper.infradead.= org/ > Thanks, > Zach > > > Thanks, > > Zach