Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp90415lqp; Thu, 4 Apr 2024 07:51:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVW1pNRGouQpOYUvt0yAsjqFev6tvvfRZ/TTdFS9YYSNdl5uRYLunvcUaEoTcZ0LYKUjpI9aJvjAoGF3oEZOeYW669TjdiJhL8KHUVIAQ== X-Google-Smtp-Source: AGHT+IH5wcIErEXatO6lEF82Jv4AcsZk5lLKxksYy6U+l/3YVa9/u5IEj8gCGv/khgBheqdMkp9L X-Received: by 2002:a05:6a21:6816:b0:1a7:3b4b:4153 with SMTP id wr22-20020a056a21681600b001a73b4b4153mr517793pzb.58.1712242316765; Thu, 04 Apr 2024 07:51:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712242316; cv=pass; d=google.com; s=arc-20160816; b=PG33vDxvvhUO+x7hUIaI7j+z2kFnt//ekn7xj5PWcTwm4zsbdg35cLW8FnI8RxMlMb WSeWcp241G2YYv2i8Ltfv5vpAlSMvun+46j4EqxnAN09cD+RlrPO8etEEvjoFB6wcBGv 5R+3BIHWS+ZSLD0H0GpYuckMK3n7heS+UvbKLZDsJHuclYZgLepp48J/4sNQoTWaYZ3P Pv7meg1RFcOvjYZSSse12tsh+2KsSi3xol/ElPmCgupbSy1QAn1KrJDlu1HwjuKkWxiz 6APayH0+MlXBD7xtirm1kdTzN99hZRNnzJ5fa4iaJk8AweoNldYWfqrOJzdrjIgY8gzJ Rc7A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=j4IzGw5M7fVQM80Gsb3miLdHgF3FriVH4ehEoQKT2Gw=; fh=DfmlyWbHTX6dUWt5Ck+rJDRjzXcbnx1rF0DyJfRfTDY=; b=Rb7X+7Rg115HxAuVFW0CtOOASkIGXLLDhf0EFDWHJlKEKdxxnsv+u2l2dbUk8IBPST rcywNWvUvFCMWQT0efnYFaS0wJu51c7EKw1GRgEvxtXN5ZTkRM3+qaFAuzzlVcXsjPFe C3Avuws1Bwjya0bzhbv4F/z05Roowvf5ltEszklgnf9hIuXLKeoo7Vhbdf5xiF14wlUU H1U5Y8siQVU/NX6kELQs8Fw5UKLmLdL2g5434/qOwGTRncRxDYtPNWNc3nlACWBLYMqJ DNBNvQJRhEVAeOjni0/v/tQJQyIzL2xLPWGrIqS7XwwGn6W9KiVmtuoEKbENuAGUFiGt euew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=4cb+Da5e; 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-1862-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1862-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k123-20020a636f81000000b005dc4300d4f0si15242406pgc.444.2024.04.04.07.51.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 07:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1862-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=4cb+Da5e; 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-1862-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1862-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 998F6283B54 for ; Thu, 4 Apr 2024 14:51:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA47812AACB; Thu, 4 Apr 2024 14:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="4cb+Da5e" 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 D10EE12A16B; Thu, 4 Apr 2024 14:50:32 +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=1712242234; cv=none; b=KSyItoCDDaCxkqAxS2z4XHdHVENq0PIpTBUkTKwZ4WNgFZS+QkmRNbkTtd1mmc9oIFXN3c1arYMd2vcsDKZlpUoqqNs45oZbuMS2oHStXQ1d4wxlFq2o6+ILE5WdtqWQmM+5VtXRbQ82OaFyLs9Sdftt/lCjw+zZKtW0nouxTto= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712242234; c=relaxed/simple; bh=p7JS/JW9XXD3bMddSLVFax+q5+sw7d8SB0tPzkZxUCE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OHk4VbbHt2BSOC2w7G9WJcoo+2pfm9SIxe/ynzMjJBpJ8rT5KWjEg/wKtC8TBTDJlpnsr0mdMXPLOFGwYCwfzuEPnz03mOHctYpr0kwg6h62ZcKqQcy342cxGvTZngVkVIqRp7pX/vJSVhg7U8jMQs5UY59q40DhsBTwzgtG3Ck= 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=4cb+Da5e; 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=1712242231; bh=p7JS/JW9XXD3bMddSLVFax+q5+sw7d8SB0tPzkZxUCE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=4cb+Da5eqnTgzFsMbel5Czpg0yxMD9Cj6yJ2vpwTHOXdMEdIBz4CBhF+/ZsV+CU6i Dk2sHOTPShK29ZAITPiisvwR8WhbQ2JgohSYFVuE3atePxhCp7ww/igdnqJQkOW8Un 7IvkkSaxe0q17rJYaLc01oPe0QTES7GWBRGv/MFT0oTMkzf5obDgSfbP1I2lukorpr gsSkEKfmZ97OxTIzC2WnAjno0669RcFpLpB2MjDH2iYFFV/6H6OwEWz/0yhmoCgjIT XVoSirLSNumhV/WWVNvJPdNEgUHdD3qmJ7qUsK82aCTGhw477PwEJFKWa4XEJwkNCc wYernkhbmyP0g== Received: from [100.90.194.27] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 29A043780029; Thu, 4 Apr 2024 14:50:30 +0000 (UTC) Message-ID: Date: Thu, 4 Apr 2024 17:50:29 +0300 Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [f2fs-dev] [PATCH v15 7/9] f2fs: Log error when lookup of encoded dentry fails To: krisman@suse.de, Eric Biggers Cc: 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, brauner@kernel.org, jack@suse.cz, linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, kernel@collabora.com References: <20240402154842.508032-1-eugen.hristev@collabora.com> <20240402154842.508032-8-eugen.hristev@collabora.com> <20240403042503.GI2576@sol.localdomain> Content-Language: en-US From: Eugen Hristev In-Reply-To: <20240403042503.GI2576@sol.localdomain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/3/24 07:25, Eric Biggers wrote: > On Tue, Apr 02, 2024 at 06:48:40PM +0300, Eugen Hristev via Linux-f2fs-devel wrote: >> If the volume is in strict mode, generi c_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. >> >> Suggested-by: Gabriel Krisman Bertazi >> Signed-off-by: Eugen Hristev >> --- >> fs/f2fs/dir.c | 15 ++++++++++----- >> 1 file changed, 10 insertions(+), 5 deletions(-) >> >> diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c >> index 88b0045d0c4f..64286d80dd30 100644 >> --- a/fs/f2fs/dir.c >> +++ b/fs/f2fs/dir.c >> @@ -192,11 +192,16 @@ static inline int f2fs_match_name(const struct inode *dir, >> struct fscrypt_name f; >> >> #if IS_ENABLED(CONFIG_UNICODE) >> - if (fname->cf_name.name) >> - return generic_ci_match(dir, fname->usr_fname, >> - &fname->cf_name, >> - de_name, de_name_len); >> - >> + if (fname->cf_name.name) { >> + int ret = generic_ci_match(dir, fname->usr_fname, >> + &fname->cf_name, >> + de_name, de_name_len); >> + if (ret == -EINVAL) >> + f2fs_warn(F2FS_SB(dir->i_sb), >> + "Directory contains filename that is invalid UTF-8"); >> + > > Shouldn't this use f2fs_warn_ratelimited? f2fs_warn_ratelimited appears to be very new in the kernel, Krisman do you think you can rebase your for-next on top of latest such that this function is available ? I am basing the series on your for-next branch. Thanks > > - Eric > _______________________________________________ > Kernel mailing list -- kernel@mailman.collabora.com > To unsubscribe send an email to kernel-leave@mailman.collabora.com > This list is managed by https://mailman.collabora.com