Subject: Re: Emulation: selecting emulation root at runtime?
To: Eric Haszlakiewicz <erh@nimenees.com>
From: =?ISO-8859-1?Q?Joachim_K=F6nig?= <him@online.de>
List: current-users
Date: 08/27/2007 08:59:37
Eric Haszlakiewicz wrote:
> That wouldn't be that hard to do in a limited way, with a few hard coded
> paths.  You'd need an alternate linux_elf32_probe in compat/linux/common/
> (linux_exec_elf32.c), an additional struct emul in linux_exec.c, and
> add that emul structure to the list in exec_conf.c.
> 	Alternatly you could change emul_find_root in compat_util.c, but
> letting an arbitrary root be specified has some security implications,
> similar to LD_LIBRARY_PATH but worse.
>   
Then a flexible way with the same security implications as today would be:

- syscall to add/remove additional emulation roots for an emulation 
(root permission required)
- emul_find_root checks EMUL_ROOT_<EMULATION> (e.g. EMUL_ROOT_LINUX)
  against registered root path list  and selects corresponding struct emul.

Joachim