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 7803BC433EF for ; Wed, 15 Jun 2022 13:21:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E68F66B0071; Wed, 15 Jun 2022 09:21:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E18A46B0072; Wed, 15 Jun 2022 09:21:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE0256B0073; Wed, 15 Jun 2022 09:21:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id BB8636B0071 for ; Wed, 15 Jun 2022 09:21:52 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8FAB734336 for ; Wed, 15 Jun 2022 13:21:52 +0000 (UTC) X-FDA: 79580532864.10.DC1A647 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf23.hostedemail.com (Postfix) with ESMTP id E1B63140090 for ; Wed, 15 Jun 2022 13:21:51 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id A075B68AA6; Wed, 15 Jun 2022 15:21:47 +0200 (CEST) Date: Wed, 15 Jun 2022 15:21:47 +0200 From: Christoph Hellwig To: Qu Wenruo Cc: Christoph Hellwig , dsterba@suse.cz, syzbot , akpm@linux-foundation.org, clm@fb.com, dsterba@suse.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, willy@infradead.org Subject: Re: [syzbot] KASAN: use-after-free Read in copy_page_from_iter_atomic (2) Message-ID: <20220615132147.GA18252@lst.de> References: <0000000000003ce9d105e0db53c8@google.com> <00000000000085068105e112a117@google.com> <20220613193912.GI20633@twin.jikos.cz> <20220614071757.GA1207@lst.de> <2cc67037-cf90-cca2-1655-46b92b43eba8@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cc67037-cf90-cca2-1655-46b92b43eba8@gmx.com> User-Agent: Mutt/1.5.17 (2007-11-01) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655299312; a=rsa-sha256; cv=none; b=mOOhBETv9sWX7NSr2ykMxgfmiDOkIOCR5jDvRlMTKToYlvCoPB4ruKAtEllGFveye4EEQe fP6XB1Fd0vp8TOiLn3kAEsfYtHNUm8cWKwev9hQyj2LyioHunQiHCdOq2w9bTdbysSwKYI 3P/xo2qTu+pIsEWhEvX5MuR3nyxOaD4= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=none (imf23.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655299312; 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: in-reply-to:in-reply-to:references:references; bh=xJedgpz9v/f2dVJxlO0WICFWUw5ZXL6IFbVzXzW2Q0I=; b=dKOgzwvXxfEFmJIXVyDlCo5NqDKJE/ZzNjt57nl6BjVVtzMMg+JH17V1DfIH1GFcT0orLu vBzNKfdn0Cz57Z5XvqC/yXuC40iNB1h8avb3fGEioAOrC9ihB+ZuwVi0FSXrS6BuO5CLJy /1DbofAbt3AIsvoKQdgxFCJfC+s48Nc= X-Stat-Signature: mon5aph7y9e86oegdadawothkr8nqeey X-Rspamd-Queue-Id: E1B63140090 Authentication-Results: imf23.hostedemail.com; dkim=none; spf=none (imf23.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1655299311-124473 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 Tue, Jun 14, 2022 at 04:50:22PM +0800, Qu Wenruo wrote: > The same way as data? > > map-logical to find the location of a mirror, write 4 bytes of zero into > the location, then call it a day. > > Although for metadata, you may want to choose a metadata that would > definitely get read. > Thus tree root is a good candidate. And how do I find out the logic address of the tree root?