]> git.baikalelectronics.ru Git - kernel.git/commit
binfmt_misc: add persistent opened binary handler for containers
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Thu, 18 Feb 2016 00:51:16 +0000 (16:51 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 30 Mar 2016 21:12:22 +0000 (14:12 -0700)
commit3b118e67bf39f293a93a8b1dfbcd412b3084bac6
treea8ec94afaa37da897e283923d20d3bde16897d97
parentd94ee2eebbc24b15e9257cac538ed542d4609e6f
binfmt_misc: add persistent opened binary handler for containers

This patch adds a new flag 'F' to the binfmt handlers.  If you pass in
'F' the binary that runs the emulation will be opened immediately and
in future, will be cloned from the open file.

The net effect is that the handler survives both changeroots and mount
namespace changes, making it easy to work with foreign architecture
containers without contaminating the container image with the
emulator.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
fs/binfmt_misc.c