Skip to contentSkip to conversation

afs: Revert "afs: Hide silly-rename files from userspace"

PATCH Applied David Howells 4 participants 7 messages Mar 13, 2024 – Mar 14, 2024

Subsystems (2)
lore
Share & tools
lore

David Howells

author maintainer
#0 lore raw

PATCH 1/1 afs: Revert "afs: Hide silly-rename files from userspace"

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.

---
 fs/afs/dir.c |   10 ----------
 1 file changed, 10 deletions(-)
fs/afs/dir.c +0 -10
index 8a67fc427e74..67afe68972d5 100644
@@ -474,16 +474,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),
#1 lore raw
Quoted 6 lines · David Howells

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.

Quoted 6 lines

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")

Not Found

The requested URL was not found on this server.

Quoted 30 lines
---
 fs/afs/dir.c |   10 ----------
 1 file changed, 10 deletions(-)
fs/afs/dir.c +0 -10
index 8a67fc427e74..67afe68972d5 100644
@@ -474,16 +474,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),
Signature · 1 line
#Randy
#2 lore raw
Quoted 10 lines · Randy Dunlap
Quoted 9 lines · David Howells

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.

Quoted 6 lines
Quoted 3 lines
Fixes 57e9d49c5452 ("afs: Hide silly-rename files from userspace")

Not Found

The requested URL was not found on this server.

The dot before the "html" extension is missing.

maintainer Applied
#5 lore raw
In reply to David Howells
Quoted 10 lines · David Howells

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.

[...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] afs: Revert "afs: Hide silly-rename files from userspace"

      https://git.kernel.org/vfs/vfs/c/c38cecdf5360
Reviewed-by on v1 1/1
#6 lore raw
In reply to David Howells
Quoted 30 lines · David Howells

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.

---
  fs/afs/dir.c |   10 ----------
  1 file changed, 10 deletions(-)
fs/afs/dir.c +0 -3
index 8a67fc427e74..67afe68972d5 100644
@@ -474,16 +474,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] == '.' &&

fs/afs/dir.c static int afs_dir_iterate_block(struct afs_vnode *dvnode, · line 479

Quoted 10 lines
fs/afs/dir.c +0 -7
-		    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),
#4 lore raw
In reply to David Howells
Quoted 10 lines · David Howells
Quoted 5 lines · Randy Dunlap
Quoted 1 line

Not Found

The requested URL was not found on this server.

Erm. Not sure how you came by that. You lost a dot somehow. It's in the original submission:

Nor am I. Guess I'll blame it on thunderbird.

Quoted 1 line

https://lore.kernel.org/linux-fsdevel/[email protected]/

Yep. Thanks.

Signature · 1 line
#Randy