Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2623048lqp; Mon, 25 Mar 2024 04:54:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW+ZwVevkiUsir9+kpo8BYoR7xfZq97GdXTANqZrPlXxihMsArLu/yWdSxQkgVeC3haXdkqlLN0/S3mfWUiM3VyzXUO6QHWrCpG04eZ3w== X-Google-Smtp-Source: AGHT+IH0tpyiZxpOl6JF74wm+vl4HR2i4lw1koPhdmRUJP8NKxBX0fupubduRtAqMxaKPwCtqLsv X-Received: by 2002:a17:902:cece:b0:1e0:a61c:b899 with SMTP id d14-20020a170902cece00b001e0a61cb899mr6527656plg.40.1711367698676; Mon, 25 Mar 2024 04:54:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711367698; cv=pass; d=google.com; s=arc-20160816; b=coHJuIAqrdzqRI43ETb/4iQf9o2G9SrB2yxavFD9MJAivtThCOzofcDYQ3EI3a2SCy BT5lVr9kRePgADvRIA4m2vhmRNYhvmwdvW1HPJkKuNPDxe0Q1YHHJeq2/BjCXQt1Pcza v4XNQNdDs8OGymobv0Bj2womK4QUx+MSqiumY2Hm38W6JfPgC2Xzz6PYqDMRf+3IAwuV 8zi8nilxZN3OC6GTmlnYQ0G2Oswt4b/90iQNl0MzbfYE+lOT83gNQ3ARaFv1t1aUDehc t2K9/NLLsLAJLEfBd0a0vk/HmZ/JTWDiwE7u6jR+sRmrHcZd8h4NmDYwwg8x1fLP5dqH 0CPw== 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=4hfaQQAtH012diLUM4/DVZftB4rcptwuALl0d1tuNw4=; fh=por09j6UnvCvwfcL3sYPVo5WUIeKJyfXVhbrjA/VC78=; b=mb6xd86tH30Ld3ofpdqyJ2SbecbjeN24GQT+BMnjxwZ9l/2VK8SdIzQQ+gKomBXvJ6 GbUPlA8+Iq9vW9E8L5rvGt/fQpS7KG1rNFSeWT/9uKGdTRxys7MRhSHlxnKS6GCb78eb VKqFfCAXsURWEr3basEx73eOVeHepuBahcLWtuJoe7pbTYh/R1T+3Bdufckq1zR0YJjC ByTtoRptJrelDajJJb8WFggonLEJ+hHHoELhNP3mE57H8l7/hncvzfdL/wrgclJARSGb w1VdNtymZbhAMUlnq/HAZHTy3rsNmP/t9ZUtujQWRx3ksGbFVIB3tS2aqNrVtmxdVfp7 G6wA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BnEPUnxW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116208-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p10-20020a1709028a8a00b001db45912e79si4823714plo.594.2024.03.25.04.54.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 04:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116208-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=@kernel.org header.s=k20201202 header.b=BnEPUnxW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116208-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116208-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 70F2529544F for ; Mon, 25 Mar 2024 11:46:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A50333BD7F4; Mon, 25 Mar 2024 03:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BnEPUnxW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EF4372853D5; Sun, 24 Mar 2024 23:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323825; cv=none; b=tkVVlwvOhJrMnzv8UsHiq3LHCoeFfKqq4LsL/ijvQ0hDQ0ILtyS2IeXM1eE5I1oQ42AvlUiFrek0Kw5cfBmNHGd2sippjH4hqYViDJV0DKXo0A4gT8i/T4F4zlOER8qduNWpefGoZRSGUbaXiqU58urZ9325UweQRxOR8e5Mang= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323825; c=relaxed/simple; bh=FsAsu3Rw+37tte4cZ220/4DO2pAOdj6r1oAecyz+6cA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=np6suZsfFOSJxqsGyN6WKjiPqWQP69goGc18XQ+bHsIU7rF1Q8U5cgig1MyT3FLKzu7d+NqdwzPlJnmrfV3O/klR40F0TVTtfZ6xk8k6Hoe1QuSu2GDcLEsPj0F7yU9oWFQkOxM8yKyurPv4un1ZPLpUs1DFc69NzkYuscIFgww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BnEPUnxW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CECF2C43394; Sun, 24 Mar 2024 23:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323824; bh=FsAsu3Rw+37tte4cZ220/4DO2pAOdj6r1oAecyz+6cA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BnEPUnxWpGMoHlEjuHXNchEqgDtqcJp9c6DBl2Gj9KD/LqmoA6zZ5AjIJ0WrmInQ/ z9Fc/7YK610BEhHVGueScvySyEzSv6MSY8smiig0Xs73UEMEFoht87T6eo2sIiKC8/ IrCjiBdyLwIWBjwR2ZKMUcvyLa1pBAhi4VWK82kR9utaM9HTY7Bif8dkMdEvKV3LAo fd3vkE9pA4ltjDQX7chnhteFxVNkwn+G/6StcvXWdkSgxxsZd1zAvGOzSDRgQ5/HX1 S1irvyr5lsQj5H1+/O/XbvKgZ4VNBrYsbvQ0YKcGGGWjq6qYxOrIRKme1kx+om2/E5 Ngla5p8Xgk0Kw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Howells , Markus Suvanto , Jeffrey E Altman , Marc Dionne , linux-afs@lists.infradead.org, Christian Brauner , Sasha Levin Subject: [PATCH 5.10 203/238] afs: Revert "afs: Hide silly-rename files from userspace" Date: Sun, 24 Mar 2024 19:39:51 -0400 Message-ID: <20240324234027.1354210-204-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: David Howells [ Upstream commit 0aec3847d044273733285dcff90afda89ad461d2 ] This reverts commit 57e9d49c54528c49b8bffe6d99d782ea051ea534. This undoes the hiding of .__afsXXXX silly-rename files. The problem with hiding them is that rm can't then manually delete them. This also reverts commit 5f7a07646655fb4108da527565dcdc80124b14c4 ("afs: Fix endless loop in directory parsing") as that's a bugfix for the above. Fixes: 57e9d49c5452 ("afs: Hide silly-rename files from userspace") Reported-by: Markus Suvanto Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008102.html Signed-off-by: David Howells Link: https://lore.kernel.org/r/3085695.1710328121@warthog.procyon.org.uk Reviewed-by: Jeffrey E Altman cc: Marc Dionne cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner Signed-off-by: Sasha Levin --- fs/afs/dir.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 88f0e719c6ac0..a59d6293a32b2 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -418,16 +418,6 @@ static int afs_dir_iterate_block(struct afs_vnode *dvnode, continue; } - /* Don't expose silly rename entries to userspace. */ - if (nlen > 6 && - dire->u.name[0] == '.' && - ctx->actor != afs_lookup_filldir && - ctx->actor != afs_lookup_one_filldir && - memcmp(dire->u.name, ".__afs", 6) == 0) { - ctx->pos = blkoff + next * sizeof(union afs_xdr_dirent); - continue; - } - /* found the next entry */ if (!dir_emit(ctx, dire->u.name, nlen, ntohl(dire->u.vnode), -- 2.43.0