[Devel] [VZ10 00/21] Fix !CONFIG_VE build

Vladimir Riabchun vladimir.riabchun at virtuozzo.com
Thu May 7 22:10:12 MSK 2026


There is a lot of CONFIG_VE logic, that is not covered by CONFIG_VE.
This is and attempt to make the kernel compile with minimal
useless code changes - thus it is not expected to boot now.

Some ve_struct fields were made unconditional, because the other
option is changing all the code that touches this field.

ve0 is absent and all ve objects are NULLs with !CONFIG_VE.
This is intentional - while it makes kernel less bootable (it will
probably never be), this is a movement away from having ve0 and
all the CONFIG_VE logic when this config is disabled.

Vladimir Riabchun (21):
  ve/net: Have net->owner_ve when !CONFIG_VE
  ve/vma: Fix NULL dereference when accessing ve->vdso_image_*
  ve: Fix obvious null dereferences when !CONFIG_VE
  ve: Fix ve.h when !CONFIG_VE
  x86/cpuid_fault: Make it compile with !CONFIG_VE
  ve/sched.h: Fix errors and warnings when !CONFIG_VE
  ve/module: Fix "no return statement" error
  ve: Fix usages of ve0
  ve/cgroup: Fix errors when !CONFIG_VE
  ve/vzstat.h: Move KSTAT_ALLOC_MAX_LAT_PERIOD outside CONFIG_VE
  ve/aio: Hide aio pid_entry under CONFIG_VE
  ve/kernfs: Fix when !CONFIG_VE
  ve: Fix compiler warning about CONFIG_VE usage
  ve/kthread: Remove ifdef CONFIG_VE
  ve/fs: Define ve_fsync_behavior only when CONFIG_VE
  ve/tty: Use vtty_alloc_tty_struct only when CONFIG_VE
  ve/connector: Hide cn_ss_hook under CONFIG_VE
  ve/fsopen: fscontext_finalize_lazy_opts has no return statement when
    !CONFIG_VE
  ve/binfmt_elf: Include ve.h only when CONFIG_VE
  vmalloc: Rename module parameter variable
  ve/sunrpc: Use kthread_create_on_node when !CONFIG_VE

 arch/x86/entry/vdso/vma.c     |  6 +--
 arch/x86/kernel/cpuid_fault.c | 63 +++++++++++++++++-----------
 arch/x86/kernel/process_64.c  |  4 +-
 drivers/connector/connector.c |  5 +++
 drivers/tty/tty_io.c          |  4 ++
 fs/aio.c                      |  7 ++++
 fs/binfmt_elf.c               |  4 ++
 fs/coredump.c                 |  2 +
 fs/file.c                     |  1 +
 fs/fsopen.c                   |  3 +-
 fs/kernfs/dir.c               |  3 +-
 fs/kernfs/kernfs-internal.h   |  2 -
 fs/kernfs/kernfs-ve.h         | 11 ++---
 fs/nfs/fs_context.c           |  2 +-
 fs/nfsd/nfs4recover.c         |  4 ++
 fs/nfsd/nfsctl.c              |  2 +-
 fs/proc/base.c                |  2 +-
 fs/super.c                    |  4 ++
 fs/sync.c                     |  2 +
 fs/sysctls.c                  |  2 +
 include/linux/cgroup.h        |  2 +-
 include/linux/sched.h         | 32 ++++++++++-----
 include/linux/sysctl.h        |  3 +-
 include/linux/umh.h           |  4 +-
 include/linux/ve.h            | 77 ++++++++++++++++++++++++++++++++++-
 include/linux/vzstat.h        |  4 +-
 include/net/net_namespace.h   |  2 -
 kernel/capability.c           |  2 +-
 kernel/cgroup/cgroup-v1.c     |  8 ++--
 kernel/cgroup/cgroup.c        | 15 +++++--
 kernel/kthread.c              |  4 +-
 kernel/module/sysfs.c         |  5 ++-
 kernel/sysctl.c               |  4 ++
 lib/test_vmalloc.c            | 12 +++---
 net/core/net_namespace.c      |  4 +-
 net/ipv6/ip6_tunnel.c         |  2 +-
 net/sunrpc/rpc_pipe.c         |  2 +-
 net/sunrpc/svc.c              |  6 +++
 38 files changed, 239 insertions(+), 82 deletions(-)

-- 
2.43.0




More information about the Devel mailing list