Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp433516pxb; Thu, 31 Mar 2022 08:39:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweE0XhYjWPk0JlO56l8hjFrB15rcXOXGSZey0z/yfLDy+bomMdeb7zVUBMfuqcspbX8x8P X-Received: by 2002:a17:907:7b92:b0:6db:71f1:fc20 with SMTP id ne18-20020a1709077b9200b006db71f1fc20mr5289961ejc.343.1648741184332; Thu, 31 Mar 2022 08:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648741184; cv=none; d=google.com; s=arc-20160816; b=O42NNUr66pI8cxuy0UAAogYqpawIGfS/Mu2BsdxIDayg8ZXZTxrSbY/Q2CvAaCKBzz +CsubSvs8sREkzCTnuNIxHglJ3U4XHk0Hooow2FEAaNOem7Nezc4aqRdbYemdiw9UUaR TZM0aDnbdlREJb9P4xSUUefIhy1tVHhmh12n7jIeeRqPLFQMZGbCH8EGZigujj/IK21a SlEiJXfKJNdfpYw2nuJ+fl0BEqXK9nXdjYM46jpw+ZA8iJ9xJ6G42R0FqLcaXanj1V/3 yiswJiwRaggTNpfW1Q55d5wzt2N/jxwpRPBCtwuS4KyilC+hvpaz2a383+UtNcQc4NbE 1gTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=J8ueS+6eM6LzxmZNzgFTSM5N/JS9ols3wxxZjAjcXrY=; b=NbD4yiQF54e+/ajjJv3Wn+o+v3+3p0yAR0ny5fkH0N5iLCBr3PwFhvW/wRUIeRQu6y +2cZaa5OJ5nfOTKHiPkmO8XMiRWg/pzZTCvZpXdpqgM+28msSm0wNIa08TybkAGpeUZJ sIxq4wzqorGzfLHuwJbx/FgQ/8C2SRkKdO30d93iTJfbSm9e+o4eQ2Q96Nb3+M0yq7ot vPQARjHCgD2RICty4TloAnYeIWyQ8PjTcI8F8Y64W8E56niIue1b2Hn/skhuMJ3vnrCN yzgydgG5DnhaEvHAYRcoy7ulTDi+J2v941F8z4fCpxSS07/2Nn/Sn8047vJXFDqJ2CHe 5szw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GXuICvc+; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a056402090200b00418c2b5bf45si25350340edz.551.2022.03.31.08.39.16; Thu, 31 Mar 2022 08:39:44 -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=@gmail.com header.s=20210112 header.b=GXuICvc+; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236367AbiCaM4b (ORCPT + 99 others); Thu, 31 Mar 2022 08:56:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232332AbiCaM42 (ORCPT ); Thu, 31 Mar 2022 08:56:28 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3788170091; Thu, 31 Mar 2022 05:54:41 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id jx9so23946246pjb.5; Thu, 31 Mar 2022 05:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J8ueS+6eM6LzxmZNzgFTSM5N/JS9ols3wxxZjAjcXrY=; b=GXuICvc+jnGQmEnQIaCe7Z0h85RmrrE69OlQ2Ju+z6V7Qjmd8gNKH8se8DJY//otu/ 5EBatTDWRLe7CMuw1WsNHbhl2saj0blOrcubo/SEynKX5sbr5mDMTJjOF9bqfKl1kA6B BNttlKT2ybHgIhs6NIDNPicWp5ZD0EUFlydeBrYLZOj9ic93RWVm1VQttDXlRyjkgz9w fylan+mikAG2LchlVdCaOAM34n/SbsBMGbu7RuGuCweDcPOlVVz1XDmv1MlSYILe5Jmf B7inFMhEx0x/hLzIfrIsWDQvfzD/+P2UU6dsl0OpnYEXDdJGfQp7FiwXFT3AqXKYcmSa sw8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J8ueS+6eM6LzxmZNzgFTSM5N/JS9ols3wxxZjAjcXrY=; b=dFdNkTQcoKUgc9BdPDnkg4bq7xfe5Udok6TzRNzOjh9yUAzr2RghNP8u8vp+RFPlDZ FCdXxiIbpOM9j9lV8lPzQOxOAoWRW7mX6AECvJIjuth/qBqpAgelAPuT18n98P3zSs4C 7+tHyekiADZblUntTqVmiOFCI+TDn1RUhIHo/8n4F7fGTT6coWnqoYJprmHBmJwOVbXS IJ4Sq1jDzfnl4ZBea8cXi3/5EFgs/WOUnLIusY9n/yS8h9HYchirOLZZ5WIH7bvIakPE c9gs8MHMAttQFlJh3+eTOqIJW/yDPyZ00QuchSCzCocOdTuMOI3x35fTywaZgEaH2jA1 KwKg== X-Gm-Message-State: AOAM5318NdB32Y7gxUNptTuUhK9/sRcxdop5KGu7z9iICwMnowbjX5pF dgsMSKDdai8JG1mTFqZZXQAuPE4/owU= X-Received: by 2002:a17:90a:ce:b0:1ca:308:977f with SMTP id v14-20020a17090a00ce00b001ca0308977fmr6069246pjd.195.1648731280964; Thu, 31 Mar 2022 05:54:40 -0700 (PDT) Received: from localhost ([2406:7400:63:7e03:b065:1995:217b:6619]) by smtp.gmail.com with ESMTPSA id j11-20020a63230b000000b00372a08b584asm22203758pgj.47.2022.03.31.05.54.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 05:54:40 -0700 (PDT) From: Ritesh Harjani To: fstests Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Darrick J . Wong" , Ritesh Harjani Subject: [PATCHv3 1/4] generic/468: Add another falloc test entry Date: Thu, 31 Mar 2022 18:24:20 +0530 Message-Id: <75f4c780e8402a8f993cb987e85a31e4895f13de.1648730443.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Ritesh Harjani Add another falloc test entry which could hit a kernel bug with ext4 fast_commit feature w/o below kernel commit [1]. [ 410.888496][ T2743] BUG: KASAN: use-after-free in ext4_mb_mark_bb+0x26a/0x6c0 [ 410.890432][ T2743] Read of size 8 at addr ffff888171886000 by task mount/2743 This happens when falloc -k size is huge which spans across more than 1 flex block group in ext4. This causes a bug in fast_commit replay code which is fixed by kernel commit at [1]. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?h=dev&id=bfdc502a4a4c058bf4cbb1df0c297761d528f54d Signed-off-by: Ritesh Harjani --- tests/generic/468 | 8 ++++++++ tests/generic/468.out | 2 ++ 2 files changed, 10 insertions(+) diff --git a/tests/generic/468 b/tests/generic/468 index 95752d3b..5e73cff9 100755 --- a/tests/generic/468 +++ b/tests/generic/468 @@ -34,6 +34,13 @@ _scratch_mkfs >/dev/null 2>&1 _require_metadata_journaling $SCRATCH_DEV _scratch_mount +# blocksize and fact are used in the last case of the fsync/fdatasync test. +# This is mainly trying to test recovery operation in case where the data +# blocks written, exceeds the default flex group size (32768*4096*16) in ext4. +blocks=32768 +blocksize=4096 +fact=18 + testfile=$SCRATCH_MNT/testfile # check inode metadata after shutdown @@ -85,6 +92,7 @@ for i in fsync fdatasync; do test_falloc $i "-k " 1024 test_falloc $i "-k " 4096 test_falloc $i "-k " 104857600 + test_falloc $i "-k " $(($blocks*$blocksize*$fact)) done status=0 diff --git a/tests/generic/468.out b/tests/generic/468.out index b3a28d5e..a09cedb8 100644 --- a/tests/generic/468.out +++ b/tests/generic/468.out @@ -5,9 +5,11 @@ QA output created by 468 ==== falloc -k 1024 test with fsync ==== ==== falloc -k 4096 test with fsync ==== ==== falloc -k 104857600 test with fsync ==== +==== falloc -k 2415919104 test with fsync ==== ==== falloc 1024 test with fdatasync ==== ==== falloc 4096 test with fdatasync ==== ==== falloc 104857600 test with fdatasync ==== ==== falloc -k 1024 test with fdatasync ==== ==== falloc -k 4096 test with fdatasync ==== ==== falloc -k 104857600 test with fdatasync ==== +==== falloc -k 2415919104 test with fdatasync ==== -- 2.31.1