From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.2 0/3] ve: count repeated slashes in a permission path as one
Date: Tue, 01 Dec 2026 13:19:46 +0100 [thread overview]
Message-ID: <179612758696.11372.8117923750242552586.b4-review@b4> (raw)
In-Reply-To: <20261201-ve-perms-skip-slashes-v1-0-a444e8767c3e@virtuozzo.com>
I won't apply this version, please send v2 with the changes below.
The code of 1/3 and 2/3 is right; one comment, the messages and the
test change.
On Tue, 1 Dec 2026 12:43:28 +0100, Pavel Tikhomirov wrote:
> Patch 1 skips empty components in ve.sysfs_permissions, as a path
> lookup does, patch 2 does the same in ve.proc_permissions, patch 3 adds
> a selftest.
1. Patch 1 message: say what else changes. A leading slash ("/kernel
rx") used to set the sysfs root and now sets kernel. "dir//missing"
used to set dir and succeed; now it fails with -ENOENT, and the
rest of that write is dropped.
2. Patch 2: the comment "empty or leading-slash path walks to
nothing" is stale; only a path of slashes gets there now.
3. Patch 2 message: "sys//kernel" is not a working example: /proc/sys
has no proc_dir_entry children, so it fails with -ENOENT with or
without the patch. "the same way as kernfs_perms_set()" names the
loop patch 1 removes. The -ENOENT change of item 1 applies here
too.
4. Patch 3: the proc case "//interrupts" has only leading slashes, so
a walk that still stops at an inner empty component passes it. Put
an empty component inside the path. The test comment wants one
line.
The rule table in patch 1 and here: an ASCII box table, please.
Separate patches, not needed for this series. I created a task:
1. kernfs_walk_ns() does not check that the node it reached is a
directory. A path through a file ("kernel/vmcoreinfo/x") makes
kernfs_find_ns() read the file's attr.open as dir.children. Mainline
has the same code and reaches it from cgroup_get_from_path() (the
xt_cgroup path match), so it is for mainline first.
https://virtuozzo.atlassian.net/browse/VSTOR-158293
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
prev parent reply other threads:[~2026-12-01 12:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 11:43 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
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 ` Konstantin Khorenko [this message]
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=179612758696.11372.8117923750242552586.b4-review@b4 \
--to=khorenko@virtuozzo.com \
--cc=devel@openvz.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox