[Devel] [PATCH VZ10 v4 0/9] Add per-VE failcount support

Vasileios Almpanis vasileios.almpanis at virtuozzo.com
Thu Jul 30 13:33:05 MSK 2026


LGTM
Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>

On 7/29/26 6:46 PM, Vladimir Riabchun wrote:
> This patchset introduces per-VE failcount support.
> We have several resources, that have per-VE limits,
> the users might want to know what limit hits make
> operations fail.
>
> - Patch 1 is cosmetic, nothing special.
> - Patch 2 is a bugfix, found when testing per-VE mount
>    limits (but now comes before these changes).
> - Patches 3-5 change mount number and limit processing,
>    unifying it with other resources. VE selftest is updated
>    in patch 4.
> - Patch 6 greatly reduces the amount of copy-pasted code
>    by introducing some useful macros.
> - Patch 7 adds per-VE failcount file.
> - Patch 8 adds new helpers to our VE selftests infra.
> - Patch 9 introduces new VE selftest, that checks mounts
>    accounting, limits and failcount updates.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-135520
>
> Changes since v3:
> - Fixed stupid type pseudouser -> pseudosuper in patch 3.
>    There was one place with the same typo, so it was
>    fixed as well.
> - Fixed UAF in alloc_vfsmnt when kernel fails after
>    allocating mnt. In such case ve_mount_put(mnt, ve)
>    was called after freing mnt.
>    Also, there was an issue that mnt ve fields were set
>    in the very end, so any failure inside if (mnt) block
>    resulted in ve_mount_put with unfilled mnt.
> - Added set_pseudosuper return value check in patch 9.
>
> Changes since v2:
> - Extract ve_ns_owner update to a separate commit.
> - Fix null dereference in ve_mount_put on error path,
>    rework is_pseudosuper handling.
> - Remove dead sysctl_ve_mount_nr from ve.h in patch 5.
> - Add static const to ve_failcounts in patch 7.
> - Cover VE_FC_ENTRY(aio) with ifdefs in patch 7.
> - Add new selftests helpers in patch 8.
> - Add new selftest in patch 9.
>
> Changes since v1:
> - Rebase to rh10-6.12.0-211.30.1.14.x.vz10-ovz
> - Fix issues in patch 3 by passing ve value to
>    ve_mount_put helper and removing is_pseudosuper
>    check.
>
> Vladimir Riabchun (9):
>    ve/ve.{h,c}: Farewell to spaces as indents
>    ve/namespace: Fix UAF in alloc_mnt_ns
>    ve/fs: Rework per-ve mount count
>    selftests/ve: Update ve_ns_owner_test
>    ve: Move from global VE mounts limit to per-VE limit
>    ve/ve.c: Generate VE resource accessors using macros
>    ve: Introduce per-VE failcount
>    selftests/ve: Add more helpers
>    selftests/ve: Add mount accounting selftest
>
>   fs/aio.c                                      |   1 +
>   fs/mount.h                                    |   1 +
>   fs/namespace.c                                |  88 +++--
>   include/linux/ve.h                            |  25 +-
>   kernel/bpf/syscall.c                          |   1 +
>   kernel/ve/ve.c                                | 278 +++++++-------
>   kernel/ve/veowner.c                           |  19 -
>   net/core/dev.c                                |   2 +
>   net/core/neighbour.c                          |   1 +
>   net/core/net_namespace.c                      |   4 +-
>   tools/testing/selftests/ve/.gitignore         |   1 +
>   tools/testing/selftests/ve/Makefile           |   1 +
>   .../selftests/ve/ve_mount_accounting_test.c   | 339 ++++++++++++++++++
>   tools/testing/selftests/ve/ve_ns_owner_test.c |  35 +-
>   tools/testing/selftests/ve/ve_selftest.h      |  79 +++-
>   15 files changed, 652 insertions(+), 223 deletions(-)
>   create mode 100644 tools/testing/selftests/ve/ve_mount_accounting_test.c
>
-- 
Best regards, Vasileios Almpanis
Software Developer, Virtuozzo.



More information about the Devel mailing list