Skip to content
Commit 2c65748f authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov
Browse files

shmem: rework getting file descriptors for shared memory regions (v2)



/proc/PID/map_files are protected by the global CAP_SYS_ADMIN, so we
need to avoid using them to support user namespaces.

We are going to use memfd_create() to get the first file descriptor and
then all others processes will able to open it via /proc/PID/fd/X.

This patch reworks slave processes to not use map_files.

v2: add more comments
Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent de71c480
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment