diff options
author | Sanjana Sunil <sanjanasunil@google.com> | 2022-03-28 19:05:36 +0000 |
---|---|---|
committer | Sanjana Sunil <sanjanasunil@google.com> | 2022-09-15 11:11:11 +0000 |
commit | da291cf362bdfb5ebe985036324128e4b714a58a (patch) | |
tree | fc529ccd76a7405c7226a290bbbd7f00dba478ac | |
parent | 1ae6338dfaa77f6aae7fd77f77270537219f3ff7 (diff) | |
download | core-da291cf362bdfb5ebe985036324128e4b714a58a.tar.gz |
Create misc_ce and misc_de mirror storage
Create a mirror directory for misc_ce and misc_de storage by bind
mounting the respective directories. This is done for the defaul null
volume only, and other volumes are handled at a later staged.
When an SDK sandbox process is spawned and data isolation needs to
occur, the sdksandbox directories present in the misc directories will
be used to bind mount from, after tmpfs is mounted on the original.
Bug: 214241165
Test: atest GtsSdkSandboxInprocessTests
Ignore-AOSP-First: Will cherry pick based on other CLs in the topic
Change-Id: Icb1dc7d7fbd53a5c3853acf2f9d4d75b278d7295
Merged-In: Icb1dc7d7fbd53a5c3853acf2f9d4d75b278d7295
-rw-r--r-- | rootdir/init.rc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc index cd71aa8aa..d897c3be3 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -918,20 +918,26 @@ on post-fs-data mkdir /data/user/0 0700 system system encryption=None mount none /data/data /data/user/0 bind rec - # A tmpfs directory, which will contain all apps CE DE data directory that - # bind mount from the original source. + # A tmpfs directory, which will contain all apps and sdk sandbox CE and DE + # data directory that bind mount from the original source. mount tmpfs tmpfs /data_mirror nodev noexec nosuid mode=0700,uid=0,gid=1000 restorecon /data_mirror mkdir /data_mirror/data_ce 0700 root root mkdir /data_mirror/data_de 0700 root root + mkdir /data_mirror/misc_ce 0700 root root + mkdir /data_mirror/misc_de 0700 root root # Create CE and DE data directory for default volume mkdir /data_mirror/data_ce/null 0700 root root mkdir /data_mirror/data_de/null 0700 root root + mkdir /data_mirror/misc_ce/null 0700 root root + mkdir /data_mirror/misc_de/null 0700 root root # Bind mount CE and DE data directory to mirror's default volume directory mount none /data/user /data_mirror/data_ce/null bind rec mount none /data/user_de /data_mirror/data_de/null bind rec + mount none /data/misc_ce /data_mirror/misc_ce/null bind rec + mount none /data/misc_de /data_mirror/misc_de/null bind rec # Create mirror directory for jit profiles mkdir /data_mirror/cur_profiles 0700 root root |