Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp236636rdb; Wed, 14 Feb 2024 20:29:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXIrbeBsDmAmYN93Ac0ej5l/5pQ1yaVHxpNwEXttcU0Cjbgxjq1mqLUsvXuayvpL/mM8hHnLX5PWnBnZBqeZAKWxcnJCCjD83Ej5voB0w== X-Google-Smtp-Source: AGHT+IHrg3oOkcmlNe8wjEjcgvYUexH4zksX9DhBlcoD8VfTQ5YL2dcK2XQ+/xRbH187xnDY2vz6 X-Received: by 2002:a17:906:5614:b0:a3c:9d80:da20 with SMTP id f20-20020a170906561400b00a3c9d80da20mr351588ejq.3.1707971374253; Wed, 14 Feb 2024 20:29:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707971374; cv=pass; d=google.com; s=arc-20160816; b=BUfdaqi8HQcevQzCN+GTWRERz63k4rQyG48qVG6so8g0MNe4VTv9pZCbONbEguVvxf 7m8dJnG87S3Ys4+RkbU49ERSDrScVOGLPcubksliUQUCgi23CeHtv82dd6pc3aMzHnfz wzh30qrvxmyF8PkH1YuXBeZOWeGNfZI9eDVEv6nkdbSYNBz/nOO3uWsViE6hEZDw3Hbe lqh6Z0BPdbmtS1m04P03ASIqgr64EEACaIBf3k5eb4ugEoL1jFbEOqQCz0+386vn+sRg Jhxma9wTjNImNXT8fZ/zBDPO5jXteeViwuejD8TmlvAzTfMgBC3iWsvkqpWdtUQfNe1G NBgA== 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=a10dU96oUgbeeU2HILozQQtbAHEtwkt6EHOQl3WO/6M=; fh=YX4HbHS7wMJfdu6Xp+2MgHIyDiEardnLcvtWgzaTy/w=; b=aRdaanPQ63XA36XlRxec1fGIhYJ9aM1gX6w3fk5Sca2mYvaxcfk1BTSmvNDqErDgkM 98KoxaBgmGcEa+WbWJHw/c9dZXQ9LzT89fqFDDgPP7pu7WenyIZdisH6/nqEKLBEAPeD bAhuynDirzxWqMJIwkWZUYEQyqptggRGm9awwDRey+Zf1bpSJq7BlyB7OTKLoXOPALxq iekjgVena5p7cPx0IZPPPz8wYl5Duehrc4wA/cAcsbm661GO8R1ZgYjOmvoLIGe6Va/N fMOYg9iKJH7Nozso13/PUDZlfudoQPB7amyL8fbt7PoqbH+cvbvg1OizLhj3WuY9ic79 jmSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=iZwnhjtD; 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-1243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1243-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 i13-20020a170906114d00b00a3d94129d81si176615eja.108.2024.02.14.20.29.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 20:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1243-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=iZwnhjtD; 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-1243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1243-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 0056D1F29501 for ; Thu, 15 Feb 2024 04:29:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 673D2171B0; Thu, 15 Feb 2024 04:27:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="iZwnhjtD" 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 705EA17586; Thu, 15 Feb 2024 04:27:46 +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=1707971267; cv=none; b=Vj2mEZpoVfKUUTNTgfHB0CxjwhsrdESRgNhWX32Xmay+vHIUGusbizrKhrTOSRs0S2r4pO2LArvZw7I5Safu/0H86lf7Tli+o+BJdevBatoep/+cGGjP87yxS9NqJrrCNHq0oZw+SSGUBZnv8a1T174fXDg9JQSbvY4cDnoptKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707971267; c=relaxed/simple; bh=cVITJNZ35p97HDzRx3PUv0ugSW5S2fLqOWH88XqFex0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iz0kkrpGv4hvo30a7pGtcip0e6hCQCJIgvCxiGZwX7Vsk9d0yQ0RfX3UQ0rsn8JJoqGmFNTwS3WXimFmbJkENY0bX7rBpsohoxeVVeuYzZD6BHAU/caoNel+r3HfkA4SxYFKg8uYy3sLrC236zfsukv2rG2ZX1o3pHCpX8f2vsg= 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=iZwnhjtD; 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=1707971265; bh=cVITJNZ35p97HDzRx3PUv0ugSW5S2fLqOWH88XqFex0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iZwnhjtD3ErUfbmTLbOTNncaq2pEk2ej3TWecor+LbfGW1B2bkNxfbvmuP019bVjm e5rbzMu5QzfkWi20kcRUYQX2kXf20g7uQP2UlXCERQMWfBioYff1+7VJ6EX8MAL+vr LeDf9LirL+vm/RalrRGZSO14devm7KAfjLs1Ed8+EYgi9tBT0RdoEXWRPIHzA6WYf/ RjZdAK8x986WAPjgqKjGdxHEV9f3FaLHW5EQ9iku/tGTXcMGzHbjN7Ck+zlxXsjPBi l/19w5zatSLYpz2HFnQtDaLzOeXvtvoRez7vqyyK/nfSrfNnpjGYvfVdOM14znu/4H y4nVjvaqcsTpw== 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 3D14A3782098; Thu, 15 Feb 2024 04:27:39 +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 , Eric Biggers Subject: [PATCH v10 6/8] ext4: Log error when lookup of encoded dentry fails Date: Thu, 15 Feb 2024 06:26:52 +0200 Message-Id: <20240215042654.359210-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240215042654.359210-1-eugen.hristev@collabora.com> References: <20240215042654.359210-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. Reviewed-by: Eric Biggers 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 6e7af8dc4dde..7d357c417475 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