Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2858732rwd; Fri, 16 Jun 2023 09:04:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6GccOoMj4AgQmNGSgApEKf774ESRCaerkivOizp6Ebt4oZ8DAK5/cTfTN6LuLDTxmqkSiG X-Received: by 2002:a05:6a20:244a:b0:115:1784:6a1f with SMTP id t10-20020a056a20244a00b0011517846a1fmr11319788pzc.19.1686931467027; Fri, 16 Jun 2023 09:04:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686931467; cv=none; d=google.com; s=arc-20160816; b=c3IAt3M6gqLtmQmQZ1ssv5yA8H8dGHSnw7+LDBoPieELImrDD4MoNTx7wUpRJ8M34a Tubr3j0g1XkfcAiEboj7yl8z2p8pXqMM8K2kgEwYdW9ETvAkbwzb/nfTq/qd3g/ALeZv qPW9NJo/e6aQXEBOcMYdV4IdUF+YkH55XGbnpPftiO2g/5rdA0oyeY0kxMEspdPeuX9R ZmKT2HYn6UhjdllOuOXawtzBcqnyx7VSSAQp/k/cb8bxKZ2aDLOMR9p+BW8rjWLoAV4K HQcXIFH68nKWeQi4v28nmcDvaJfrhSsZynqLeaFUiyit6tGz+3czu2xS2PSxhE4RKZyx su3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=hicNHehwltG1cUZJBmiwYK9Ajkuzo+7q9132g1mRXFQ=; b=ygyWMxP4ifqbr/fgcvOhCTELDNkf9nBYxas/9G1ZXDcqiJ/+95fbxUKc6oXfej8Ha4 qBorxj6r0bh1hzVPdDB48SvESfCx7JQzcIdnuLmapR5gj6tHfzR+YRBNCDT/zT8kUZpN KXGFCgSHw6jHR/157MRtI9gYk+O621lzbPW6XBVFzr94802b2KeSl8+jdt/+wIHuWxM0 /DyEmXwIA+xkcoPzz6qER/mUCRVcUMH/y1PrazaSHkNvo+F9oPSDFDS16osZpG87AO8D voprTadAkU6kLsSE3TWBZPgjlmbBkLyNMa+S9SdXa69JUrQqQQf1FQcHEBV6JB3N/0pC 4XBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="jhW//RGA"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Clz8lH0+; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a6560d4000000b0053fbacdaf5asi14669393pgv.759.2023.06.16.09.03.57; Fri, 16 Jun 2023 09:04:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="jhW//RGA"; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=Clz8lH0+; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229538AbjFPPt5 (ORCPT + 99 others); Fri, 16 Jun 2023 11:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231208AbjFPPt4 (ORCPT ); Fri, 16 Jun 2023 11:49:56 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845682967 for ; Fri, 16 Jun 2023 08:49:55 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3BEDF1F749; Fri, 16 Jun 2023 15:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1686930594; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hicNHehwltG1cUZJBmiwYK9Ajkuzo+7q9132g1mRXFQ=; b=jhW//RGAfR92YJm4X1CxCOlFuiiWeXkS4QSdsR2Zbg+2Hd338CEnXl+SJ9iwtY9rHZzn8m yYc8cQRvZBywat0fITGthmPuwwCg91hJ1WbstH236aWqMRnHHQ5lko4YN5S68WlUrPsrtO JMvSNJcvpUGcW+ofG1UbxC4XSJPusaM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1686930594; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hicNHehwltG1cUZJBmiwYK9Ajkuzo+7q9132g1mRXFQ=; b=Clz8lH0+vTC6uNdRjbrksGNS4qAIK4eNF5u9qmMKMCU9JYxkrvapKyJdjm17Be+drKPVyO Z+wr+V+4QI0PDlBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 29F0E138E8; Fri, 16 Jun 2023 15:49:54 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Vt03CqKEjGTYCgAAMHmgww (envelope-from ); Fri, 16 Jun 2023 15:49:54 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 788C7A0755; Fri, 16 Jun 2023 17:49:53 +0200 (CEST) Date: Fri, 16 Jun 2023 17:49:53 +0200 From: Jan Kara To: Dave Chinner Cc: Theodore Ts'o , Aleksandr Nogikh , adilger.kernel@dilger.ca, jack@suse.com, linux-ext4@vger.kernel.org, syzkaller-bugs@googlegroups.com, syzbot Subject: Re: [syzbot] [ext4?] UBSAN: shift-out-of-bounds in ext2_fill_super (2) Message-ID: <20230616154953.etu5cg3se3sucem6@quack3> References: <00000000000079134b05fdf78048@google.com> <20230613180103.GC18303@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri 16-06-23 09:24:12, Dave Chinner wrote: > On Tue, Jun 13, 2023 at 02:01:03PM -0400, Theodore Ts'o wrote: > > I wonder if we should have a separate syzkaller subsystem for ext2 (as > > distinct from ext4)? The syz reproducer seems to know that it should > > be mounting using ext2, but also calls it an ext4 file system, which > > is a bit weird. I'm guessing there is something specific about the > > syzkaller internals which might not make this be practical, but I > > thought I should ask. > > > > From the syz reproducer: > > > > syz_mount_image$ext4(&(0x7f0000000100)='ext2\x00', ...) > > > > More generally, there are a series of changes that were made to make > > ext4 to make it more robust against maliciously fuzzed superblocks, > > but we haven't necessarily made sure the same analogous changes have > > been made to ext2. I'm not sure how critical this is in practice, > > since most distributions don't actually compile fs/ext2 and instead > > use CONFIG_EXT4_USE_FOR_EXT2 instead. However, while we maintain ext2 > > as a sample "simple" modern file system, I guess we should try to make > > sure we do carry those fixes over. > > Hmmmm. > > Modern filesystems are crash resilient, based on extents and are > using/moving to folios+iomap - calling a non-journalled, indirect > block indexed, bufferhead based code base (that nobody is really > using in production) "modern" seems like a real stretch. Yeah, modern is a stretch. But I guess what Ted meant is that we try to keep ext2 reasonably uptodate with various infrastructure changes. We have now queued conversion of ext2 direct IO path to iomap and are looking into converting buffered IO path to iomap as a sample to get experience for ext4 conversion and also conversion of other "simple" filesystems. > I have my doubts that maintaining fs/ext2 is providing much benefit > to anyone. The code base is in the git history if anyone wants to > study it, so it's not like we have to keep it active in the tree for > it to remain a code base that people can learn from. > > Therefore, given the current push to sideline/remove bufferheads > from the kernel, should we simply deprecate fs/ext2 and then remove > it in a year or two like we're doing with reiser to reduce our > future maintenance and/or conversion burden? That's a fair remark and if there is a general sentiment that ext2 codebase is not really useful, I certainly won't mind having one less fs to maintain. I'd just note that having ext2 in git history will not provide very useful insight into how various current infrastructure changes could be implemented for simple filesystems. Honza -- Jan Kara SUSE Labs, CR