Commit graph

33499 commits

Author SHA1 Message Date
Alan Stokes
ca83dcce15 Merge "Add type and mapping for /metadata/sepolicy" 2021-11-17 14:11:14 +00:00
Jeff Vander Stoep
5aa5e5e845 Add type and mapping for /metadata/sepolicy
Test: make -j; launch_cvd; adb shell ls -laZ /metadata
Bug: 199914227
Change-Id: I573af0949d92f401589238dab8c3e9fbe2ee7efe
2021-11-17 10:45:24 +00:00
Yifan Hong
d6b2901748 Add recovery service_contexts files.
This allows binder services to run in recovery.

Test: build them
Bug: 170338625
Change-Id: If8580c3fc1b3add87178365c58288126e61345b4
2021-11-16 20:54:17 -08:00
Yifan Hong
31fdcc8369 servicemanager: recovery write to kmsg.
Test: recovery mode
Bug: 170338625
Change-Id: Ic3883fda1a0b1d8d0965b3997d19f2fad4667c14
2021-11-16 20:54:17 -08:00
Daniel Norman
2f8ce0d9c1 Revert "Revert "Adds a new prop context for choosing between mul..."
Revert "Revert "Adds multi_install_skip_symbol_files field (defa..."

Revert submission 1893459-revert-1869814-vapex-multi-config-VKODFOVCWY

Reason for revert: Fix-forward in https://r.android.com/1894088
Reverted Changes:
I087bfe0dc:Revert "Adds a new prop context for choosing betwe...
I27a498506:Revert "Load persist props before starting apexd."...
Ib5344edc0:Revert "Allow users to choose between multi-instal...
If09bf590e:Revert "Adds multi_install_skip_symbol_files field...
I905dac14c:Revert "Demonstrate multi-installed APEXes."

Change-Id: I03fb124d4e7044f236539a132816fd96cb814775
2021-11-16 20:28:29 +00:00
Ashwini Oruganti
41843731cc Define and add the migrate_any_key permission to system_server
This change adds a permission migrate_any_key that will help the system
server in migrating keys for an app that wants to leave a sharedUserId.

Bug: 179284822
Test: compiles
Change-Id: I2f35a1335092e69f5b3e346e2e27284e1ec595ec
2021-11-16 10:18:19 -08:00
Treehugger Robot
1b4714c8e8 Merge "Add camera.disable_preview_scheduler property" am: a594876cfe
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1887227

Change-Id: I39095a581c61d24ba8b462f7ca70cabd9df4f67c
2021-11-16 15:30:41 +00:00
Treehugger Robot
a594876cfe Merge "Add camera.disable_preview_scheduler property" 2021-11-16 15:16:25 +00:00
Alan Stokes
9112c9aa6d Allow system server to access composd.
Also allow composd to kill odrefresh (it execs it); this is necessary
for cancel() to work.

Bug: 199147668
Test: manual
Change-Id: I233cac50240130da2f4e99f452697c1162c10c40
2021-11-16 09:29:58 +00:00
Owen Kim
a6bd8d83f0 Merge "Revert "Adds a new prop context for choosing between multi-insta..."" am: 95d7aaa339
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1893458

Change-Id: Ibd4d1225cd655151657d3f2511636637415e35b8
2021-11-16 08:55:12 +00:00
Owen Kim
95d7aaa339 Merge "Revert "Adds a new prop context for choosing between multi-insta..."" 2021-11-16 08:39:27 +00:00
Owen Kim
780cd02d52 Revert "Adds a new prop context for choosing between multi-insta..."
Revert "Adds multi_install_skip_symbol_files field (default fals..."

Revert submission 1869814-vapex-multi-config

Bug: 206551398
Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I55600009996329947&testResultId=TR93527797572038984, bug b/206551398
Reverted Changes:
I0cd9d748d:Adds multi_install_skip_symbol_files field (defaul...
I5912a18e3:Demonstrate multi-installed APEXes.
I0e6881e3a:Load persist props before starting apexd.
I932442ade:Adds a new prop context for choosing between multi...
I754ecc3f7:Allow users to choose between multi-installed vend...

Change-Id: I087bfe0dcf8d6ab38d861b82196bac4e9147e8e6
2021-11-16 07:08:15 +00:00
Daniel Norman
d6746bd67a Merge "Adds a new prop context for choosing between multi-installed APEXes." am: 8e276eae6b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1869814

Change-Id: Idb0cbbe30faec914e9d894564733d50e213f77e0
2021-11-16 00:56:56 +00:00
Daniel Norman
8e276eae6b Merge "Adds a new prop context for choosing between multi-installed APEXes." 2021-11-16 00:45:32 +00:00
Jiyong Park
e646809295 Merge "Fix bootchart on android12" am: 5d0397047d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1888457

Change-Id: Id956b60571e60f3ae89548176c26c38ff0ef7b02
2021-11-15 07:17:37 +00:00
Jiyong Park
5d0397047d Merge "Fix bootchart on android12" 2021-11-15 07:04:06 +00:00
Treehugger Robot
2b9f0a62cb Merge "Add file_contexts for sepolicy mainline module" am: 8797f5841c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1890636

Change-Id: I4d26ed69653efb0e116b2fc2d985484821835f57
2021-11-12 15:39:43 +00:00
Treehugger Robot
8797f5841c Merge "Add file_contexts for sepolicy mainline module" 2021-11-12 15:21:29 +00:00
Jeff Vander Stoep
07246483ad Add file_contexts for sepolicy mainline module
Test: m com.android.sepolicy
Bug: 202394777
Change-Id: I6d11c693463206632237de1c4042845153fd6415
2021-11-12 14:55:54 +01:00
Yi-Yo Chiang
7cd1adeff5 Merge "Treblelize bug_map: split bug_map to multiple partitions" am: 9fcecef0a8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1884354

Change-Id: I5e98e080b2f6259929cbdacff3a47523bf7b2d23
2021-11-12 07:08:37 +00:00
Yi-Yo Chiang
9fcecef0a8 Merge "Treblelize bug_map: split bug_map to multiple partitions" 2021-11-12 06:53:27 +00:00
Daniel Norman
6b0049dcf0 Adds a new prop context for choosing between multi-installed APEXes.
Bug: 199290365
Test: see https://r.android.com/1872018
Change-Id: I932442adefc7ad10d7cd81e61e95efd41f8cf379
2021-11-11 19:11:11 +00:00
Maciej Żenczykowski
127f77ff8c introduce new 'proc_bpf' for bpf related sysctls am: 3702f3385e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1888379

Change-Id: I18137837817e777bbd4e31b9782e980ad9a851a9
2021-11-11 12:32:51 +00:00
Maciej Żenczykowski
3702f3385e introduce new 'proc_bpf' for bpf related sysctls
What to tag chosen based on output of:
  find /proc 2>/dev/null | egrep bpf
on a 5.10 kernel.

Tagged with prefixes to be more likely not require changes in the future

  $ adb root
  $ adb shell 'ls -lZ /proc/sys/net/core/bpf_* /proc/sys/kernel/*bpf*'

Before:
  -rw-r--r-- 1 root root u:object_r:proc:s0      0 2021-11-11 02:11 /proc/sys/kernel/bpf_stats_enabled
  -rw-r--r-- 1 root root u:object_r:proc:s0      0 2021-11-11 02:11 /proc/sys/kernel/unprivileged_bpf_disabled
  -rw-r--r-- 1 root root u:object_r:proc_net:s0  0 2021-11-11 02:11 /proc/sys/net/core/bpf_jit_enable
  -rw------- 1 root root u:object_r:proc_net:s0  0 2021-11-11 02:11 /proc/sys/net/core/bpf_jit_harden
  -rw------- 1 root root u:object_r:proc_net:s0  0 2021-11-11 02:11 /proc/sys/net/core/bpf_jit_kallsyms
  -rw------- 1 root root u:object_r:proc_net:s0  0 2021-11-11 02:11 /proc/sys/net/core/bpf_jit_limit

After:
  -rw-r--r-- 1 root root u:object_r:proc_bpf:s0  0 2021-11-11 02:08 /proc/sys/kernel/bpf_stats_enabled
  -rw-r--r-- 1 root root u:object_r:proc_bpf:s0  0 2021-11-11 02:08 /proc/sys/kernel/unprivileged_bpf_disabled
  -rw-r--r-- 1 root root u:object_r:proc_bpf:s0  0 2021-11-11 02:08 /proc/sys/net/core/bpf_jit_enable
  -rw------- 1 root root u:object_r:proc_bpf:s0  0 2021-11-11 02:08 /proc/sys/net/core/bpf_jit_harden
  -rw------- 1 root root u:object_r:proc_bpf:s0  0 2021-11-11 02:08 /proc/sys/net/core/bpf_jit_kallsyms
  -rw------- 1 root root u:object_r:proc_bpf:s0  0 2021-11-11 02:08 /proc/sys/net/core/bpf_jit_limit

Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I46ea81ff42d3b915cf7a96735dc2636d9808ead6
2021-11-11 02:54:21 -08:00
Ji Luo
d338d0ef55 Fix bootchart on android12
Access denial of Apexd would cause runtime abort and the
bootchart is not working on Android 12:
  ...
  F nativeloader: Error finding namespace of apex: no namespace called com_android_art
  F zygote64: runtime.cc:669] Runtime aborting...
  F zygote64: runtime.cc:669] Dumping all threads without mutator lock held
  F zygote64: runtime.cc:669] All threads:
  F zygote64: runtime.cc:669] DALVIK THREADS (1):
  F zygote64: runtime.cc:669] "main" prio=10 tid=1 Runnable (still starting up)
  F zygote64: runtime.cc:669]   | group="" sCount=0 ucsCount=0 flags=0 obj=0x0 self=0xb4000072de0f4010
  ...

Bug: 205880718
Test: bootchart test.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ia7d166605cd0b58849cb44d9a16dc3c73e1d4353
2021-11-11 16:53:24 +08:00
David Brazdil
2322e6d63d Merge "Allow control of AVF experiments" am: f7d7c22115
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1875377

Change-Id: I8ae42a96909cd571a79a1b941db9ec85e3336b1c
2021-11-10 21:00:05 +00:00
David Brazdil
f7d7c22115 Merge "Allow control of AVF experiments" 2021-11-10 20:42:25 +00:00
Jaegeuk Kim
4e964bf2b8 Merge "sepolicy: allow to play f2fs-compression for odex/vdex files" am: 6065b053ff
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1883728

Change-Id: I9edbabdcb26179388f82e5ba5d72ef77cd5017c7
2021-11-10 20:25:12 +00:00
Shuzhen Wang
73be025636 Add camera.disable_preview_scheduler property
Test: Build and boot
Bug: 200306379
Change-Id: I7d0b40de33a2d19c88322eacefe9d7342d55a6f4
2021-11-10 12:22:57 -08:00
Jaegeuk Kim
6065b053ff Merge "sepolicy: allow to play f2fs-compression for odex/vdex files" 2021-11-10 19:56:57 +00:00
Andrew Scull
d7bed7733e Allow control of AVF experiments
Grant system_server and flags_health_check permission to set the
properties that correspond to the AVF experiments.

Bug: 192819132
Test: m
Change-Id: I0e6fa73187abb4412d07ecfd42c1074b8afa5346
2021-11-10 10:42:47 +00:00
Xin Li
0225181e63 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I8d9db47ed6b16069997ac7073f6e9bf68928ae77
Change-Id: Ie0fcc9e0e7541e938e19b9b1553e29c739849571
2021-11-10 08:06:27 +00:00
Maciej Żenczykowski
85a1557fd2 Merge "remove spurious clat selinux privs" am: d43e99bed1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1322108

Change-Id: Ia7edf6afe3e00e1fe18ab807c425bd9c0ec66291
2021-11-10 04:01:26 +00:00
Maciej Żenczykowski
d43e99bed1 Merge "remove spurious clat selinux privs" 2021-11-10 03:46:52 +00:00
Yifan Hong
53b4269ce8 Merge "Add charger_type." am: 4b326c0d3f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1870071

Change-Id: I4782590af66fb6fa003caaf364ea0facdb79f7dd
2021-11-10 00:28:34 +00:00
Yifan Hong
4b326c0d3f Merge "Add charger_type." 2021-11-10 00:06:55 +00:00
Maciej Żenczykowski
e397503f80 remove spurious clat selinux privs
Test: ran on flame with ipv6 only wifi network
Bug: 144642337
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5610b5e446ed1f2288edb12c665a5bddd69d6dae
2021-11-09 19:26:13 +00:00
Kalesh Singh
5c3c020bbf Merge "sepolicy: Allow creating synthetic trace events" am: 9e6dcd74fc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1881642

Change-Id: I5c886559ad8bed6df2c755e5c2558f77bfce2693
2021-11-09 14:50:21 +00:00
Kalesh Singh
9e6dcd74fc Merge "sepolicy: Allow creating synthetic trace events" 2021-11-09 14:26:19 +00:00
Sarah Chin
703e69e517 Merge "Sepolicy for IRadio modules" am: 0185fc6e12
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1883570

Change-Id: I34e1521c7d987b37c0ece4ecfa7e95d7c5e4be66
2021-11-09 09:02:37 +00:00
Sarah Chin
0185fc6e12 Merge "Sepolicy for IRadio modules" 2021-11-09 08:39:34 +00:00
Tej Singh
980ea0bed3 Sepolicy for StatsBootstrapAtomService
This is the selinux changes required to create
StatsBootstrapAtomService, a lightweight proxy service in system server
to allow processes in the bootstrap namespace to log atoms to statsd.

Test: statsbootstrap is successfully published
Bug: 204889815
Change-Id: I5e44f7a65b98b8eebd8da6d35ae6094ce5e177f2
2021-11-08 23:28:21 -08:00
Ken
851c11b2cb sepolicy: allow to play f2fs-compression for odex/vdex files
This patch adds some ioctls for odex/vdex files.

Bug: 205257122
Test: Manual. Code runs.
Signed-off-by: Ken Bian <kenjc.bian@rock-chips.com>
Change-Id: Ibf7890f0910ed04e0355bef9c0bfb21b406fb7eb
2021-11-09 03:13:46 +00:00
Kalesh Singh
fab8e1c1cc sepolicy: Allow creating synthetic trace events
rss_stat will be throttled using histogram triggers and synthetic trace
events. Add genfs context labels for the synthetic tracefs files.

Bug: 145972256
Test: Check log cat for avc denials
Change-Id: I7e183aa930bb6ee79613d011bed7174d553f9c1a
2021-11-08 09:13:51 -08:00
Yi-Yo Chiang
2c18965e27 Treblelize bug_map: split bug_map to multiple partitions
* plat_bug_map: Platform-specific bug_map definitions.
* system_ext_bug_map: Product-specific bug_map definitions.
* vendor_bug_map: SOC-specific bug_map definitions.

Bug: 177977370
Test: Boot and check auditd logs
Change-Id: I6f26b421acfd060e8abb8e4e812c0f422cc6757b
2021-11-08 22:44:34 +08:00
Yi-Yo Chiang
a60b99fef5 Merge "Add remount.te to allow adb remount-related operations" am: 635f273be5
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1878144

Change-Id: Idf5173bc71b216c14b894c4c8315b94a10237205
2021-11-08 06:59:54 +00:00
Inseob Kim
1b965988b7 Split property and file contexts modules
1. Splitted plat_property_contexts and plat_file_contexts so that they
can be included by the CtsSecurityHostTestCases module;
2. Add temporary seapp_contexts Soong module, which are needed by the
CtsSecurityHostTestCases, and makefile_goal is an interim solution before
migrating both of them to Soong.

Bug: 194096505
Test: m CtsSecurityHostTestCases
Change-Id: I0e0e7f6778d42ab2fdae3a181f40216fe6719e7c
2021-11-08 15:44:29 +09:00
Yi-Yo Chiang
635f273be5 Merge "Add remount.te to allow adb remount-related operations" 2021-11-08 06:43:36 +00:00
Yifan Hong
4238b0e15d Add charger_type.
This is the common type for domains that executes charger's
functionalities, including setting and getting necessary properties,
permissions to maintain the health loop, writing to kernel log, handling
inputs and drawing screens, etc.

Permissions specific to the system charger is not moved.

Also enforce stricter neverallow rules on charger_{status,config}_prop.

For charger_config_prop, only init / vendor_init can set.
For charger_status_prop, only init / vendor_init / charger / health HAL
  can set.
For both, only init / vendor_init / charger / dumpstate / health HAL
  can get.

(Health HAL is determined by the intersection of charger_type and
hal_health_server.)

A follow up CL will be added to add charger_type to hal_health_default,
the default domain for health HAL servers. Vendors may add charger_type
to their domains that serves the health AIDL HAL as well.

Test: manual
Bug: 203246116
Change-Id: I0e99b6b68d381b7f73306d93ee4f8c5c8abdf026
2021-11-05 18:44:04 -07:00
Sarah Chin
e3dfbdb52d Sepolicy for IRadio modules
Test: build and flash
Bug: 198331673
Change-Id: I06513050252874400bcd81fb5735d6790f6e2ac1
2021-11-05 17:00:28 -07:00