Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1603201rdb; Tue, 20 Feb 2024 00:57:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUgGKpTcwbcjxao9xI6ieL4UOZiTVjBRQq+GfUPKxF/3ptgmwEBSlro40+rf8sVrv8jCBQaT6/gGEyzEhBph1fl+/fNTsJ0uwTAW5wwPA== X-Google-Smtp-Source: AGHT+IEIiIIb6VZ6YQp6yP6/zPD2OCVP5PhUHpumHbwHmHJGOAFFM0ktRahuAjEH+Bl9FHcjPJf0 X-Received: by 2002:a05:620a:7e4:b0:787:5a6c:7f8f with SMTP id k4-20020a05620a07e400b007875a6c7f8fmr7555490qkk.64.1708419456868; Tue, 20 Feb 2024 00:57:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708419456; cv=pass; d=google.com; s=arc-20160816; b=avYJEm6u0fIdiJPGpqqgYSQqCnzpKNl6gjIlUekwax1Mdfjm3Bk3dannCRz1nKLvTT TQvqMI4exNm3pUhTG4aF6RTldyRISQ0B1Si2ByotdGmfULxR/DRbDePK5U8akviyKhyJ UOHfZ1Fek/wUKFyaju6qTDByCKCJnLDwGYyB+RCY+o6d/RKPxJiblL1IS9H8UTsX2l4B KqiMeIyH/8RKoM8ZBOK3z6tHZnazBYjhAYfqbc6BbCX6UCQvG5XBQfsqWc3Fbh6idc/+ T19+xfAWx/44qFZXUkvobAdktlatLn9G4KEfn/dtu/DRmcAuYqD5UtNvrhzv8nmmWQTa AkEw== 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=Ey1f911l0Ypu4Kv3QEk3wMTaw4gPz5QrRhENPqAMZkLEHhdREWeSj/fWHgP65IyOT7 5SxTeuYc0ex/MGG8xn1HWLDvoDP+zG1jcsjsSkx2et4K3IIilAllpwOHNyWZ+p5zo6kb BfbnpWrIKq2euKNBBqKjxf6UmKvVXGY8EPoDVbNqq5PsN7Tqph4+0/UT4lj53BfT/V7E 4USxkgUJtYQQ0n12+MHR1kq+G/+khoVa4p/IMuXtdF0rrtrBITqIl2bJCfitMoaBKO/3 NI4mwUeZIsSt6TK4PQG2QuWxDO9bTUdgSEbIkVxRBs0wv4ikbrqcXanPx8IWGdA0kT/y RZ0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=rRouZNa9; 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-1296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d14-20020a05620a166e00b0078766209e58si4399363qko.607.2024.02.20.00.57.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 00:57:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=rRouZNa9; 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-1296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1296-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 965211C2186F for ; Tue, 20 Feb 2024 08:57:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B0E9B65BCB; Tue, 20 Feb 2024 08:53:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="rRouZNa9" 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 D3A6465BA4; Tue, 20 Feb 2024 08:53:14 +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=1708419196; cv=none; b=CStBGqDjgkYAsna8ICHEIMOYhXVDUlOfPCaVf4YnMC3ulaavNoHWY+fRt0PTBObPGZkap98M0z+auEUU/+cBfhv7pGBRSHH/6B+D/zmJccgBnf3sONz9Wrc5TDkm5VM8JDjm1Kcb1xnWAxGYL1D60b/cUQb+uKC7TB78b4sIQNA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708419196; c=relaxed/simple; bh=cVITJNZ35p97HDzRx3PUv0ugSW5S2fLqOWH88XqFex0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rTufXpN8uUQ86qu2f21FEaReaPwxYTcBVqMYloQRRwqVE62XsFYQUgv851vNNiDe0JZXyZs6/9JkU3Ln6xddXtKdaISqatdA9zUtMCJeG2/4khnTLvG2Yi8diLHEaaaed3Qn4ZokKmwJ/9o4xK+wCC/yZVyboIguPDiGhtY7PPk= 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=rRouZNa9; 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=1708419193; bh=cVITJNZ35p97HDzRx3PUv0ugSW5S2fLqOWH88XqFex0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rRouZNa9WuyH+2RWTe+Ze9yMxCMI9N+ShmaKvWeh1NHyPiBFohuYsrp+BI4Y6rKXS xAcOVr9u4APwRw6P4xazTNUOPOyAtfIp4B7+sK7HWRPOQpc0dmNOBkY8Ztz9yAXWpL VfjzHrBO/dV9kMLqB33qT0087G4pEIFNvt0taSd/9jKL5SlfMXN1LC+6WghW+aafcd 7QklPcIE0D5RO382XXp8LIto0Nstgeb76lCTZbox6qyIAzRORRj6vhIT+gufCgyFpd JtnFhcAhuamsP4C7FtX4TGoO41pQ28M8AYWPdDZWXBQQXLpfQ2YXJyTvyEGZBLTXZV YnTEWxSd64Sfw== 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 925723782098; Tue, 20 Feb 2024 08:53:09 +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 v12 6/8] ext4: Log error when lookup of encoded dentry fails Date: Tue, 20 Feb 2024 10:52:33 +0200 Message-Id: <20240220085235.71132-7-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240220085235.71132-1-eugen.hristev@collabora.com> References: <20240220085235.71132-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