Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2159878lqz; Tue, 2 Apr 2024 08:50:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVx87V2yTgdpjtFDOJFAWluKa5MEyHxlC1W34l6mqulPEH3VX6HcQWiV5YXmKiQtMjIB6kCCZZ/Y6XV1GD0ybIrtWbds4mBNpWW/WEXiA== X-Google-Smtp-Source: AGHT+IGs0Qgb+vHt0rbY56AUCWp4m7ERKpG6Rs4JfE4nc7jv42RGLchZ9sSj1UlXNsC+L50NUE+x X-Received: by 2002:a17:906:c358:b0:a4e:7fb9:9135 with SMTP id ci24-20020a170906c35800b00a4e7fb99135mr2179250ejb.31.1712073058949; Tue, 02 Apr 2024 08:50:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712073058; cv=pass; d=google.com; s=arc-20160816; b=fMpjdI+wxMRRnGQaMcNfv7HrXfxMqL2hmEKavhKQshxdQzRL43pvw2ryB1AFLbumhU WAWlA48khhs9QNHe2fMMWoyAHTb9G9WXgpMWS28IMQ2Fc4Lq2s0seBntA/8Y/umV4FDc BFnW0gJedfpRgTqp2Ei/Tv+Hu+JOq+JEMZ1F7pG0zYfDAKgQORhognU9uZvEN3cGCA3/ 1bT1010F/2g8C/Aav9wZA2idDRLTvv5b5YKweAtgzTNB0D2fci9I3aFCgZy4pjyqa3IQ 28bmsajBG4bedIF/cu9TokXXpMJP7mgDTTHuTWHMKuxadEDZ4pqSNKca/D3YJQHB7wu0 UTrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ih2S6pyJj+FNOX2FaVqCPxiJGRm/mQyzBzMM/MkTjGU=; fh=zf0NNkRrVzzNLxoWnmq9qpFBuYVKEQmjRPQIjT6JsCY=; b=qvBy3twzoWt2l1wSD6tCsJopkAapSxZXPuIhgl0Gp5vt+U6fAHq1qo+fTRe9KrHjyu thQRDQrXcxF7tUtH1O+QE0ZX9fvCJDMuzxFwdfiNMRy+9QaRBrKzstzpPxTgYMAqaKOe MXSrRT8Nc0wxrHN6oTUb80/GIfpo4zgjK6cd5evlcOTikZVVuMJmcUhv70i6g8jUfTEh dOiGjZ/yCeSGuA6Jw4NdHlpfN80Yw/PQgfZSFRG6hhn6etp0m/a9Iz1+nTYunxfvcony gwfjVITtEP+R0t9UkKA9K+DsI03znuMUnfpDFXTbLr+cKZLpptS5aZQZ5snyldRgpNi2 IpcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SgZfM4j8; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-ext4+bounces-1831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1831-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m7-20020a1709061ec700b00a474ece2f35si5696104ejj.844.2024.04.02.08.50.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 08:50:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SgZfM4j8; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-ext4+bounces-1831-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1831-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AB2EB1F2294D for ; Tue, 2 Apr 2024 15:50:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97C6D13774C; Tue, 2 Apr 2024 15:48:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="SgZfM4j8" X-Original-To: linux-ext4@vger.kernel.org Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 66CF2134738; Tue, 2 Apr 2024 15:48:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712072939; cv=none; b=lJi2ZDmq/pRqxG2c9BuA/f6/LqCbORLBrFlMwlbo+FqN48aPGvuJBhYyDnbwaUD6ZUOXZOwHAAsGvbksgfCWMMKPxWoWY9UvsgoaBwrdFyv1kVNWsYiUascJy7STyqye/N/b4pwdfFbcNsMCftFVDIckUegorhEnY//T9uQQSYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712072939; c=relaxed/simple; bh=3qqbmy6OIcOoO07cO28FmCqjE206p+74Pkl9CCe0L8Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oV4IU3JuFep57iarqKkG/0LMVg5Z4NHwg0aAgAPQjNNCFy155TUp/qXCf9tJyRCuhrVLZmtxBGaqxgRPmF5a3FqxH7CItwvBVkJdBHYRLAGksm19mopxTr1ofbLgsCkv/5OJF4FTAOeTdKaO0SUnDDcPcTgR8zXk3qWBsbLPhjA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=SgZfM4j8; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1712072935; bh=3qqbmy6OIcOoO07cO28FmCqjE206p+74Pkl9CCe0L8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SgZfM4j8m0wWn0DNkDq46LDfpOBCGT3bILSbqHsGSkUxpPo4b81IwwPrajdoCRvtX I9p71M+M9+37cLUTdwD9efeNnm8NGbKKT5AELMTUDi+9Js+xv+kx/NzGqOxwd7Ary/ zG2nBh7kWJFz5w1UaHVgfrRvJ1LcMygbfanLp168vvYaX6KcLSAjeM9+xOXkdp3+KC Mh0eMbgI92pS+V8giRfPK3NFpk2zOtnmQHmurb5O5fIFnUeX59s+UaTUpOtsnLHDU5 gDahwNPmpCA0ASioL89EdUSTwGD5AVZwXkuaE/YTKkvWtgBr24Jjk1Gjp0soSK0qtV LFrDgky450Pxw== Received: from eugen-station.. (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ehristev) by madrid.collaboradmins.com (Postfix) with ESMTPSA id BA3A037820F5; Tue, 2 Apr 2024 15:48:54 +0000 (UTC) From: Eugen Hristev To: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, jaegeuk@kernel.org, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@collabora.com, eugen.hristev@collabora.com, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, krisman@suse.de, Gabriel Krisman Bertazi Subject: [PATCH v15 6/9] ext4: Log error when lookup of encoded dentry fails Date: Tue, 2 Apr 2024 18:48:39 +0300 Message-Id: <20240402154842.508032-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240402154842.508032-1-eugen.hristev@collabora.com> References: <20240402154842.508032-1-eugen.hristev@collabora.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Gabriel Krisman Bertazi 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 Signed-off-by: Eugen Hristev --- fs/ext4/namei.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 2d0ee232fbe7..3268cf45d9db 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1477,6 +1477,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, + "Directory contains filename that is invalid UTF-8"); return false; } return ret; -- 2.34.1