Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp245800ybl; Tue, 20 Aug 2019 19:15:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyP3I6R0y8/Vkf3g6eax62aYid16YJlwiKljMQFIt2S1VHdAx7DP/4xaXwUt6+WvSBp70Dm X-Received: by 2002:a63:ea50:: with SMTP id l16mr27907694pgk.160.1566353727739; Tue, 20 Aug 2019 19:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566353727; cv=none; d=google.com; s=arc-20160816; b=xEuKfhWQMnrdUGTBMBjKjARMFwCoGUbqtByicN1rvU4/TJUgTlJjFD1kNg786sLBzR 1HAU0y9RSYoJ151wsuJk4jj3bNaz7o7JmhG1aQjgl7kV7DBJL6RRk/3+MhQmWLNNnF04 YArkXTyuzWbFXH+rnPT3ZClYsfy+C8qatGqnn+cINv8SfxECFGUl/bLQiMucWsPwkQ6T qEkZM0eQVNHPNH+dB2K7Irp78Ny4MpEE4gNcWEJlb4usX52j56L+h9HHeRkMEQ3XtU5n pXi64fA5XgMHth2wsXrdlULHvCktzOZ9pab88UzDTzT2CuFp/YkamcHUyjQBNzIgrPe+ L8Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=THD4JI/uMYOcEJIheyqfdMdzSwj+sbgwM28Cfl1pPG8=; b=CfbTElmtCgiNkk3JY1MuZYhjQM10lUjMgGerf9gYM7NTGlY/qxotRGZp1mIXS7ZwxF XKCCEcKeN/z+N6VU+UB63HOJpNT6+9ioJeAISEGWtlSCLN7JQLvqi+7XCyQBd4vdO6GP HL9UUUGZPdAAXt603Bs41djD7IW/uo0f3WzU+KWQmsuvYFoO9A3eAtfUaX13yMLT0nYI 4XFVw7TCcXKqJUJd4ua0h63000NTmvylbkumcZ6AUJjsB8AStipJV/HPydguRdzUAPiX E1dxLrcj/LKKlD5kiu3n2bTZpfaEpc+B7p8sPWcGyFE/J95n3Z9ZN5kxeR7xxJhUtL2s 6/DQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si13777432plw.379.2019.08.20.19.15.12; Tue, 20 Aug 2019 19:15:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbfHUCM5 (ORCPT + 99 others); Tue, 20 Aug 2019 22:12:57 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53716 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726546AbfHUCM5 (ORCPT ); Tue, 20 Aug 2019 22:12:57 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 53AE02C24E7B201D87F2; Wed, 21 Aug 2019 10:12:55 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.211) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 21 Aug 2019 10:12:47 +0800 Subject: Re: [PATCH] erofs: move erofs out of staging To: Qu Wenruo , Gao Xiang , "Darrick J. Wong" CC: Christoph Hellwig , "Theodore Y. Ts'o" , Eric Biggers , Richard Weinberger , "Greg Kroah-Hartman" , Jan Kara , "Dave Chinner" , David Sterba , Miao Xie , devel , Stephen Rothwell , Amir Goldstein , linux-erofs , Al Viro , "Jaegeuk Kim" , linux-kernel , "Li Guifu" , Fang Wei , "Pavel Machek" , linux-fsdevel , "Andrew Morton" , torvalds References: <790210571.69061.1566120073465.JavaMail.zimbra@nod.at> <20190818151154.GA32157@mit.edu> <20190818155812.GB13230@infradead.org> <20190818161638.GE1118@sol.localdomain> <20190818162201.GA16269@infradead.org> <20190818172938.GA14413@sol.localdomain> <20190818174702.GA17633@infradead.org> <20190818181654.GA1617@hsiangkao-HP-ZHAN-66-Pro-G1> <20190818201405.GA27398@hsiangkao-HP-ZHAN-66-Pro-G1> <20190819160923.GG15198@magnolia> <20190819203051.GA10075@hsiangkao-HP-ZHAN-66-Pro-G1> <735b8d15-bcb5-b11b-07c1-0617eb1e5ce9@gmx.com> From: Chao Yu Message-ID: <92e44c38-d52b-cd13-c893-351f959beb54@huawei.com> Date: Wed, 21 Aug 2019 10:12:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <735b8d15-bcb5-b11b-07c1-0617eb1e5ce9@gmx.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/8/20 16:46, Qu Wenruo wrote: > [...] >> >> Yeah, it looks like we need searching more levels mapping to find the final >> physical block address of inode/node/data in btrfs. >> >> IMO, in a little lazy way, we can reform and reuse existed function in >> btrfs-progs which can find the mapping info of inode/node/data according to >> specified ino or ino+pg_no. > > Maybe no need to go as deep as ino. > > What about just go physical bytenr? E.g. for XFS/EXT* choose a random > bytenr. Then verify if that block is used, if not, try again. > > If used, check if it's metadata. If not, try again. > (feel free to corrupt data, in fact btrfs uses some data as space cache, > so it should make some sense) > > If metadata, corrupt that bytenr/bytenr range in the metadata block, > regenerate checksum, call it a day and let kernel suffer. > > For btrfs, just do extra physical -> logical convert in the first place, > then follow the same workflow. > It should work for any fs as long as it's on single device. Agree, it will be easier to trigger random injection in specific area, and also I agreed with Ted, some of the time we prefer to do injection in specified field of meta, it looks developer needs to do more work for that. > >> >>> >>> It may depends on the granularity. But definitely a good idea to do so >>> in a generic way. >>> Currently we depend on super kind student developers/reporters on such >> >> Yup, I just guess Wen Xu may be interested in working on a generic way to fuzz >> filesystem, as I know they dig deep in filesystem code when doing fuzz. > > Don't forget Yoon Jungyeon, I see more than one times he reported fuzzed > images with proper reproducer and bugzilla links. Of course I remember him. :) I guess btrfs/f2fs should has improved their stability/robustness a lot due to Jungyeon and Wen Xu's gret fuzz bug report. > Even using his personal mail address, not school mail address. > > Those guys are really awesome! > >> BTW, >> which impresses me is, constructing checkpoint by injecting one byte, and then >> write a correct recalculated checksum value on that checkpoint, making that >> checkpoint looks valid... > > IIRC F2FS guys may be also investigating a similar mechanism, as they > also got a hard fight against reports from those awesome reporters. Actually, f2fs only support realtime fault injection framework, which allows us to inject memory exhausting, IO error, lack of free blocks, shutdown... error during fsstress test. I do think f2fs needs that kind of tool later. Thanks, > > So such fuzzed image is a new trend for fs development. > > Thanks, > Qu > >> >> Thanks, >> >