Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1131664lqs; Fri, 14 Jun 2024 17:01:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYdOUwOuJbEzZ04VZHiHc5yMlUa7w4ngAbbMcTqt0+MA8uwfjeRDqU+L1w3+MklHtv8sy8n1E5CKmIkA7Vwt3Mmf/8SwkwdgvZV1cJ1w== X-Google-Smtp-Source: AGHT+IGvDjw2BSgG0IGK5+iXSiT1iilXfq4aSsQv8ADdjeMnThhAeD/jP7QhglVavvMnvc121ObG X-Received: by 2002:a05:6870:46ab:b0:254:bf92:9f89 with SMTP id 586e51a60fabf-2584298e2demr4925955fac.29.1718409660970; Fri, 14 Jun 2024 17:01:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718409660; cv=pass; d=google.com; s=arc-20160816; b=LCbzJ66hCsFgSnvTTgtC8h6n6FK1Lbcfa6KVAWZJyd/HFkgLq27kWwOAUgWPt6mlFh 6xTkCl1zVE/o/SDESeO4+GsPLS/t/jVsZvHriADTS7tzp2woNkAVt073wJzfj68M1ICG b8DIuAro2oHz5OPwWoGnu+ftkPvTHvd3uPgzQG/LQ1b9iCRFcEWOI7L/XDOYgJLiNkSI f2JiyS+93G4ZKsHSlK5xP8H8yfD4qySMWpW0QqWDz2OmcdStkoDeuCImkvEAkfuYkQA8 4sYy1FD+9M7tArXPHWzJS0syGtYzOqdavveij/GqL276PbxHcLbZj8GrD3qV1lZOHkPj oSCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=CVuB30dU2mMDdfhhOSEmjopSeJRAr5sgzMpEYz4AYx8=; fh=Fmlr8SnwM+DpWOhSZ4NT3lJcIhbRXF0/oULksLg3He8=; b=IrKIOqRDWU0G8v5dY3NRMb4Wxe3c2izOJDHXXtRnAP08iS7FaAdupQVDXV4P8mIoDD 2dbLl9eKE+wAf1PUea0PiDhBBBYUarLw7ea5wncn4O0K8jgoSHI4BUkrxMUqmcH/0DzP JvZ5HBEhksYtIOaSbMaSgBkSwIdjWmH3IiLxDtTRC1ruaSfI89PGfVa2knOMxQKvg3BN Usdu2LsWoR2SmJn2lT4fas2st/WiKtXsUbO7mP34iss/s+U5Ewi/LQl1ubg7O98r4GgS EB348jVyLHbPWn/LHVEeYHb723lOsPmOwroCa9Ef7cKDEHNkxwoVhBFHD0rKf2T6GPlf F1aw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-215611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215611-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b2a5b290f4si50823626d6.363.2024.06.14.17.01.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 17:01:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-215611-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215611-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A80E61C20D94 for ; Sat, 15 Jun 2024 00:01:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01FD93D71; Sat, 15 Jun 2024 00:00:54 +0000 (UTC) Received: from smtp134-24.sina.com.cn (smtp134-24.sina.com.cn [180.149.134.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99AB4804 for ; Sat, 15 Jun 2024 00:00:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718409653; cv=none; b=EIIHNKsOybbFewJ+uzbzy2iioWCP6HuXkA1oJBXU8uk4K+M4fiPD4QfeOT9BHZ9P8kM7lQ9fkjtzvsFBkYW0uyEL1MJXJKLIsZmSiUwPDVePtoJ5Rv3EaNg0isv1at5kxFn4ofWxEyjRUHUO/hJ6gfAnyBPity8WguMgrVoVDiw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718409653; c=relaxed/simple; bh=XWy94UHytwkAYZOxRaYqUcZpB9owwhT9FBOXBUsAJjc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fVs6ik7SWNYonV6Ibz7idScv7Z64x4snEeP3MgsMZpj9lqbr9cLHTRhtnGMsQUQv+hnd0TEOxxgXkpcGcqJCkRmm7RArqx+fEymIsuEg6L/VHY6EHDgr8DngEgjmBpmnD1lKhoSQ4p47NVPylhCrIKvzPDcqmn4qZyXscXffrmQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=180.149.134.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.118.71.75]) by sina.com (10.185.250.21) with ESMTP id 666CD98000003A4C; Sat, 15 Jun 2024 08:00:05 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 1066623408363 X-SMAIL-UIID: 2E1E691E2F6547F8A4F5B059AF586E9E-20240615-080005-1 From: Hillf Danton To: Matthew Wilcox Cc: linux-mm@kvack.org, Hugh Dickins , Johannes Weiner , Jan Kara , Andrew Morton , linux-kernel@vger.kernel.org, syzbot+d79afb004be235636ee8@syzkaller.appspotmail.com Subject: Re: [RFC PATCH] mm: truncate: flush lru cache for evicted inode Date: Sat, 15 Jun 2024 07:59:53 +0800 Message-Id: <20240614235953.809-1-hdanton@sina.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Fri, 14 Jun 2024 14:42:20 +0100 Matthew Wilcox wrote: > On Fri, Jun 14, 2024 at 09:18:56PM +0800, Hillf Danton wrote: > > Flush lru cache to avoid folio->mapping uaf in case of inode teardown. > > What? inodes are supposed to have all their folios removed before > being freed. Part of removing a folio sets the folio->mapping to NULL. > Where is the report? > Subject: Re: [syzbot] [nilfs?] [mm?] KASAN: slab-use-after-free Read in lru_add_fn https://lore.kernel.org/lkml/000000000000cae276061aa12d5e@google.com/