All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
	Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 2/3] fs/proc, ve: count repeated slashes in a permission path as one
Date: Tue, 1 Dec 2026 11:49:39 +0000	[thread overview]
Message-ID: <010701a231706562-e6c77aff-a781-4a05-8784-3854a4be2b3f-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261201-ve-perms-skip-slashes-v1-2-a444e8767c3e@virtuozzo.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] fs/proc, ve: stale comment in proc_perms_set() on leading-slash
  rejection
--

commit 40f4dae0564b0723083b940916132ada5d90897a
Author: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>

fs/proc, ve: count repeated slashes in a permission path as one

proc_perms_set() now skips empty path components instead of stopping at the first one. A rule such as "sys//kernel" therefore reaches sys/kernel, and a leading slash no longer ends the walk at the proc root.

> diff --git a/fs/proc/ve.c b/fs/proc/ve.c
> index d957510c353a8..e24cc8b5d3192 100644
> --- a/fs/proc/ve.c
> +++ b/fs/proc/ve.c
> @@ -143,8 +143,9 @@ static int proc_perms_set(char *path, struct ve_struct *ve, int mask)
>  		if (sep)
>  			*sep++ = 0;
>  
> +		/* Repeated slashes count as one, as in a path lookup */
>  		if (!*dname)
> -			break;
> +			continue;
>  
>  		nde = pde_subdir_find(de, dname, strlen(dname));
>  		if (!nde) {

[ ... ]

	/* empty or leading-slash path walks to nothing, reject it */
	if (de == &proc_root) {

[Severity: Low]
This isn't a bug, but is this comment now stale? With continue, a leading slash is skipped, so "/sys" resolves to sys. Only an empty or all-slash path leaves de at proc_root and reaches this -EINVAL. The comment also contradicts the new one added above. Could it say "empty or all-slash path walks to nothing, reject it"?

Carry the trailer below into the next revision and Sashiko will not review this patch again.

Reviewed-by: Sashiko <no-reply@sashiko.virtuozzo.com>

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261201-ve-perms-skip-slashes-v1-0-a444e8767c3e@virtuozzo.com?part=2

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-12-01 11:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 11:43 [Devel] [PATCH hci-8.2 0/3] " Pavel Tikhomirov
2026-12-01 11:43 ` [Devel] [PATCH hci-8.2 1/3] ve/kernfs: " Pavel Tikhomirov
2026-12-01 11:50   ` no-reply
2026-12-01 12:19   ` Konstantin Khorenko
2026-12-01 12:28     ` Pavel Tikhomirov
2026-12-01 11:43 ` [Devel] [PATCH hci-8.2 2/3] fs/proc, ve: " Pavel Tikhomirov
2026-12-01 11:49   ` no-reply [this message]
2026-12-01 12:19   ` Konstantin Khorenko
2026-12-01 11:43 ` [Devel] [PATCH hci-8.2 3/3] selftests/ve: check repeated slashes in a permission path Pavel Tikhomirov
2026-12-01 11:51   ` no-reply
2026-12-01 12:19   ` Konstantin Khorenko
2026-12-01 12:19 ` [Devel] [PATCH hci-8.2 0/3] ve: count repeated slashes in a permission path as one Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=010701a231706562-e6c77aff-a781-4a05-8784-3854a4be2b3f-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    --cc=ptikhomirov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.