From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B88ED225D6 for ; Sun, 28 Sep 2025 06:43:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759041785; cv=none; b=ohutvSouXWKsU+GvdMFf1fTQWoddJvfQWUISMqSHi/stg8ooR6RSsKFVLiDGrcKP2HmUy27yYjG+LOwj1xeT1j3pBAKabt8Y73TyDh1TvlKyzI2yGXBB4czLr0ZJXbaL9zqnTqJTaKl8Tq3+gm1Ch/vddDldfwfw6abQ69dObJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759041785; c=relaxed/simple; bh=Tl8ROPs/arXOX/q8RYDXUWSsffcYNUUhFGdZRgdFXv0=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=uChDBL6UaYM9N4d5S9+8LSdcm4rkwgmcApvZEpopmgzd9vgIFCafqN43OPQA/PfjMweToBw7UMZhM1TlYBQhXumeoY575FSIVYdgAdwWgSPhMk9PLOVCfYwas7ozN3niDyRgjP2DHe2BuXycB/gHhhGnKgKb+56ddcyk1h+N+fM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TuQmEgaW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TuQmEgaW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32FDAC4CEF0; Sun, 28 Sep 2025 06:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759041785; bh=Tl8ROPs/arXOX/q8RYDXUWSsffcYNUUhFGdZRgdFXv0=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=TuQmEgaWRXe1xIuBYKXpzHpM8ZcbWskl2cCSbSY9Ih9hkgO4sR79clKnt8bZOJkEV LbwWyMx/tOW0jH+ljupzmuqPmTeupuQanp+O7KmxRLGhgaZy8605AEUmrHqBIqnrhB w++7AYSsm57i/gclWouSARcbrj4JxLIsJ9wAbiJOJLbssL5+cjQUn1rgwHpCMFPcVT pzbIb9YbQwc6GZAIGf8OmFaDCB07AvQ4eRIAJM9WPEUViZeZr2ElWyf5RmgqLiuR17 tnTqZtc7N19iQbEhMPqsmnzOGGsdehcwzVBM/5qDco2MzaVhHMdW3sYwRmiVD0VAtI Cg3QM2+HGQxbQ== Message-ID: Date: Sun, 28 Sep 2025 14:43:01 +0800 Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, Zorro Lang , fstests@vger.kernel.org, jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH 1/2] f2fs/021: test quota mount option To: Zorro Lang References: <20250901020331.2171502-1-chao@kernel.org> <20250926181847.rebyuxqba7hy225r@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20250926181847.rebyuxqba7hy225r@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/27/2025 2:18 AM, Zorro Lang wrote: > On Mon, Sep 01, 2025 at 10:03:30AM +0800, Chao Yu wrote: >> This testcase tries to check whether f2fs can handle "usrjquota=" >> during remount correctly, it expects kernel will encounter NULL >> pointer dereference bug w/o the fix ("f2fs: fix to avoid NULL pointer >> dereference in f2fs_check_quota_consistency()"). >> >> Cc: Jaegeuk Kim >> Signed-off-by: Chao Yu >> --- >> tests/f2fs/021 | 30 ++++++++++++++++++++++++++++++ >> tests/f2fs/021.out | 2 ++ >> 2 files changed, 32 insertions(+) >> create mode 100755 tests/f2fs/021 >> create mode 100644 tests/f2fs/021.out >> >> diff --git a/tests/f2fs/021 b/tests/f2fs/021 >> new file mode 100755 >> index 00000000..c41760fc >> --- /dev/null >> +++ b/tests/f2fs/021 >> @@ -0,0 +1,30 @@ >> +#! /bin/bash >> +# SPDX-License-Identifier: GPL-2.0 >> +# Copyright (c) 2025 Chao Yu. All Rights Reserved. >> +# >> +# FS QA Test No. f2fs/021 >> +# >> +# This testcase tries to check whether f2fs can handle "usrjquota=" >> +# during remount correctly >> +# >> +. ./common/preamble >> +_begin_fstest auto quick mount > ^^^^^^^^^^^^^ > quota remount > > I'll help to add these two tags when I merge it. Others look good to me, > if you've maken sure it can trigger the bug you want to uncover. > > Reviewed-by: Zorro Lang Thanks for the fix. Thanks, > >> + >> +_fixed_by_kernel_commit xxxxxxxxxxxx \ >> + "f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()" >> + >> +_require_scratch >> + >> +_scratch_mkfs >> $seqres.full >> +_scratch_mount "-o usrquota" >> +quotacheck -uc $SCRATCH_MNT >> +_scratch_unmount >> + >> +_scratch_mount "-o usrjquota=aquota.user,jqfmt=vfsold" >> +_scratch_mount "-o remount,usrjquota=,jqfmt=vfsold" >> +_scratch_unmount >> + >> +echo "Silence is golden" >> + >> +status=0 >> +exit >> diff --git a/tests/f2fs/021.out b/tests/f2fs/021.out >> new file mode 100644 >> index 00000000..09f4062d >> --- /dev/null >> +++ b/tests/f2fs/021.out >> @@ -0,0 +1,2 @@ >> +QA output created by 021 >> +Silence is golden >> -- >> 2.49.0 >> > 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0826CAC5B5 for ; Sun, 28 Sep 2025 06:43:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Type:Content-Transfer-Encoding:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:References:To:MIME-Version:Date: Message-ID:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=DY3eR5Co4mKXWl6GCsOP+wE2kS3s03fSHyxlIjXldvw=; b=U+G0Z+yqEtnOuWkIghj0fxWD7x xRBJQSjPgqJW985S1OlZ7Dc9cYs3fXgOFEywc+MdlnB9zj9GFer2kldiUvQhgQo2fCxL9diaieEWw gNX/sZsEApxrRR/KNhTqdENLWAnPjFi1Vmyq2oacWbw9Od7Q0NfFsYSip2g11w2j+vhs=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1v2l7t-00059w-2p; Sun, 28 Sep 2025 06:43:17 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1v2l7r-00059f-KT for linux-f2fs-devel@lists.sourceforge.net; Sun, 28 Sep 2025 06:43:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:To:Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=c0vNOP+v9+xOP91qDwx1WqbnHjOudU5oO3AmDQTFM3o=; b=XsM1PI+VXTaO2vEfegtgbzh2nP 4Zgb5lvJ9cIkIeFOvZ9oKfrEEXy8qAlTNgIj90nnd0VF3KCmphyMszudqXCZaYTtc2XVuMWzdf4l4 9+kbxe2EV07VvcPpHoCr8deDHGCHcFuCkQmh23uzV767lncQQSHlPk149RoWCP1vlNMc=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=c0vNOP+v9+xOP91qDwx1WqbnHjOudU5oO3AmDQTFM3o=; b=VOwie9rGc7vce6GLCdL4uL2K+D BxJBt2GybQZPnKndQ06hyRfjhc+XMRTgUHuz30TvPvmNsqCSaduTZglvTfJ3ZAbFrWLECnfCKa0k6 yQL08nP2Zu0gKtPSSoSA7/GaC25IFHJ0DIyRZeo2Me8GHqtSGg483uoqa8FDMuVfvG/I=; Received: from sea.source.kernel.org ([172.234.252.31]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1v2l7r-0005O6-UJ for linux-f2fs-devel@lists.sourceforge.net; Sun, 28 Sep 2025 06:43:16 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 7840743046; Sun, 28 Sep 2025 06:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32FDAC4CEF0; Sun, 28 Sep 2025 06:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759041785; bh=Tl8ROPs/arXOX/q8RYDXUWSsffcYNUUhFGdZRgdFXv0=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=TuQmEgaWRXe1xIuBYKXpzHpM8ZcbWskl2cCSbSY9Ih9hkgO4sR79clKnt8bZOJkEV LbwWyMx/tOW0jH+ljupzmuqPmTeupuQanp+O7KmxRLGhgaZy8605AEUmrHqBIqnrhB w++7AYSsm57i/gclWouSARcbrj4JxLIsJ9wAbiJOJLbssL5+cjQUn1rgwHpCMFPcVT pzbIb9YbQwc6GZAIGf8OmFaDCB07AvQ4eRIAJM9WPEUViZeZr2ElWyf5RmgqLiuR17 tnTqZtc7N19iQbEhMPqsmnzOGGsdehcwzVBM/5qDco2MzaVhHMdW3sYwRmiVD0VAtI Cg3QM2+HGQxbQ== Message-ID: Date: Sun, 28 Sep 2025 14:43:01 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Zorro Lang References: <20250901020331.2171502-1-chao@kernel.org> <20250926181847.rebyuxqba7hy225r@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com> Content-Language: en-US In-Reply-To: <20250926181847.rebyuxqba7hy225r@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com> X-Headers-End: 1v2l7r-0005O6-UJ Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs/021: test quota mount option X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Chao Yu via Linux-f2fs-devel Reply-To: Chao Yu Cc: jaegeuk@kernel.org, Zorro Lang , fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 9/27/2025 2:18 AM, Zorro Lang wrote: > On Mon, Sep 01, 2025 at 10:03:30AM +0800, Chao Yu wrote: >> This testcase tries to check whether f2fs can handle "usrjquota=" >> during remount correctly, it expects kernel will encounter NULL >> pointer dereference bug w/o the fix ("f2fs: fix to avoid NULL pointer >> dereference in f2fs_check_quota_consistency()"). >> >> Cc: Jaegeuk Kim >> Signed-off-by: Chao Yu >> --- >> tests/f2fs/021 | 30 ++++++++++++++++++++++++++++++ >> tests/f2fs/021.out | 2 ++ >> 2 files changed, 32 insertions(+) >> create mode 100755 tests/f2fs/021 >> create mode 100644 tests/f2fs/021.out >> >> diff --git a/tests/f2fs/021 b/tests/f2fs/021 >> new file mode 100755 >> index 00000000..c41760fc >> --- /dev/null >> +++ b/tests/f2fs/021 >> @@ -0,0 +1,30 @@ >> +#! /bin/bash >> +# SPDX-License-Identifier: GPL-2.0 >> +# Copyright (c) 2025 Chao Yu. All Rights Reserved. >> +# >> +# FS QA Test No. f2fs/021 >> +# >> +# This testcase tries to check whether f2fs can handle "usrjquota=" >> +# during remount correctly >> +# >> +. ./common/preamble >> +_begin_fstest auto quick mount > ^^^^^^^^^^^^^ > quota remount > > I'll help to add these two tags when I merge it. Others look good to me, > if you've maken sure it can trigger the bug you want to uncover. > > Reviewed-by: Zorro Lang Thanks for the fix. Thanks, > >> + >> +_fixed_by_kernel_commit xxxxxxxxxxxx \ >> + "f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()" >> + >> +_require_scratch >> + >> +_scratch_mkfs >> $seqres.full >> +_scratch_mount "-o usrquota" >> +quotacheck -uc $SCRATCH_MNT >> +_scratch_unmount >> + >> +_scratch_mount "-o usrjquota=aquota.user,jqfmt=vfsold" >> +_scratch_mount "-o remount,usrjquota=,jqfmt=vfsold" >> +_scratch_unmount >> + >> +echo "Silence is golden" >> + >> +status=0 >> +exit >> diff --git a/tests/f2fs/021.out b/tests/f2fs/021.out >> new file mode 100644 >> index 00000000..09f4062d >> --- /dev/null >> +++ b/tests/f2fs/021.out >> @@ -0,0 +1,2 @@ >> +QA output created by 021 >> +Silence is golden >> -- >> 2.49.0 >> > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel