Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2673336rwb; Fri, 16 Dec 2022 05:15:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf5zW2+E/nk75k+pZeH1NYmNRl5JexbNLJTD2LQmfMnRaBvvJC4KqXIwA2xVCxq4n1XVMcPh X-Received: by 2002:a17:90b:1e53:b0:219:f624:2979 with SMTP id pi19-20020a17090b1e5300b00219f6242979mr32855724pjb.26.1671196525741; Fri, 16 Dec 2022 05:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671196525; cv=none; d=google.com; s=arc-20160816; b=aoN0tImuQlzRz2NTyRQljasE7UWu8NP33I/KPimYpMPDhITL5Dk5lpXQ2agP/vuYTu wqRn9/h1u34l61c8Wp9C4eIP4YKZFi20uHU2CFwoQWQHI6mnZM5I96PITAHAusj+OaFk sSBwUaDmhK+aheatDvj7LsbX/PfxX6pIWuo8OyQegM4lZ3aAWmPpRKhDujDS8SxO3oiV l2IbwdLmLsuRG2LuV1nfXWkf/EkJzXwf3zw1mLmUU9eMS/P5s/B4rCHBoi7kpz89Sfea KquoqfDvXcHBsZ8jr04+JcnAbrwfo/gQfmuSAaqd26jmr990bxCRmYYHYxAEvvxgCXjE x4sg== 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; bh=6A1HlZSOMAQRr4FKU2q50VMcNFp/OOxmzrLfT0bUeVw=; b=GiC1iJO8wx1Le9qs6vwYAQfa+i6lYeK+zbPBc+FFGARovfT2CfTDgR9dlYFfWfXkCB j1U7t38/L+xY9Qi2TWaLjcHbuXr7NmsLDXIG5BJ+Ot6iMDryxbxzjzh6ns4YtKSly6CK +SBQJvlQ53uRwZ8eBFsE0IDhrCLmfZuyuRCyhvxubaD3/pMQNLgmYCfy8uLs4gGaWX+r ISfOXjsJEpc3IYtMTP4uPPXHg4uQo9tuRksrSy3rUbEQ9GdQ//Rma5JTVwFWk0jPWfyy mpgIWJSyD7oDpzenSYKIyUptYhWMbTjFHuQ9HTbnQzh+J6pTe1m+wfoyPQhccOSSYfxa iHrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=nNsgKeEO; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a65488a000000b00476e63d01a8si2766781pgs.570.2022.12.16.05.15.11; Fri, 16 Dec 2022 05:15:25 -0800 (PST) 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=fail header.i=@mit.edu header.s=outgoing header.b=nNsgKeEO; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbiLPNKb (ORCPT + 99 others); Fri, 16 Dec 2022 08:10:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbiLPNKa (ORCPT ); Fri, 16 Dec 2022 08:10:30 -0500 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5410F262E for ; Fri, 16 Dec 2022 05:10:26 -0800 (PST) Received: from cwcc.thunk.org (pool-173-48-120-46.bstnma.fios.verizon.net [173.48.120.46]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 2BGDA94m008171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Dec 2022 08:10:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1671196212; bh=6A1HlZSOMAQRr4FKU2q50VMcNFp/OOxmzrLfT0bUeVw=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=nNsgKeEOqOyHKGyaN71I0uluXODIn0mBbOK91ZMYztJiJgqylXYj5RDj40DVUk/q3 V32yLn/w7rksFQJ8iRwyLIa+JXX/2ZzJwLxTCMvqBaC0Q3GjTzucX5tTZN6nUcLzSX xUJ8SqfO5bOlON874dwDzpHWOysmMT2f8DN6kavS6E56T0tM9ww/hrkz1GDm0/UR05 65w/MJ68wOuV/pigdur8ODR9YZO4+e/tI2eYwTi8y33U8ZjoL/8fRGfSVJXiW+4otJ f9sc3Z8D9uBELPEHVcGEEoXdtA67xDwJxJ1H38xB/Ssg06soEi1NvIreIoG159fPil P3Mxf9w0OI2ZA== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 59AED15C40A2; Fri, 16 Dec 2022 08:10:09 -0500 (EST) Date: Fri, 16 Dec 2022 08:10:09 -0500 From: "Theodore Ts'o" To: Jun Nie Cc: stable@vger.kernel.org, djwong@kernel.org, jack@suse.cz, jlayton@kernel.org, lczerner@redhat.com, linux-ext4@vger.kernel.org, xuyang2018.jy@fujitsu.com Subject: Re: [PATCH v1] ext4: Remove deprecated noacl/nouser_xattr options Message-ID: References: <166431556706.3511882.843791619431401636.b4-ty@mit.edu> <20221216034116.869864-1-jun.nie@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 Here is a proper, minmized reproducer which reproduces on upstream, for someone who wants to try to work this bug. On Fri, Dec 16, 2022 at 12:47:16AM -0500, Theodore Ts'o wrote: > Fixing this the clean and proper way, which is by making > ext4_xattr_move_to_block() more intelligent/efficient, is left as an > exercise to the reader. For someone who wants to work the bug, here is a cleaner, properly minimzed, easier-for-humans-to-understand reproducer: #!/bin/bash -vx # # This reproduces an ext4 bug caused by an unfortunate interaction # between lazytime updates happening when a file system is being # unmounted and expand_extra_isize # # Initially discovered via syzkaller: # https://syzkaller.appspot.com/bug?id=3613786cb88c93aa1c6a279b1df6a7b201347d08 # img=/tmp/foo.img dir=/mnt file=$dir/file0 rm -f $img mke2fs -Fq -t ext4 -I 256 -O ea_inode -b 1024 $img 200k mount $img $dir v=$(dd if=/dev/zero bs=2000 count=1 2>/dev/null | tr '\0' =) touch $file attr -q -s test -V $v $file umount $dir mount -o debug_want_extra_isize=128,lazytime /tmp/foo.img $dir cat $file umount $dir