linux-user: add support of binfmt_misc 'O' flag
authorLaurent Vivier <laurent@vivier.eu>
Thu, 29 Aug 2013 23:46:44 +0000 (01:46 +0200)
committerRiku Voipio <riku.voipio@linaro.org>
Tue, 24 Sep 2013 07:47:07 +0000 (10:47 +0300)
commit03cfd8faa7ffb7201e2949b99c2f35b1fef7078b
treef6eebab9322436e4bfd6e27de22a4217bcd557df
parent0d78b3b5b1b5c391aa96b481be106de023810b66
linux-user: add support of binfmt_misc 'O' flag

The binfmt_misc module can calculate the credentials and security
token according to the binary instead of to the interpreter if the
'C' flag is enabled.

To be able to execute non-readable binaries, this flag implies 'O'
flag. When 'O' flag is enabled, bintfmt_misc opens the file for
reading and pass the file descriptor to the interpreter.

References:
linux/Documentation/binfmt_misc.txt          ['O' and 'C' description]
linux/fs/binfmt_misc.c linux/fs/binfmt_elf.c [ AT_EXECFD usage ]

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/linuxload.c
linux-user/main.c
linux-user/qemu.h