Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp304136lqs; Tue, 5 Mar 2024 02:31:11 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUeB/r8ad1kMhqoTZzboF5szlJBDYxaIcC8utjE78pfzJEmz3eIc81VUjdtlgNZsE3G7wPag/Q4e5e9+fTvc7yvK9xMvR6tiJNwZsZBUg== X-Google-Smtp-Source: AGHT+IEBd7CZDMZPLM717qJNIs9DShNVkLbQ547XZHBB2/kiWxfNleWDDHiUJ92Z2q4Da56TRnw5 X-Received: by 2002:a17:906:7249:b0:a45:98be:ea27 with SMTP id n9-20020a170906724900b00a4598beea27mr1443399ejk.21.1709634671017; Tue, 05 Mar 2024 02:31:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709634671; cv=pass; d=google.com; s=arc-20160816; b=MpdOkft8k2zMIAz+U2Irm3jtP+mqgLNxDS7aL6u4Nf+/zZW8yTtq2iDUwLFT+sa1xn VPaqiYkJA/ynzzpcx21pQHHgXqNjB1VN82PLo8EhRPVBYTo9UcR3+4FWekpRpCv1CCA4 eanLhlmdWiDZlFXIPOGJsDTZJd9WvUY0INSVfWrXYf91D9vDxgfkSL7lr9HxrJsAPtJi wp5b8FmSfKPay6kKF1FnKYNwfTGgMsEOu7Rc6uVp89WqGxMDRKUtCNfwtcwDotoSfyQ1 29tNodGjfFiTlKaN7a9iaizHwO4brIZ1bhynHMxCOCEdYdIXssFYS7U9YyLON7fB6l53 IPGA== 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=v09EszJBFEcPXAgMh/RG94FLvGxs77Z4MNUVTNnpAt3rzypfd1ahS5f6tXSnfTrp8E 7fgqrqhRFPmcXoKliDf+PooPWmWDO/DUQ+rO7cxvu1EFmwZwu6s1wPYI/oAHwa2ZxB1D BhL4dtddGmFG9rViTZcLEPF382CdA+AUxZiD3Kc1ljaXb/23umpe29QmM7nWt1Lkc6YZ oJTmiDCJsJSsUZVx2Xqzd1J9XEv3QL2J9u2KMy1CYwv8zpp0zfhwKwtsJN4xN3M+y7yD l6Vwmd0VoxE9wTOp/dcFdt1f+KYGfVDJWe05bJMpmzHmSFylu1nzHbzRhK8I61e8wIqx rSTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=gxoYNSJi; 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-1514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1514-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 gs20-20020a170906f19400b00a4523024e21si2068623ejb.336.2024.03.05.02.31.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 02:31:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1514-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=gxoYNSJi; 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-1514-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1514-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 BC5591F23283 for ; Tue, 5 Mar 2024 10:31:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9813A6E609; Tue, 5 Mar 2024 10:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="gxoYNSJi" 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 AEA476E5F9; Tue, 5 Mar 2024 10:16:47 +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=1709633809; cv=none; b=Vry067rF/oaQCZRrdwlb+muqCpy7DZLoSkagXy/ztkHXjKV5wZtpIOBGpPU1XY7Qotjym9dEheau9iy22O0ezeZc31wn/gJp02VV1aAB0bwl11PflZINAp8gcG9uW7cirhk830aechAAtDim9Lozszwr6HcPJAyZzt0F4+yivCA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709633809; c=relaxed/simple; bh=3qqbmy6OIcOoO07cO28FmCqjE206p+74Pkl9CCe0L8Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fIJGjSdVzwkluebE+WmC7uSlbOqy2jaFyT18fwt0HkZ7Y2ZoFS7vWoWqB8D1c+Q5z46qyeS/JTDcZx+7JnKp/qMPZZyJM+vDD+hrsu+U0GEgWFDSKGxh0Su3G4+pXru/b8JshzjjYUw/QbKypAM3Uuk8uNlqD26yzAJAdBDwB2g= 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=gxoYNSJi; 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=1709633806; bh=3qqbmy6OIcOoO07cO28FmCqjE206p+74Pkl9CCe0L8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gxoYNSJi0I9uZG/LknNNer/18SKS83gHTYykNp9drG77FRBDVO4ZGoPW1KXCCtBsG 9p9OU37urWJRvNZRHIeVtD8klLfbZILB/pxnSYgrPxWkxpDMrgqJXtV5C/sZPg57PK nrrAWbGrQumnkepWliPLo+/hxxQ7QsSmzXI3BSprj7YMUhelyExDKooulmMkUVqVOX dqBc/NA3YUttD0CtJ+zruSi2Fc3fCpk/v37R8X76b49g+LQi8vxGT1uxHevWL+80/L UHIgjslt5DSP5DYPs5sZpo7o5W4j3bbGeyzuqZVNS/inhUZwEl2GS8n5aSo5GzrpNa zbTUhBmgbOBdg== Received: from eugen-station.domain.com (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 9DF8237820D0; Tue, 5 Mar 2024 10:16:42 +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 v13 6/9] ext4: Log error when lookup of encoded dentry fails Date: Tue, 5 Mar 2024 12:16:05 +0200 Message-Id: <20240305101608.67943-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305101608.67943-1-eugen.hristev@collabora.com> References: <20240305101608.67943-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