]> 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)
commitd801dc710833e2f1bfc5ebc1980cfad75a169d92
treea8ec94afaa37da897e283923d20d3bde16897d97
parent937bdc29cdaf6c7c4107ada335ee51f63562c4fc
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