Commit graph

17712 commits

Author SHA1 Message Date
Sudheer Shanka
39caee7ebc Temporary rule to allow zygote to access vfat.
am: ccec725ff9

Change-Id: Iee7fbc54e4a893b4673fd50520d96b0f739e8b4d
2019-02-05 09:31:29 -08:00
Sudheer Shanka
ccec725ff9 Temporary rule to allow zygote to access vfat.
Extension to change Id633337095c0a3b69d9b8652bcc3327810339cf3
to deal with secondary storage devices.

Bug: 123533205
Test: manual
Change-Id: I24e1550af9589be9b238fba83837bf684aa02e3f
2019-02-04 16:38:41 -08:00
David Anderson
f6da592680 Merge "Allow mkfs on device-mapper devices."
am: 18f8033e55

Change-Id: I4cef7aa08b03a49759b9b761ea816650816d5ae6
2019-02-04 15:43:13 -08:00
David Anderson
18f8033e55 Merge "Allow mkfs on device-mapper devices." 2019-02-04 23:32:21 +00:00
Joel Galenson
0c070ea521 Merge "Hide denials seen during bugreports."
am: ba61fad478

Change-Id: I2c68317fac0e419638501a74ff3fce6ca6df3f1b
2019-02-04 14:44:54 -08:00
Treehugger Robot
ba61fad478 Merge "Hide denials seen during bugreports." 2019-02-04 22:32:18 +00:00
Tri Vo
3cc864369f Merge "Restore P BOARD_PLAT_*_SEPOLICY_DIR behavior"
am: f15746f284

Change-Id: I5ba585f656e4fec21143c6dc9ecce71fe6b01881
2019-02-04 13:59:38 -08:00
Tri Vo
f15746f284 Merge "Restore P BOARD_PLAT_*_SEPOLICY_DIR behavior" 2019-02-04 21:45:44 +00:00
Joel Galenson
06e63d2aff Hide denials seen during bugreports.
While taking bugreports we sometimes see dumpstate try to find
hwservices.  These are mostly neverallowed by macros, so hide them.

Bug: 116711254
Bug: 123540375
Test: Build.
Change-Id: Ic73a354bdae3d124eccc9477b7862bcad66fa076
2019-02-04 09:04:05 -08:00
Roland Levillain
67947e6fb4 Merge "Allow otapreopt to use bind-mounted Bionic artifacts from the Runtime APEX."
am: 5c8f9398d9

Change-Id: Ibce852637c2f8836c6e6183d072eedd5dac989fe
2019-02-04 05:48:03 -08:00
Roland Levillain
5c8f9398d9 Merge "Allow otapreopt to use bind-mounted Bionic artifacts from the Runtime APEX." 2019-02-04 13:40:17 +00:00
Suren Baghdasaryan
aa1a6a5056 sepolicy changes to configure cgroup.rc and task_profiles.json access
am: 561ce801b0

Change-Id: I3f08ab994c20b8722e649bf1dcea72879a514dd2
2019-02-03 20:19:58 -08:00
Suren Baghdasaryan
561ce801b0 sepolicy changes to configure cgroup.rc and task_profiles.json access
cgroups.json file contains cgroup information required to mount
cgroup controllers and is readable only by init process.
cgroup.rc contains cgroup map information consisting of the list of
cgroups available in the system and their mounting locations. It is
created by init process and should be readable by any processes that
uses cgroups and should be writable only by init process.
task_profiles.json file contains task profiles used to operate on
cgroups. This information should be readable by any process that uses
cgroups and should be writable only by init process.

Bug: 111307099
Test: builds, boots

Change-Id: Ib2c87c0fc3663c7fc69628f05c846519b65948b5
Merged-In: Ib2c87c0fc3663c7fc69628f05c846519b65948b5
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 16:56:08 +00:00
Mathieu Chartier
475b3ed674 Merge "Add device_config_runtime_native_boot_prop"
am: 75b4c083fc

Change-Id: I58638c7bb52596a919f9bdd676559c50aded600f
2019-02-01 18:12:47 -08:00
Mathieu Chartier
75b4c083fc Merge "Add device_config_runtime_native_boot_prop" 2019-02-02 02:06:11 +00:00
Mathieu Chartier
0327d10599 Add device_config_runtime_native_boot_prop
Some runtime properties require reboots and should be in the
native_boot namespace instead of native.

Bug: 120794191
Bug: 123524494
Test: set a property and ensure it can be read in AndroidRuntime.cpp
Change-Id: I1d1e984dcba26dd04d34a7d30fc63e1b75a8a311
2019-02-01 13:46:34 -08:00
Tri Vo
8bd3ef9fe5 Merge "apexd: permission to traverse /sys directory tree."
am: 128724e6d4

Change-Id: I24c6f1809c3a698a7d9b692fe910e21ffc85dc9c
2019-02-01 13:32:30 -08:00
Treehugger Robot
128724e6d4 Merge "apexd: permission to traverse /sys directory tree." 2019-02-01 21:23:25 +00:00
Dongwon Kang
034c811b6d Merge "SEPolicy updates for adding native flag namespace(media)."
am: a0bea70f10

Change-Id: I8c7cc3323516d3f258ef613b407bc8946045d65c
2019-02-01 12:24:56 -08:00
Mathieu Chartier
e984133193 Merge "Add runtime_native property permission to installd"
am: fd0bc70df7

Change-Id: Ic472354b3e33eee3df92c4ab7587a2a28d303355
2019-02-01 12:23:14 -08:00
Dongwon Kang
a0bea70f10 Merge "SEPolicy updates for adding native flag namespace(media)." 2019-02-01 19:50:13 +00:00
Tri Vo
9918f28981 Restore P BOARD_PLAT_*_SEPOLICY_DIR behavior
BOARD_PLAT_*_SEPOLICY_DIR extends system sepolicy.

PRODUCT_PUBLIC_SEPOLICY_DIRS and PRODUCT_PRIVATE_SEPOLICY_DIRS now
specify locations of public and private product sepolicy respectively.

Bug: 119305624
Test: m selinux_policy
Change-Id: I48d491f0dd22020d96ff0243142153871d2d6b2b
2019-02-01 11:41:11 -08:00
Mathieu Chartier
fd0bc70df7 Merge "Add runtime_native property permission to installd" 2019-02-01 18:57:30 +00:00
Tri Vo
74a5b50e0b apexd: permission to traverse /sys directory tree.
Different devices can have /sys/* labeled differently. This allows
apexd, to traverse /sys directory tree agnostic of device-specific
labeling.

Bug: 122876102
Test: m selinux_policy
Change-Id: I08f2eb2242913e3a7d532d36a452cf111fd4e4c4
2019-02-01 10:17:52 -08:00
Mathieu Chartier
26a5699773 Add runtime_native property permission to installd
Installd will read one of these properties as a feature flag.

(cherry-picked from commit e59e731dd1)

Bug: 116059983
Bug: 123524494
Test: adb shell /data/nativetest64/installd_dexopt_test/installd_dexopt_test

Change-Id: I6c5c058ba316b98f58d8d08f7cb13828cf311833
Merged-In: I6c5c058ba316b98f58d8d08f7cb13828cf311833
2019-02-01 16:54:49 +00:00
Xiaoyong Zhou
baf1d67602 Merge "add selinux rules for mini-keyctl"
am: 3581f45667

Change-Id: I8406c0010b1c76b2fd0ebc0577d2cc78e1e217f5
2019-01-31 20:43:20 -08:00
Treehugger Robot
3581f45667 Merge "add selinux rules for mini-keyctl" 2019-02-01 04:35:47 +00:00
Jeff Sharkey
1df04c3716 Temporarily relax Zygote storage mounting rules.
am: 9f02b30a72

Change-Id: Id93156bcb3e8149b5c9edf29e60c0298a5d48c55
2019-01-31 20:06:32 -08:00
Jeff Sharkey
9f02b30a72 Temporarily relax Zygote storage mounting rules.
In the kernel, sdcardfs wraps the contents of /data/media, which has
the label "media_rw_data_file".  As part of this wrapping, it should
change the label to be "sdcardfs", but we've seen evidence that this
isn't always happening.

To temporarily unblock dogfooding while we continue investigating,
relax rules to allow Zygote to mount from either "sdcardfs" or
"media_rw_data_file", which as described above, are equivalant.

Bug: 123533205
Test: manual
Change-Id: Id633337095c0a3b69d9b8652bcc3327810339cf3
2019-01-31 17:21:30 -07:00
Xiaoyong Zhou
2ebc63bef4 add selinux rules for mini-keyctl
mini-keyctl is a binary used to load channel keys to .fsverity keyring.
This CL creates a new domain for mini-keyctl and a type for /proc/keys
and adds allow rules needed by this binary.

Bug: 112038861
Test: manual
Merged-In: I3b744d302859a02dfe63c81c7f33bb30912d7994
Change-Id: I3b744d302859a02dfe63c81c7f33bb30912d7994
2019-01-31 15:12:11 -08:00
Peter Kalauskas
66e92002e0 Merge "Allow lazy wifi HAL to run"
am: 2613456a36

Change-Id: I0230096583924bb60dac16f3275d8ce6fcf39e48
2019-01-31 14:20:07 -08:00
Peter Kalauskas
2613456a36 Merge "Allow lazy wifi HAL to run" 2019-01-31 22:05:47 +00:00
Roland Levillain
446b2fedce Allow otapreopt to use bind-mounted Bionic artifacts from the Runtime APEX.
Allow `otapreopt_chroot` to:
- bind-mount Bionic artifacts from the Runtime APEX
  (`/postinstall/apex/com.android.runtime`) into `/postinstall/bionic/`;
- read the `/postinstall/system/bin/linker(64)` symlink to
  `/postinstall/bionic/bin/linker(64)` when executing
  `/postinstall/system/bin/otapreopt`.

Allow `otapreopt` (running as `postinstall_dexopt`) to:
- read directories under `/postinstall`.

Test: m otapreopt_chroot
Test: A/B OTA update test (asit/dexoptota/self_full).
Bug: 113373927
Bug: 120266448
Change-Id: I6de9df12d5fd84f1dd92798efed5f2d8b72d3ebe
2019-01-31 19:09:08 +00:00
Jeff Vander Stoep
9ec16c1c34 Merge "Remove unused *_tmpfs types"
am: 586c2cdfdf

Change-Id: I575c948a9143a3d3926ef4bb8b758eab6c928c32
2019-01-31 11:08:34 -08:00
Treehugger Robot
586c2cdfdf Merge "Remove unused *_tmpfs types" 2019-01-31 18:59:43 +00:00
Cheney Ni
3a02820b99 Merge "Add Bluetooth Audio HAL interface V2 as hal_audio_hwservice"
am: eced7cb78d

Change-Id: I61e1949964df49f68a2a053309606d11a69770f1
2019-01-31 10:29:28 -08:00
Treehugger Robot
eced7cb78d Merge "Add Bluetooth Audio HAL interface V2 as hal_audio_hwservice" 2019-01-31 18:17:07 +00:00
Dongwon Kang
523c746859 SEPolicy updates for adding native flag namespace(media).
Test: add sepolicy, build, check GetServerConfigurableFlag function
Bug: 123658514
Change-Id: I798b0ef901068c53070e768305acd38118a7e886
2019-01-31 10:06:32 -08:00
Nick Kralevich
81ce74ac25 Merge "Allow permissions needed for gdb debugging"
am: ecf787e85f

Change-Id: I85fd2e717fe087cf08262b0d4b4866052c8eb48c
2019-01-30 22:11:14 -08:00
Treehugger Robot
ecf787e85f Merge "Allow permissions needed for gdb debugging" 2019-01-31 05:58:55 +00:00
Jiyong Park
46298e157f Allow init to mount on /bionic in recovery mode
am: cd6a6a0933

Change-Id: I8ab4fbf121144b5e88e92683543e517888ecb6ef
2019-01-30 21:00:42 -08:00
Jiyong Park
cee3eecccd init can call setns
am: 9d9333ac86

Change-Id: I7055d04b08f81b08a0bfe5b371723204c459f698
2019-01-30 21:00:29 -08:00
Jiyong Park
b546607a27 Label the bootstrap linker and bionic mount points
am: 4b3f2c6245

Change-Id: Ia90d5b6960272124e6a19ddb5c0923ecce105073
2019-01-30 21:00:17 -08:00
Jiyong Park
cd6a6a0933 Allow init to mount on /bionic in recovery mode
The mount points under /bionic are rootfs in recovery mode. Init should
be able to bind-mount the bootstrap Bionic to the mount points.

Bug: 120266448
Test: adb reboot recovery; phone enters into the recovery mode
Change-Id: I57aed268eac08a5fb3609750bf10cd8d6e97347a
2019-01-31 13:44:21 +09:00
Jiyong Park
9d9333ac86 init can call setns
init now creates two mount namespaces one for pre-apexd processes and
the other for post-apexd processes. This is to mount different files to
the same mount point at /bionic. For pre-apexd processes, the bootstrap
Bionic is mounted. For post-apexd processes, the default Bionic (from
the runtime APEX) is mounted.

Using unshare and setns, init first starts with the mount namespace for
the pre-apexd and then switches to the other mount namespace when APEXes
are ready. It then occasionally switches to pre-apexd mount namespace
when it has to re-launch a pre-apexd process (e.g. the process has
crashed, etc.)

In doing so, read access to /proc/self/ns/mnt is granted to init as
well.

Bug: 120266448
Bug: 122717176
Test: m device boots
Change-Id: Idbf15cbf5cc36b9993d718d4d887cd8f23a94666
2019-01-31 13:44:21 +09:00
Jiyong Park
4b3f2c6245 Label the bootstrap linker and bionic mount points
Bootstap linker has been moved from /system/bin/linker[64] to
/system/bin/bootstrap/linker[64]. Reflect the change in file_contexts.
Existing paths are not removed since the bootstrap linker (or the
linker from the rumtime APEX) will be bind-mounted to the old path by
init.

Also label the files under /bionic which serve as mount points for
either of the bootstrap bionic or the bionic from the runtime APEX.

In addition, read access for the symlinks in /system/lib/*.so and
/system/bin/linker is granted. This is because Bionic files in the paths
are now symlinks to the corresponding mountpoints at /bionic.

Bug: 120266448
Test: device boots to the UI

Change-Id: Iea4d76eb46754b435b6c5428481cd177da8d2ee1
2019-01-31 13:44:21 +09:00
Felka Chang
61ceae5c08 Merge "add create link permission for platform_app"
am: 48234250f5

Change-Id: If5d6f6b88d0c55bf6c3f704e69d9260792ff4bf0
2019-01-30 19:06:03 -08:00
Felka Chang
48234250f5 Merge "add create link permission for platform_app" 2019-01-31 02:38:09 +00:00
Hung-ying Tyan
4633c2fdc0 Sepolicy for dynamic_android_service
am: e4350c1a64

Change-Id: Ie2590b9926d96a004573f1615ea069a28d75bae5
2019-01-30 18:09:35 -08:00
Hung-ying Tyan
e4350c1a64 Sepolicy for dynamic_android_service
Dynamic_android service is a proxy running in SystemServer to the
gsi_service daemon. It provides a set of SystemApi's to manage
installation of a new system image to the device while keeping the
original system image intact.

Bug: 122929007
Test: manual; see dynamic_android service start in logcat
Change-Id: Idb9b0475677dad13b7864ca0cf6041dcab04b4e3
2019-01-31 01:30:36 +00:00