Commit graph

33478 commits

Author SHA1 Message Date
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
Treehugger Robot
752de6869d Merge "Enable Telephony AIDL-HIDL shim HAL" am: 28fc30ebc1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1866818

Change-Id: I08049cb31cb6e5f943be3001eb25d7105289b251
2021-11-05 20:52:55 +00:00
Bart Van Assche
df2c2457dc Merge "Stop using the bdev_type and sysfs_block_type SELinux attributes" am: 5e016c1721
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1875763

Change-Id: Iccfad9031b4532588de82ef76e178fdf34366f34
2021-11-05 20:52:50 +00:00
Treehugger Robot
28fc30ebc1 Merge "Enable Telephony AIDL-HIDL shim HAL" 2021-11-05 20:51:51 +00:00
Bart Van Assche
5e016c1721 Merge "Stop using the bdev_type and sysfs_block_type SELinux attributes" 2021-11-05 20:36:02 +00:00
Treehugger Robot
012a7d8166 Merge "Remove references to nonplat sepolicy" am: 37919f5b87
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1882149

Change-Id: Ia4100e127d5d5b536599dd27de9a87de6e95cd5b
2021-11-05 15:40:38 +00:00
Treehugger Robot
37919f5b87 Merge "Remove references to nonplat sepolicy" 2021-11-05 15:25:54 +00:00
Jeff Vander Stoep
f098071ac7 Remove references to nonplat sepolicy
"nonplat" was renamed to "vendor" in Android Pie, but was retained
here for Treble compatibility.

We're now outside of the compatbility window for these devices so
it can safely be removed.

Test: atest treble_sepolicy_tests
Change-Id: Iaa22af41a07b13adb7290f570db7a9d43b6e85cc
2021-11-05 15:07:57 +01:00
Colin Cross
6a6cebec2e Don't use AndroidMkEntries.Custom am: f82aed0daa
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1880607

Change-Id: Ie5bffa9a4e91e5fc05f77bef6a5ec0b4e4de01b2
2021-11-05 05:32:49 +00:00
Colin Cross
f82aed0daa Don't use AndroidMkEntries.Custom
There's nothing special in the Custom method supplied, replace it
with normal AndroidMkEntries fields.

Bug: 204136549
Test: m checkbuild
Change-Id: I624005d2ee313aaa60397749b0726e393a842618
2021-11-04 17:25:55 -07:00
Yi-Yo Chiang
04b0095861 Merge "gsid: Allow reading the size of super block device" am: 92eeceafd3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1879536

Change-Id: I54432e635c36058a2f75126bfac6f790553f55e2
2021-11-04 10:15:24 +00:00
Yi-Yo Chiang
92eeceafd3 Merge "gsid: Allow reading the size of super block device" 2021-11-04 09:06:01 +00:00
Treehugger Robot
ff53741d8e Merge "microdroid: add /dev/hvc2" am: 1cd812d357
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1876184

Change-Id: I738bc4cae39d2bc7546988f98dc21ba29414b3cd
2021-11-04 01:43:45 +00:00
Treehugger Robot
1cd812d357 Merge "microdroid: add /dev/hvc2" 2021-11-04 01:26:44 +00:00
Treehugger Robot
a648e2420f Merge "Allow keystore to read vendor security patch level." am: e1c861ca1a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1878656

Change-Id: I70f98730a31cd5e8caf659ae1fe4a3e99e7ebaef
2021-11-03 23:38:02 +00:00
Treehugger Robot
ae3a974604 Merge "Grant permission for mediatranscoding hal_allocator for GSI image" am: c791b0f1ca
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1874094

Change-Id: I58c579db6b4be2eb41f1706c2d36c9bc27d6d48d
2021-11-03 23:37:45 +00:00
Treehugger Robot
e1c861ca1a Merge "Allow keystore to read vendor security patch level." 2021-11-03 23:32:35 +00:00
Treehugger Robot
c791b0f1ca Merge "Grant permission for mediatranscoding hal_allocator for GSI image" 2021-11-03 23:21:34 +00:00
Serik Beketayev
bb2ef83dcb [IRadioConfig] Applying new IRadioConfig AIDL am: 1862a52750
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1879936

Change-Id: Ic535665ca7a7440b545c73b0bc5557e6894ee6df
2021-11-03 17:36:31 +00:00
Serik Beketayev
1862a52750 [IRadioConfig] Applying new IRadioConfig AIDL
Bug: 198332054
Test: m -j
Change-Id: I7558a7488c41aac6cd9cae1f0ccf777045909f85
2021-11-03 09:18:49 -07:00
Gabriel Biren
9229edf01d Add SeLinux policy for supplicant AIDL service. am: 4a0673e369
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1845631

Change-Id: I08f099f885993fb45e64db23f28e958f8af995ca
2021-11-03 15:02:16 +00:00
Yi-Yo Chiang
ae736f91cb gsid: Allow reading the size of super block device
Bug: 204963821
Test: Presubmit
Change-Id: Ic079a8a557af676c8cda2f1d4ed972b72d86e2ed
2021-11-03 20:42:48 +08:00