[CRIU] [PATCH 3/3] sysctl: move sysctl calls to usernsd

Tycho Andersen tycho.andersen at canonical.com
Thu Aug 13 21:35:48 PDT 2015


On Thu, Aug 13, 2015 at 04:58:51PM -0600, Tycho Andersen wrote:
> Mostly for my own education in what is required to port something to be userns
> restorable, I ported the sysctl stuff. Two potential concerns with this patch:
> 
> 1. It does a lot more open("/proc/sys") calls, since we can't (easily) cache
>    the directory with the call structure. There aren't too many of these so I
>    thought it might be ok, but if not I can add a service FD for /proc/sys so
>    that we only open it once.
> 
> 2. Copying structures with pointers around is kind of gory. I did it ad-hoc
>    here, but it may be worth inventing some mechanisms to make it easier,
>    although I'm not sure what exactly that would look like.

Oof. Some further testing indicates that I screwed this gory pointer
math up in this patch. Attached is a v2 which should be better.

Tycho
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-sysctl-move-sysctl-calls-to-usernsd.patch
Type: text/x-diff
Size: 5803 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150813/c6d0495e/attachment.bin>


More information about the CRIU mailing list