Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5935997pxb; Mon, 28 Mar 2022 20:24:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwUSPcoW388YEt7RhsKVEo9MUd9mvmF/178X25DWgy3n+/3fbdHbGQMiPVoR4NiyaIQ/HR X-Received: by 2002:a05:6402:254b:b0:419:49af:429c with SMTP id l11-20020a056402254b00b0041949af429cmr1633024edb.276.1648524296887; Mon, 28 Mar 2022 20:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648524296; cv=none; d=google.com; s=arc-20160816; b=V6p7oPqdXTxJckjD86+I9cA7GfHhdSeQc0/Xv2sTgVvXsUat1VJtro8cZE8YhG6XWH t9PaTmeiGk7gX1Palr9CnASCneH7pHxc4PVzT1ZvA2Wsmjnofvjqqgf+tHL+lUa9J+5J eAwbPB5bkXamqPVJ5InElTsNqc16xoUMIDU2kBdy37SGitkcs8Z/HeW1Z5j5Qp1LGR/G KZTG3a4JCETzmV6u1e7jdyHtNWZVxR/dIFsKqhV/D42ra0KYhwIqvkCLc+p+Ea4MS1bE 8/b0heDcZw4d4W/KjuSse17JwgzcS0HN8BCHLXG8MFaJRNc5yPawyGr8qxYU/PsvylLA fPRQ== 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=BWwGGUgDFgg4hO9qMZw2D/9dPXS5SeKL4QjSgAcLF4o=; b=RrZETUHd9PiCSY2UVIcbeIi38PJTp8Fs9ucGey8FQbPtIbbrebQWeckDWOscmjd+VF kuqCf7lN/sE5bZWL3d1QdQS653As8EXODU9ewiRqcpnT3ufvtaDx1ahuZ7M1Pzy13Nvw AoWQ951UsSosw0FdFbL/OUOJWxOTW7WckKIPoMQ5JhCfsLAjrrLtQ9dm8bGJGG00P7Is 19Tn5DHzp5s2owvKH0lVE1Srkba1b7KAVpTUftiZKgARzAI8Uei++zHTb/vYfDwv/FH1 iGjMq/vSuXJeTXhV+IjBA6hTm0mTkDVFYi3ijvS0mlzRDdYZN8D36mn5DhhMRH53P029 jXAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="MEAol/YT"; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e24-20020a170906315800b006df76385b64si16576796eje.4.2022.03.28.20.24.30; Mon, 28 Mar 2022 20:24:56 -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=@kernel.org header.s=k20201202 header.b="MEAol/YT"; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231625AbiC2DXi (ORCPT + 99 others); Mon, 28 Mar 2022 23:23:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbiC2DXh (ORCPT ); Mon, 28 Mar 2022 23:23:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8917D7B108 for ; Mon, 28 Mar 2022 20:21:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2FF1BB8169F for ; Tue, 29 Mar 2022 03:21:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C139C340EC; Tue, 29 Mar 2022 03:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648524112; bh=UYFdXDo3CHiWRZCZj3Wg5lmIvgMkgUoH27qe1J9Zeyk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MEAol/YTZlNrzkKtqIB0ejpA/zEOPElRiA4D/PQDhm6DRq+FB4dCurRiKN2mMeIUZ s+t1R0cvawlEUNjPZSEHXIRFE87LOWGHcYvMuUrA8hVg0PKhtHDSgA5OVqjNZ9DjlY rDjsYU9D4dgknO4xVsyQGatNF/CcE+eB53bu0hRZ58CglswdldDcVxyF02WBYD0w5c /sK3OU0nklxGIhbGJ/KyHHmJuLMXCbRKf2rhSpQtRTGW3vl+hnfvszXk4WJCeGQh4g flKawcdbAun5ALfvGqMKZazVGhBxta44BjCvRcaGsnLrSBKyTCvy0kr9cWwZb34fN+ 8pVIMHXZ7Slrg== Date: Mon, 28 Mar 2022 20:21:50 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: tytso@mit.edu, jaegeuk@kernel.org, linux-ext4@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH 5/5] ext4: Log error when lookup of encoded dentry fails Message-ID: References: <20220322030004.148560-1-krisman@collabora.com> <20220322030004.148560-6-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220322030004.148560-6-krisman@collabora.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Mon, Mar 21, 2022 at 11:00:04PM -0400, Gabriel Krisman Bertazi wrote: > If the volume is in strict mode, ext4_ci_compare can report a broken > encoding name. This will not trigger on a bad lookup, which is caught > earlier, only if the actual disk name is bad. > > Signed-off-by: Gabriel Krisman Bertazi > --- > fs/ext4/namei.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > index 8520115cd5c2..c321c6fdb4ae 100644 > --- a/fs/ext4/namei.c > +++ b/fs/ext4/namei.c > @@ -1456,6 +1456,9 @@ static bool ext4_match(struct inode *parent, > * only case where it happens is on a disk > * corruption or ENOMEM. > */ > + if (ret == -EINVAL) > + EXT4_ERROR_INODE(parent, > + "Bad encoded file in directory"); Maybe have this say "Bad encoded filename" instead of "Bad encoded file"? - Eric