[Devel] [PATCH RH9 02/12] Kconfig.openvz: force CGROUP_PERF if compiling VZ Containers code

Kirill Tkhai ktkhai at virtuozzo.com
Thu Oct 7 13:20:06 MSK 2021


From: Konstantin Khorenko <khorenko at virtuozzo.com>

The perf_event_open() syscall is available from Containers.  The
CONFIG_CGROUP_PERF option is set in current OpenVZ kernel configs, but let's
force-enable it if CONFIG_VE is enabled to prevent possible non-secure kernel
config if someone rebuilds the kernel with own config.

https://jira.sw.ru/browse/PSBM-51360

Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>

(cherry picked from vz7 commit a35598ba04acf80424fd8f997686a2edd3c3dcb8)
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 kernel/Kconfig.openvz |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/Kconfig.openvz b/kernel/Kconfig.openvz
index 9489342596ab..6ea4f707df61 100644
--- a/kernel/Kconfig.openvz
+++ b/kernel/Kconfig.openvz
@@ -19,6 +19,7 @@ config VE
 	select CGROUPS
 	select CGROUP_DEVICE
 	select CGROUP_FREEZER
+	select CGROUP_PERF
 	help
 	  This option adds support of virtual Linux running on the original box
 	  with fully supported virtual network driver, tty subsystem and




More information about the Devel mailing list