Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp654590lqp; Fri, 5 Apr 2024 05:15:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWrgIwi+jpiTiKiWo2cvRwuxzdk4ygr8cMELdGYsi9i9rIsU++6rSu8dGL2hWoq0qMtBe83exc0Uk+nh+xN99bbZUGM7IB4r5D32otRCw== X-Google-Smtp-Source: AGHT+IHAxztBjcKIzg0eDwg9DkxIIFLHi1rgh6xXpeL1OySj29EzDvgRw8d9RJPXvznIrY6fFsm9 X-Received: by 2002:a05:6e02:1523:b0:36a:e72:92d6 with SMTP id i3-20020a056e02152300b0036a0e7292d6mr1253289ilu.6.1712319331188; Fri, 05 Apr 2024 05:15:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712319331; cv=pass; d=google.com; s=arc-20160816; b=CE3zDR0vZZYBxbUzhJ6G8rDSferdYdBFuiMliGZaeVP4L2EMHUGIEA/ae9fYIQD67w h9CUr87akLQpR9UeHitySvrFxQQAkNTbJNl/Qlt9hyjSd4qxXd1n1yUD0jFg1atYUoVA Docofmkkx9pEp+AzlVPVslbat2ztLpuvCoDzQ5UtmWwI1w5jH80zh64klR6uyXHZoI67 XLJiYdKlUq9mgSJUUrvbQ5x+91zTry/WXPDN9KHH3RKlHtkMfcPxVKLbnHIBdEE8hgBP am+EXUkX2Ie3kCyLw7cZJ6J2WWkuwZfa7NgivWTvvcnJtX+Z+zjamDvySb3BFqsvvVBs rAGQ== 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=i4fiMUBCQXbDZMdyre5oEqz49aLUEO6D1+7NN548JDQ=; b=K1Eufl2Cl84W9FqeLsmHxAo/hrHDRgrp6QX3nk9AWXX3EDc/63NymTFkyID4mQwoiZ Ey+qWiMAPxSL7+7FxZ5RzTO8lzVWt1aD6fBNWL6UoVIaS3zTdTWQtl2pHcM3xggwgWL7 7K5ZFqHrYYDqGkAD+NoMufqeYmHG6CqtPQfAdPBe+ZIWfeOofarM+vPYbJzFMZH8/Zx9 7Mxf4qfxS5bZ4XBP6Rdt+km7/PtJCU5BCeSvdg1ppwBpAX62viRllzx0aoerdfFkkGtc SF2NMHzisiToO/VDpkMq6repD4RWSOiffbChDhXlyVKQIgSZHDiJg3nzSAaJOi5/WZxS OANw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=TKDOJxOE; 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-1889-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1889-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e21-20020a637455000000b005c65d0dd9a0si1295849pgn.503.2024.04.05.05.15.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 05:15:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1889-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=TKDOJxOE; 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-1889-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1889-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 51094B22484 for ; Fri, 5 Apr 2024 12:15:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8492916DEAE; Fri, 5 Apr 2024 12:14:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="TKDOJxOE" 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 89FEE16D9AC; Fri, 5 Apr 2024 12:14:09 +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=1712319251; cv=none; b=m3BKTt7iwfxmiAZgEYrgMtj7hlIqmKFoDnVCXUgt9stjcruqLmC+gWNzsXu5JtRHfYhnPuG6dmcnZ8+xpb6GWZ84LCU4/2JKW802brbSvRIqk65AMbx5d1ie+VMchaFRInpVCH4KzP9LNo9brRcYNmz+8xck/TT2sMHpD/xqN+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712319251; c=relaxed/simple; bh=3qqbmy6OIcOoO07cO28FmCqjE206p+74Pkl9CCe0L8Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qqm5Wn9ew1LlNKUEVyBKNbAjpx1olkG/T7JvXZhPIGtc4GH7L/a+9PRlBHVNptIU2JF8UnRHOVmwh7JXWAFWi/uz0eWf9TxsGzqGvuUyJW17BT6kIee6fMuH3Qr6aHWBSPliC+Y0F15Mp38hXFnESpD6R6TdNHXIW5c/NXBgTE0= 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=TKDOJxOE; 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=1712319248; bh=3qqbmy6OIcOoO07cO28FmCqjE206p+74Pkl9CCe0L8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TKDOJxOER7MirF21hVhlJQygRmK3/cJqX67xIv56OiHAy+8ouFLN8Y6MoZIeZQr5U gKEX2b9K15sZy9+GBZ5VAAd6GKpxvEtgt1iY8IO47IB2Gze+5MDekZvgpveB2GyG6x LNGantlVyvkzvkODN1PXwCuEDdlHax/3eCJLn5OT2wVHpWe16Af4a9/Pjgistv+my2 L99lBBpVAW/4p4xOhSqzNSEuA9P9vS/m2fnRgFtI5a8OBNhBOQPz8DCeITHkwotFTs TUOc9wHNQNQY7H1FvAo3RaxedEuZxNziGZH5t4GHqnaZMGt2KjAK7ynt+aT8NiIv1O 3evyYq2Hw6Q9w== 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 289F53782134; Fri, 5 Apr 2024 12:14:07 +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, ebiggers@kernel.org, Gabriel Krisman Bertazi Subject: [PATCH v16 6/9] ext4: Log error when lookup of encoded dentry fails Date: Fri, 5 Apr 2024 15:13:29 +0300 Message-Id: <20240405121332.689228-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240405121332.689228-1-eugen.hristev@collabora.com> References: <20240405121332.689228-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