[Devel] https://bugs.openvz.org/browse/OVZ-6834 CUDA in container

Andrey Ryabinin aryabinin at virtuozzo.com
Tue Dec 13 08:29:55 PST 2016



On 12/13/2016 05:57 PM, Andrey Ryabinin wrote:

> Access to proc directories is slightly different. We show directory in container iff it sticky bit is set.
> You can set sticky bit via chmod (it's forbidden for proc entries in OpenVZ kernel, I dunno why),
> but you can change the source like this:
> 
> diff --git a/fs/proc/root.c b/fs/proc/root.c
> index 88be7c2..2a0bd71 100644
> --- a/fs/proc/root.c
> +++ b/fs/proc/root.c
> @@ -185,7 +185,7 @@ void __init proc_root_init(void)
>  	proc_mkdir_mode("sysvipc", S_ISVTX | S_IRUGO | S_IXUGO, NULL);
>  #endif
>  	proc_mkdir_mode("fs", S_ISVTX | S_IRUGO | S_IXUGO, NULL);
> -	proc_mkdir("driver", NULL);
> +	proc_mkdir_mode("driver", S_ISVTX, NULL);

Err, of course this should be: proc_mkdir_mode("driver", S_ISVTX | S_IRUGO | S_IXUGO, NULL);


More information about the Devel mailing list