minijail: Add ability to specify mounts

In addition to bind mounts, allow other mounts to be specified when
running minijail.  Expose this as a -k option to minijail0.

This will allow for file systems such as proc, sysfs, and devpts to be
mounted before taking away the permisison to mount from the target

For example "-k sysfs,/sys,sysfs,0xe" will mount /sys in the new vfs

TEST=Mount sysfs, run a shell, check that sysfs is mounted.

Change-Id: I9862e42e00ce76b1fab9cbac59c381f5270470ce
Signed-off-by: Dylan Reid <>
3 files changed