All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.2 v3 0/3] ve: count repeated slashes in a permission path as one
@ 2026-12-01 13:02 Pavel Tikhomirov
  2026-12-01 13:02 ` [Devel] [PATCH hci-8.2 v3 1/3] ve/kernfs: " Pavel Tikhomirov
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Pavel Tikhomirov @ 2026-12-01 13:02 UTC (permalink / raw)
  To: Konstantin Khorenko; +Cc: devel, Sashiko

A ve.sysfs_permissions rule with an empty path component is applied to
the node before it, not to the one the path names:

  +-----------------------+-------------------+
  | rule                  | applied to        |
  +-----------------------+-------------------+
  | cpuN/cache/uevent rw  | cpuN/cache/uevent |
  | cpuN/cache//uevent rw | cpuN/cache        |
  +-----------------------+-------------------+

vzctl writes such rules for cpuN/cache, so in every Container this
directory is "rw" without "x" and nothing below it can be looked up.
A recent mongod 8.0 reads cpuN/cache/indexM/shared_cpu_list on start,
gets EACCES and aborts (vzt-criu-docker, react-express-mongodb).

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.

https://virtuozzo.atlassian.net/browse/VSTOR-158149

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
Changes in v3:
- patches 1, 2: say that the rule now applies to the actual path
- patch 2: use "bus//pci" as the example, "sys//kernel" fails with
  -ENOENT with or without the patch; refer to the loop kernfs_perms_set()
  had before patch 1 (Konstantin)
- patch 3: check an empty component inside the path in proc too, with
  "bus//pci/devices"; one-line test comment (Konstantin); skip if the
  file is granted by default; Reviewed-by dropped as the test changed
- Link to v2: http://lore.virtuozzo.com/20261201-ve-perms-skip-slashes-v2-0-235dbff55ffd@virtuozzo.com

Changes in v2:
- patch 2: fix the comment above the proc root check, only an empty or all-slash path ends there now (Sashiko)
- Link to v1: http://lore.virtuozzo.com/20261201-ve-perms-skip-slashes-v1-0-a444e8767c3e@virtuozzo.com

---
Pavel Tikhomirov (3):
      ve/kernfs: count repeated slashes in a permission path as one
      fs/proc, ve: count repeated slashes in a permission path as one
      selftests/ve: check repeated slashes in a permission path

 fs/kernfs/ve.c                             | 29 +++++------------------------
 fs/proc/ve.c                               |  5 +++--
 tools/testing/selftests/ve/ve_perms_test.c | 29 +++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 26 deletions(-)
---
base-commit: beda1840d22b7707e3f8e18f413afbfffef93d25
change-id: 20261201-ve-perms-skip-slashes-3b989857978a

Best regards,
--  
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-12-01 15:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 13:02 [Devel] [PATCH hci-8.2 v3 0/3] ve: count repeated slashes in a permission path as one Pavel Tikhomirov
2026-12-01 13:02 ` [Devel] [PATCH hci-8.2 v3 1/3] ve/kernfs: " Pavel Tikhomirov
2026-12-01 13:02 ` [Devel] [PATCH hci-8.2 v3 2/3] fs/proc, ve: " Pavel Tikhomirov
2026-12-01 13:02 ` [Devel] [PATCH hci-8.2 v3 3/3] selftests/ve: check repeated slashes in a permission path Pavel Tikhomirov
2026-12-01 13:06   ` no-reply
2026-12-01 13:26     ` Pavel Tikhomirov
2026-12-01 13:49   ` Vasileios Almpanis
2026-12-01 15:37 ` [Devel] [PATCH hci-8.2 v3 0/3] ve: count repeated slashes in a permission path as one Konstantin Khorenko
2026-12-01 15:38 ` Konstantin Khorenko

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.