[Devel] [PATCH RHEL10 COMMIT] ve_namespace: Make CLONE_NEWVE work with clone3

Konstantin Khorenko khorenko at virtuozzo.com
Sat Dec 13 23:34:41 MSK 2025


The commit is pushed to "branch-rh10-6.12.0-55.13.1.3.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-55.13.1.2.24.vz10
------>
commit 0fe443c7fb11c540f2d187c96ca5dc06b4766607
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Wed Dec 10 18:34:33 2025 +0800

    ve_namespace: Make CLONE_NEWVE work with clone3
    
    As CLONE_NEWVE is shared with signal mask (CSIGNAL) (to make it work
    with setns() and unshare()) we should also exclude it from CSIGNAL check
    in clone3() arguments validation path.
    
    Fixes: 8a771a3d6bea ("ve: Introduce VE namespace")
    https://virtuozzo.atlassian.net/browse/VSTOR-118289
    Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
    
    Feature: ve: ve generic structures
---
 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 25644501c8237..350e467ee87c9 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -3065,7 +3065,7 @@ static bool clone3_args_valid(struct kernel_clone_args *kargs)
 	 * - make the CLONE_DETACHED bit reusable for clone3
 	 * - make the CSIGNAL bits reusable for clone3
 	 */
-	if (kargs->flags & (CLONE_DETACHED | (CSIGNAL & (~CLONE_NEWTIME))))
+	if (kargs->flags & (CLONE_DETACHED | (CSIGNAL & (~(CLONE_NEWTIME | CLONE_NEWVE)))))
 		return false;
 
 	if ((kargs->flags & (CLONE_SIGHAND | CLONE_CLEAR_SIGHAND)) ==


More information about the Devel mailing list