Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp870206iob; Thu, 12 May 2022 06:28:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4CImvCb53xNGeBJ+ZvWUGX4+iUiC0Xl/CY7WQBBjC+idKiR62tfDef2ZxJwUm5Ha1cOfI X-Received: by 2002:a17:902:da90:b0:15e:adc2:191d with SMTP id j16-20020a170902da9000b0015eadc2191dmr30265098plx.134.1652362134058; Thu, 12 May 2022 06:28:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652362134; cv=none; d=google.com; s=arc-20160816; b=T+LighN4dE5ywi09rU9hoUkcn2HwnA9yE2H7vbQwWp2eXd2yvQVzAP6ko1vE8tGRlR nR8sHXrhwV8c//XL6apziMBODETymLEviYS0QzcWdVItKy5DvSG3t6NHvU6vdc9jSHhP 8PHfkiPkqgewrHGrI0JX1kcpTWRnbRwBz/+r/alW5ZF7cwLjnCKiC62LcKysEwY9Gy5x NOxrwBzSJE5/ory0PS0pWoHUQ6as1Ui8Pm19pXzkgLm0GqpZxHy3sWZGS8PeSp+HI1e8 69iPoZknG/4JPehX+OOjUF8KciA9cNXolRo8ymsHBjXJ2vM205c4E1v9/cXY1+UT5Bde yZbQ== 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=blKQp9NbxeOpm5rI37NawX7u+i6HxnVTrdJj3E2/UGc=; b=Sp0E/HW9NwlfmGolGHr1PAe1LMEtHiX6QH0KlrqbqQs9i4eEbAF7BftcM7GgdGwcsA C33xNWn6EYRrfsDZoA5DyUzRPbpgCejmu6whp/OvhgSRn2/VYs/rv/UgbectFOg72GmT w4bGuYMqz6jc7fAjmDW0Rcd2HrRBtKheYfTI1LbBmyhdqir9PQc+dc3DSgx0cW8o7GGM mybeBBoi0kJhkDDEaFDOBBOBbV7QjAALKHOOs5Vk575/wBS9qv/AsudJVhGOJ4iRs8jp moOQoLCtaG+gX5A1nn5r4eojSYIXCuMtSCDut2TzKID9CNrrGIA4YD4yLZaJ64PK78Ld tWeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FQ49KXR5; 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 g7-20020a656cc7000000b003daee299c49si3440573pgw.580.2022.05.12.06.28.29; Thu, 12 May 2022 06:28:54 -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=FQ49KXR5; 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 S1349988AbiELFs5 (ORCPT + 99 others); Thu, 12 May 2022 01:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241110AbiELFs5 (ORCPT ); Thu, 12 May 2022 01:48:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45FF133361 for ; Wed, 11 May 2022 22:48: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 dfw.source.kernel.org (Postfix) with ESMTPS id DDC0E61CEB for ; Thu, 12 May 2022 05:48:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9E30C34100; Thu, 12 May 2022 05:48:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652334534; bh=d08puB5fh8hsuQ35H3WmEybfW309kt4JfYm4wR3DdCI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FQ49KXR5PTPy0h8HyvgwYK4024ceZHItRofouxcJ+5L8lFGZxOGyONCFg0DYXie9y IGbGmEaZVViRdK5Tu93KLwmIiIoK7qie1PmNm7IsuyIJeMGN+23c2w79lwV/GCvTfQ DubIYXKytnaAgtL+tKFlqzHlo+taC3uBpCrGfepRjxEc4KwUnxeUx9Zk6FlOXXV/Ni igZE33iAYb0vHdHld1BJ7HiIYFEsRh+mLd0puAEkg1nTyHZUvWuvPh/usab+vUCEcd mMEVah3l9TlotcamEY1okYWpY3EYpPXcPpMjvRQ9DTeMgw36icUSRjxYJtYeWMBqc3 oo2+cgbmXiZ2g== Date: Wed, 11 May 2022 22:48:52 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel@collabora.com Subject: Re: [PATCH v4 06/10] ext4: Log error when lookup of encoded dentry fails Message-ID: References: <20220511193146.27526-1-krisman@collabora.com> <20220511193146.27526-7-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220511193146.27526-7-krisman@collabora.com> X-Spam-Status: No, score=-7.7 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 Wed, May 11, 2022 at 03:31:42PM -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 > > --- > > Changes since v1: > - reword error message "file in directory" -> "filename" (Eric) > --- > fs/ext4/namei.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > index cebbcabf0ff0..708811525411 100644 > --- a/fs/ext4/namei.c > +++ b/fs/ext4/namei.c > @@ -1458,6 +1458,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 filename"); This message is still quite vague; perhaps it should be more specific about what a "bad" filename is? Maybe something like: "Directory contains filename that is not valid UTF-8" (or whatever the encoding being enforced is). - Eric