Commit graph

7788 commits

Author SHA1 Message Date
Paul Lawrence
e3e26b7bea Allow bpfloader to read fuse's bpf_prog number
Bug: 202785178
Test: Along with rest of topic, file
/sys/fs/bpf/prog_fuse_media_fuse_media
appears on boot with fuse-bpf in kernel

Merged-In: Ibccdf177c75fef0314c86319be3f0b0f249ce59d
Change-Id: Ibccdf177c75fef0314c86319be3f0b0f249ce59d
2021-11-19 01:43:58 +00:00
Treehugger Robot
b8f39c49f5 Merge "Sepolicy for StatsBootstrapAtomService" 2021-11-18 23:25:21 +00:00
Treehugger Robot
c1ebd11f2c Merge "Allow system server to access composd." 2021-11-18 13:03:01 +00:00
Yifan Hong
28f9b97646 Merge changes from topic "servicemanager-recovery"
* changes:
  servicemanager: recovery write to kmsg.
  Add recovery service_contexts files.
2021-11-18 04:39:15 +00:00
Treehugger Robot
1b0415fcb0 Merge changes I74797b13,I5d0b06e3
* changes:
  Dice HAL: Add policy for dice HAL.
  Diced: Add policy for diced the DICE daemon.
2021-11-17 23:56:14 +00:00
Janis Danisevskis
bc7a33ece9 Dice HAL: Add policy for dice HAL.
And allow diced to talk to the dice HAL.

Bug: 198197213
Test: N/A
Change-Id: I74797b13656b38b50d7cd28a4c4c6ec4c8d1d1aa
2021-11-17 13:36:18 -08:00
Janis Danisevskis
2b6c6063ae Diced: Add policy for diced the DICE daemon.
Bug: 198197213
Test: N/A
Change-Id: I5d0b06e3cd0c594cff6120856ca3bb4f7c1dd98d
2021-11-17 13:36:18 -08:00
Daniel Norman
0dd5118c74 Merge "Revert "Revert "Adds a new prop context for choosing between mul..."" 2021-11-17 21:24:28 +00:00
Ashwini Oruganti
ed7ebb867e Merge "Define and add the migrate_any_key permission to system_server" 2021-11-17 17:55:13 +00:00
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
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
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
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
8e276eae6b Merge "Adds a new prop context for choosing between multi-installed APEXes." 2021-11-16 00:45:32 +00:00
Jiyong Park
5d0397047d Merge "Fix bootchart on android12" 2021-11-15 07:04:06 +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
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
f7d7c22115 Merge "Allow control of AVF experiments" 2021-11-10 20:42:25 +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
Maciej Żenczykowski
d43e99bed1 Merge "remove spurious clat selinux privs" 2021-11-10 03:46:52 +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
9e6dcd74fc Merge "sepolicy: Allow creating synthetic trace events" 2021-11-09 14:26:19 +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
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
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
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
Yi-Yo Chiang
92eeceafd3 Merge "gsid: Allow reading the size of super block device" 2021-11-04 09:06:01 +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
1862a52750 [IRadioConfig] Applying new IRadioConfig AIDL
Bug: 198332054
Test: m -j
Change-Id: I7558a7488c41aac6cd9cae1f0ccf777045909f85
2021-11-03 09:18:49 -07: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
Gabriel Biren
4a0673e369 Add SeLinux policy for supplicant AIDL service.
Bug: 196235436
Test: Manual - connect to WiFi
Change-Id: I613a2e7eac620543872a1af7ed477b8d36713b45
2021-11-02 22:24:39 +00:00
Yabin Cui
c1a51d1400 Merge "Add persist properties for app profiling itself." 2021-11-02 19:03:37 +00:00
Chris Weir
07fcb348fa Merge "SEPolicy for Netlink Interceptor" 2021-11-02 18:02:45 +00:00
Yi-Yo Chiang
8638a44a2d Add remount.te to allow adb remount-related operations
* init_daemon_domain because clean_scratch_files is executed by init
* gsid related plumbing for libfs_mgr_binder

Bug: 204836146
Test: Presubmit
Change-Id: Idd7eacd577f538d194252174ab1e3d8396f08fb1
2021-11-02 22:10:05 +08:00
Jooyung Han
effe33f20d Merge "remove unnecessary right from virtualizationservice" 2021-11-02 09:10:25 +00:00
Mohammad Islam
15a5b178fe Merge "Allow apexd to call derive_classpath binary" 2021-11-02 08:51:01 +00:00
Jooyung Han
33b21f0c91 remove unnecessary right from virtualizationservice
Bug: n/a
Test: MicrodroidTestCases
Change-Id: I14580d89d03dd90498f665913d00484ff643ee6a
2021-11-02 16:01:04 +09:00
Yabin Cui
ee7f40a2a2 Add persist properties for app profiling itself.
Bug: 204601121
Test: build and boot.
Change-Id: If731c77dd6f2b587178b4f6b8a908df2d96e5d9a
2021-11-01 16:42:08 -07:00
Treehugger Robot
54bd8438b1 Merge "Allow init to write to /proc/cpu/alignment" 2021-11-01 22:33:09 +00:00
Alistair Delva
6092d633b0 Allow init to write to /proc/cpu/alignment
The root init.rc does "write /proc/cpu/alignment 4", but we don't
actually allow this write in core sepolicy. This seems to be a 32-bit
ARM only proc file.

Noticed when booting 32-bit ARM Cuttlefish.

Bug: 145371497
Change-Id: Ic099395708f7236bcc2fc5c561809a7e129786de
2021-11-01 10:17:26 -07:00
Bart Van Assche
4374a1fd83 Stop using the bdev_type and sysfs_block_type SELinux attributes
Stop using these SELinux attributes since the apexd and init SELinux
policies no longer rely on these attributes.

The difference between the previous versions of this patch and the
current patch is that the current patch does not remove any SELinux
attributes. See also
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1850656.
See also
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1862919.

This patch includes a revert of commit 8b2b951349 ("Restore permission
for shell to list /sys/class/block").  That commit is no longer necessary
since it was a bug fix for the introduction of the sysfs_block type.

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd
Change-Id: I73e1133af8146c154af95d4b96132e49dbec730c
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-29 15:22:09 -07:00
Shubang Lu
69a7983d31 Merge "Add SE policy for tv_iapp" 2021-10-29 19:44:18 +00:00
Yabin Cui
d6ab03f8d0 Merge "Revert "Revert "allow simpleperf to profile more app types.""" 2021-10-29 16:28:59 +00:00
Jeffrey Huang
47ff63e60e Merge "Allow statsd to write to priv app FDs" 2021-10-29 16:06:33 +00:00
Steven Moreland
f15d7e3ff5 Merge "Remove bufferhub HAL policy." 2021-10-28 21:12:45 +00:00
Jeffrey Huang
5d5e539bbf Allow statsd to write to priv app FDs
Bug: 160810755
Test: manual
Change-Id: Idc033ca206855424affa04351f946dda42d087a8
2021-10-28 13:07:19 -07:00
brycelee
1a6fbe3dfe Merge "Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"" 2021-10-28 18:31:01 +00:00
Bart Van Assche
e3cfa9e1d3 Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"
This reverts commit 63930d3850.

Reason for revert: Broken build (https://android-build.googleplex.com/builds/submitted/7863094/aosp_raven-userdebug/latest/view/logs/error.log)

Change-Id: I1742d69d471e9b00359a2e7e654aa752513990df
2021-10-28 18:03:49 +00:00
Kilyoung Shin
1578320fa7 Grant permission for mediatranscoding hal_allocator for GSI image
Bug: 203839961
Test: run cts -m CtsMediaTranscodingTestCases -t
android.media.mediatranscoding.cts.MediaTranscodingManagerTest#testAddingClientUids

Signed-off-by: Kilyoung Shin <gilbert.shin@samsung.com>
Change-Id: If44653f436d4e5dcbd040af24f03b09ae8e7ac05
2021-10-28 17:46:57 +00:00
Bart Van Assche
187ffea5b8 Merge "Remove the bdev_type and sysfs_block_type SELinux attributes" 2021-10-28 16:45:54 +00:00
Samiul Islam
9237163c26 Allow apexd to call derive_classpath binary
This will allow apexd to determine if a staged apex contributes to
classpath or not.

Bug: 187444679
Test: atest ApexTestCases
Test: atest StagedInstallInternalTest
Change-Id: I336001ef1dab3aa45835662eecc02d63645b5980
2021-10-28 16:27:09 +01:00
Yabin Cui
3696a20b11 Revert "Revert "allow simpleperf to profile more app types.""
This reverts commit dd2079d7f0.

Bug: 199086135
Test: run simpleperf to record systemui.
Change-Id: Ibc6017d53a9835a2f8ff5409c825c0d70ef23e25
2021-10-27 11:05:01 -07:00
Steven Moreland
cc7de177ec Remove bufferhub HAL policy.
The bufferhub daemon policy still remains, since it still needs to be
deleted. However, since the HAL no longer exists, removing policy
related to this.

Bug: 204068144
Test: build only
Change-Id: I96b96c77a39e2ba2024680ebaf3067283d0cfc65
2021-10-27 10:54:45 -07:00
Robin Lee
0b0dd684e7 Add the property context for ro.lmk.use_minfree_levels
This is not settable by vendor init at the moment, which appears to be a mistake
because it is often used as a board-level configuration.

Change-Id: I7a49d55712e9606446b3e6307627a208657d5da2
Test: adb shell getprop -Z | grep lmk
Bug: 184041905
2021-10-27 13:17:54 +00:00
Yifan Hong
388bbbccb3 Add health AIDL HAL.
Test: pass
Bug: 177269435
Change-Id: I755d5158715b38a89a28af753ad4c27cdfa93546
2021-10-26 19:34:34 -07:00
Chris Weir
4ac3d74a70 SEPolicy for Netlink Interceptor
Make Netlink Interceptor work when SELinux is enforcing

Test: Netlink Interceptor HAL comes up and works
Bug: 194683902
Change-Id: I3afc7ae04eba82f2f6385b66ddd5f4a8310dff88
2021-10-26 10:03:14 -07:00
Bart Van Assche
63930d3850 Remove the bdev_type and sysfs_block_type SELinux attributes
Remove these SELinux attributes since the apexd and init SELinux policies
no longer rely on these attributes.

The only difference between a previous version of this patch and the
current patch is that the current patch moves these attributes to the
'compat' policy. See also
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1850656.

This patch includes a revert of commit 8b2b951349 ("Restore permission
for shell to list /sys/class/block"). That commit is no longer necessary
since it was a bug fix for the introduction of the sysfs_block type.

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd && adb -e shell dmesg | grep avc
Change-Id: Id7d32a914e48bc74da63d87ce6a09f11e323c186
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-25 16:26:07 -07:00
shubang
9fa7dc9c7b Add SE policy for tv_iapp
Bug: 203730671
Test: cuttlefish;
Change-Id: I533f2004343aafe5660e4018e73111880dfa647f
2021-10-22 00:02:05 -07:00
Yifan Hong
48732e041c Merge "Remove healthd." 2021-10-22 00:06:39 +00:00
Treehugger Robot
5b1dc1693a Merge "Move mediatranscoding type to public" 2021-10-21 11:06:22 +00:00
Bowgo Tsai
ef1f630c69 Set context for partition.odm.verified[.*] properties.
Some devices might have the ODM partition so set those properties
as well.

Bug: 203720638
Test: Presubmit
Change-Id: I50ee65e21c471f0691f4c1dfc93be8eb1677ad1b
2021-10-21 16:38:06 +08:00
Jeff Vander Stoep
1b2a0b4dab Move mediatranscoding type to public
Move type to public so that it can be vendor customized. This
can be necessary if (for example) the gralloc/gpu same-process-HAL
requires additional permissions.

Bug: 199581284
Test: build
Change-Id: I61a5a3ad96112d4293fd4bf6d55f939c974643ce
2021-10-21 09:10:45 +02:00
Yifan Hong
aabea20d89 Remove healthd.
Test: pass
Bug: 203245871
Change-Id: I4eb0b4333d7fde2096c4c75b7655baf897900005
2021-10-20 18:47:41 -07:00
Ady Abraham
7ed18e6d66 Composer stable AIDL HAL sepolicy
Test: build + presubmit
Bug: 198690444
Change-Id: I6a26823c4ad363d137526c96580b05363d0ac894
2021-10-20 02:58:20 +00:00
Ady Abraham
df28371462 Remove vrflinger
Not used anymore.

Test: build + presubmit
Bug: 170681929
Change-Id: I3ac9b842f89acf620e9f08516e44977d83064f2f
2021-10-20 02:02:57 +00:00
Michał Brzeziński
04e3a05fde Merge "Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"" 2021-10-19 13:03:18 +00:00
Michał Brzeziński
e8739ba23a Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"
Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"

Revert "Remove the bdev_type and sysfs_block_type SELinux attributes"

Revert submission 1850578-remove-selinux-bdev-type

Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/203480787

BUG: 203480787

Reverted Changes:
I263bce9c4:Remove the bdev_type and sysfs_block_type SELinux ...
Ibc9039f96:Revert "Add the 'bdev_type' attribute to all block...
Ic6ae83576:Remove the bdev_type and sysfs_block_type SELinux ...
Ie493022a8:Remove the bdev_type and sysfs_block_type SELinux ...
I1f1ca439b:Revert "Add the 'bdev_type' attribute to all block...
I283f8676b:Revert "Add the 'bdev_type' attribute to all block...
I7c5c242c5:Revert "Add the 'bdev_type' attribute to all block...
Id78d8f7dc:Remove the bdev_type and sysfs_block_type SELinux ...
I9c4b2c48b:Remove the bdev_type and sysfs_block_type SELinux ...
I51e9d384a:Remove the bdev_type and sysfs_block_type SELinux ...
I2c414de3b:Remove the sysfs_block_type SELinux attribute

Change-Id: I55609803d530772d507d9dca8ba202a96daf24b7
2021-10-19 10:57:42 +00:00
Treehugger Robot
eaa9fa390b Merge "Allow test apps to use the virtualizationservice" 2021-10-19 10:33:23 +00:00
Jiyong Park
47d4b1ffdc Allow test apps to use the virtualizationservice
The existing host-side tests for virtualizationservice will be migrated
to device tests. In order for the self-instrumented test apks be able to
talk to the service, re-introduce the allow rule only for the
non-production builds.

Note that the access to the service is still guarded with the app
permission whose protection level now has the 'development' bit. So,
ordinary apks that are not testing-purpose (i.e. no
android:testOnly="true") can't use the service.

Bug: 203483081
Test: run MicrodroidDemoApp
Change-Id: Ia441fc5ca0a1f076d2e267a26e0df7c11730ec94
2021-10-19 17:18:42 +09:00
Treehugger Robot
0503ed283e Merge "Remove the bdev_type and sysfs_block_type SELinux attributes" 2021-10-19 01:05:55 +00:00
Maurice Lam
cde20c1fc6 Merge "SELinux rules for virtual device" 2021-10-18 20:13:42 +00:00
Daniel Norman
19d367c41a Merge "Allow zygote to canonicalize vendor apex paths." 2021-10-18 19:03:33 +00:00
Bart Van Assche
c50f66900f Remove the bdev_type and sysfs_block_type SELinux attributes
Remove these SELinux attributes since adding these attributes introduces
a depencency from vendor SELinux policies on the generic SELinux policy,
something that is not allowed. This patch includes a revert of commit
8b2b951349 ("Restore permission for shell to list /sys/class/block").
That commit is no longer necessary since it was a bug fix for the
introduction of the sysfs_block type.

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd
Change-Id: Ic6ae835768212648ca09fd5c83c39180103c3b1b
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-18 11:37:09 -07:00
Daniel Norman
cf2499a0ba Allow zygote to canonicalize vendor apex paths.
Bug: 199200417
Test: Build cuttlefish with an 'android'-targeting RRO in a
      vendor APEX. Observe no SELinux errors.
Change-Id: I4c73cb6d98b70282e10354d2596b261bd7c409db
2021-10-18 16:25:14 +00:00
Maurice Lam
1517644d4d SELinux rules for virtual device
Bug: 194949534
Test: Manual
Change-Id: I5fcc83e313ce464e4a855b24d32fc2d82ee0b07e
2021-10-15 18:16:01 -07:00
Tianjie Xu
9cd93e48da Merge "Add context for checkin directory" 2021-10-15 21:19:26 +00:00
Arthur Ishiguro
29dc02c044 Sensors stable AIDL HAL sepolicy
Bug: 195593357
Test: TreeHugger
Change-Id: I02b88a93d829654a1ce946681b59e648b2cd7550
2021-10-15 17:39:56 +00:00
Zimuzo Ezeozue
dcb9369554 Merge "Allow MediaProvider to access the media metrics service" 2021-10-15 13:32:12 +00:00
Zim
26d73ceb6e Allow MediaProvider to access the media metrics service
This allows MediaProvider call certain MediaCodec APIs

Test: atest TranscodeTest
Bug: 190422448
Change-Id: Ied609152e6a9ba6d17b70db325ca33f1cb345eb8
2021-10-15 08:39:30 +00:00
Tianjie
b729aa6c5e Add context for checkin directory
Checkin apps use /data/misc_ce/<id>/checkin to backup the checkin
metadata. So users won't lose the checkin tokens when they clear
the app's storage.

One example is when GMScore is used for checkin, users may clear
GMScore data via "settings". If the device accidentally loses the
token without backup, it won't be able to checkin again until
factory reset.

The contents in checkin dir will be cleaned up when a user is removed
from the device. We also plan to add Gmscore test to ensure the dir
is cleaned up at checkin time, thus prevent other Gmscore modules
from using this storage by mistake.

Bug: 197636740
Test: boot device, check selinux label, check gmscore writes to the new dir
Change-Id: If3ff5e0fb75b4d49ce80d91b0086b58db002e4fb
2021-10-14 16:21:10 -07:00
Treehugger Robot
7609e175c5 Merge "Stop using the bdev_type and sysfs_block_type SELinux attributes" 2021-10-14 17:58:57 +00:00
Bart Van Assche
398b0af20f Stop using the bdev_type and sysfs_block_type SELinux attributes
Stop using these attributes since these will be removed soon.

Bug: 202520796
Test: (AOSP) source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd && adb -e shell dmesg | grep avc
Test: (sc-v2-dev) source build/envsetup.sh && lunch ...-userdebug && m && install-images-on-phone && adb root && adb dmesg | grep 'avc.*comm=.init'
Change-Id: I9f5a4c5c4d6c44fefa8e66c69fec62c99f9a728d
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-14 09:13:58 -07:00
Dave McCloskey
74fd233c29 Merge "SEPolicy changes to support Attestation Verification Service" 2021-10-14 00:12:50 +00:00
Bart Van Assche
41b61b7772 Merge "Revert "Stop granting init access to block device properties"" 2021-10-13 17:11:01 +00:00
Bart Van Assche
60b7d9a36e Revert "Stop granting init access to block device properties"
This reverts commit f20fea50f1.

Reason for revert: unbreak the git_sc-v2-dev-plus-aosp tests
Bug: 202879263

Change-Id: I79245afb4ba7f5be8ee46f2e91921a7327b650c5
2021-10-13 16:21:54 +00:00
Nicolas Geoffray
47a5f31980 Merge "Allow incidentd to read apex-info-list.xml." 2021-10-13 09:32:08 +00:00
Treehugger Robot
b664b0ac79 Merge "Stop using the bdev_type and sysfs_block_type SELinux attributes" 2021-10-12 18:26:02 +00:00
Bart Van Assche
f4a1c36369 Merge "Stop granting init access to block device properties" 2021-10-12 17:37:59 +00:00
Bart Van Assche
6b53d731fd Stop using the bdev_type and sysfs_block_type SELinux attributes
Stop using these attributes since these will be removed soon.

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd
Change-Id: I61dffb482f4e952299156f34be642ae52fcbfeb3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-12 09:45:11 -07:00
Bart Van Assche
f20fea50f1 Stop granting init access to block device properties
Although there has been a plan to add code to the init process that
requires access to block device properties, that plan has not been
realized. Hence stop granting the init process access to block device
properties

Bug: 202520796
Test: source build/envsetup.sh && lunch aosp_x86_64 && m && launch_cvd
Change-Id: I0ed83bd533a901f85986d15f636c9b3f39fec271
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-10-12 09:20:03 -07:00
Ian Hua
91d153e9b5 Update sepolicy for adding nnapi_native namespace.
Test: mm
Bug: 201399117
Change-Id: I40a2431b6f5a54deae27fe68f503aff9b99e2793
2021-10-12 11:50:26 +01:00
Nicolas Geoffray
7a2693b61e Allow incidentd to read apex-info-list.xml.
Spotted looking at a bugreport.

Test: m
Change-Id: I034099e5899b4fd75ec58f16f0fa49a3bdc079e1
2021-10-09 15:46:44 +01:00
Dave McCloskey
a7e47db710 SEPolicy changes to support Attestation Verification Service
Bug: 201696614
Change-Id: I4a7a830ba809ed59a030a87c4f479199685d8a42
Test: Verify device boots
2021-10-08 14:53:24 -07:00
Andrew Scull
aedd65ac20 Allow vendor_init to read AVF device configs
Bug: 192819132
Test: build
Change-Id: Iefa4d2d2dc0a13a9a6c95779d6ebde5cb2834295
2021-10-08 14:51:30 +00:00
Jooyung Han
1103fb887a Merge "virtualizationservice to use "staged" apexes" 2021-10-08 00:26:40 +00:00
Xin Li
2b2247f14c Merge "Merge Android 12" 2021-10-07 23:50:37 +00:00
Treehugger Robot
27d22e670a Merge "Fix error in systemui when toggling airplane mode" 2021-10-07 16:17:57 +00:00
Treehugger Robot
21dac7a746 Merge "Add media.resolution.limit.32bit to media_config_prop" am: a257817b5d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1840355

Change-Id: Icd70009f62d023fb68bb1355f804f9489362c0ed
2021-10-05 17:33:32 +00:00
Treehugger Robot
a257817b5d Merge "Add media.resolution.limit.32bit to media_config_prop" 2021-10-05 17:13:35 +00:00
Nicolas Geoffray
d6d00365f1 Merge "Allow system server to map zygote_tmpfs files." am: 02211e449d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1844917

Change-Id: I738edf09d8cd58e15ce0e4d987c902ad7b660de9
2021-10-05 16:14:57 +00:00
Nicolas Geoffray
02211e449d Merge "Allow system server to map zygote_tmpfs files." 2021-10-05 16:02:56 +00:00
Nicolas Geoffray
cd470d1e51 Allow system server to map zygote_tmpfs files.
Needed for an ART optimization.

Test: build
Change-Id: I120cdbe410248ac08f4e56cdeb6588681630a964
2021-10-05 15:03:54 +01:00
Jooyung Han
970166fb4a virtualizationservice to use "staged" apexes
Virtualizationservice queries "package_native" service to get staged
apex info and then reads staged apexes to VM.

Bug: 199146189
Test: MicrodroidHostTestCases
Change-Id: Icbfe5b9a05abc08d3e0270d15969f632b3f57c66
2021-10-05 19:57:20 +09:00
Treehugger Robot
1e04545bb3 Merge "Allow compos_fd_server to signal readiness" am: a12dc09f78
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1844302

Change-Id: Ia0cd0cbb89675f1de7e4e3e450a5aa6dae2ef2d8
2021-10-05 10:08:17 +00:00
Treehugger Robot
a12dc09f78 Merge "Allow compos_fd_server to signal readiness" 2021-10-05 09:44:27 +00:00
Enrico Granata
393ebdda04 Merge "Introduce ro.boot.hypervisor properties" am: dd35626853
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1843773

Change-Id: I4ff9a7c008590a5ca17987aac95c5afab441f392
2021-10-04 19:20:47 +00:00
Enrico Granata
dd35626853 Merge "Introduce ro.boot.hypervisor properties" 2021-10-04 19:10:28 +00:00
Enrico Granata
645c390d1a Introduce ro.boot.hypervisor properties
In virtualized deployments of Android, it can be useful to have
access to a description of the hypervisor/host environment being
used to run the guest OS instance.

This is represented by means of a new system property
ro.boot.hypervisor.version, which is meant to convey a
free-form descriptor of the current host/hypervisor version

The property is meant to be provided to Android as androidboot.
by whatever host-specific means are used to supply other boot
properties to the target Android instance. Access could be later
opened to other vendor processes to set if needed for specific
setups where init is not a sufficiently-early stage for
host/guest communication. Such setups are not known at this time.

For a native Android incantation, the property defaults to
being missing

Other properties could later be added to this same namespace
and context if they turn out to be useful in specific scenarios.

Bug: 178749018
Test: build cuttlefish
Change-Id: Id721c14ef1958b525c2866a660dcae8fd176a79d
2021-10-04 11:14:03 -06:00
Beth Thibodeau
a279bdba64 Fix error in systemui when toggling airplane mode
Fixes: 197722115
Test: manual - toggle, no avc: denied message
Change-Id: I17929f7cb77a4ba4f9720783c9913243f74db080
2021-10-04 15:34:19 +00:00
Daniele Di Proietto
43ace3bad3 Merge "Allow init to run perfetto" am: 6634fe524e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1842419

Change-Id: If4405103e120e70b7dc6035d24261d35bc4a31ca
2021-10-04 13:38:30 +00:00
Daniele Di Proietto
6634fe524e Merge "Allow init to run perfetto" 2021-10-04 13:20:48 +00:00
Alan Stokes
ad6e12644c Allow compos_fd_server to signal readiness
We pass the write end of a pipe to fd_server which it uses to signal
when it is ready to serve.

Bug: 201764092
Test: atest ComposTestCase
Change-Id: Id952e953e79f6cef9c8f0c847a303a3a854f2248
2021-10-04 14:12:02 +01:00
Beth Thibodeau
79485f5e45 Merge "make ril.cdma.inecmmode system property internal so that it cannot reveal a system api that requires READ_PRIVILEGED_PHONE_STATE" 2021-10-01 22:58:31 +00:00
Nazanin
b373dd0df2 make ril.cdma.inecmmode system property internal
so that it cannot reveal a system api that requires
READ_PRIVILEGED_PHONE_STATE

Bug: 183410189
Bug: 197722115
Test: adb shell getprop -Z
Change-Id: I65f4121fc300447af7d516676166bc8b0b53b727
Merged-In: I65f4121fc300447af7d516676166bc8b0b53b727
2021-10-01 21:36:49 +00:00
Justin Yun
7ad553f5d5 Define ro.vendor.api_level am: 785bb7a815
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1839637

Change-Id: I4dbca94dc1f04fac3fdbfd5b69ebd7621e6af93c
2021-10-01 03:32:50 +00:00
Daniele Di Proietto
dbbe5c034e Allow init to run perfetto
Bug: 201387964
Change-Id: I20bb6cd32b9b7d6e0be1ca1fef2bff6f9165bb04
2021-09-30 18:19:19 +01:00
Wonsik Kim
f648327a97 Add media.resolution.limit.32bit to media_config_prop
Bug: 194771349
Test: cts/media/device-small
Change-Id: I79cb1580604780e8829844cba2502d2196d93f27
2021-09-30 00:44:58 -07:00
Justin Yun
785bb7a815 Define ro.vendor.api_level
ro.vendor.api_level will have the api_level that the vendor images
are required to implement based on the various api level properties.

Bug: 200258600
Test: getprop ro.vendor.api_level
Change-Id: Ie4f71ef920f03bdbc0a904936c26f092429fcd7f
2021-09-29 15:34:19 +09:00
Yifan Hong
fb6d9ed006 Merge "/*_dlkm/etc is vendor_configs_file." am: a07b83c1c6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1838053

Change-Id: I06e95120d8643e276da8cd74c31ad645da118e49
2021-09-28 05:50:02 +00:00
Yifan Hong
a07b83c1c6 Merge "/*_dlkm/etc is vendor_configs_file." 2021-09-28 05:37:47 +00:00
Yifan Hong
0f4fb284d1 /*_dlkm/etc is vendor_configs_file.
For e.g. /vendor_dlkm/etc/NOTICE.xml.gz

Test: pass
Fixes: 201090220
Change-Id: I56e2bec26cad11e9919729410c7ee08683ea2f01
2021-09-27 13:33:22 -07:00
Nikita Ioffe
719dcf8a6d Merge "Cleanup sepolicy related to APEX pre/post-install hooks" am: 8d003bc3c0
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1830234

Change-Id: Ie36d5a58c783962b93436b60605ea7f838735931
2021-09-27 20:33:01 +00:00
Nikita Ioffe
8d003bc3c0 Merge "Cleanup sepolicy related to APEX pre/post-install hooks" 2021-09-27 20:16:54 +00:00
Jiakai Zhang
20c36de280 Merge "Remove dalvik.vm.dex2oat-updatable-bcp-packages-file from sepolicy." am: b9443cc3fa
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1832481

Change-Id: Idebce55dcf5f6cfe2c7a6eb5e695c9bf4b7018ed
2021-09-27 11:55:00 +00:00
Jiakai Zhang
e0f7873436 Remove dalvik.vm.dex2oat-updatable-bcp-packages-file from sepolicy.
This system properly is no longer needed.

Bug: 200241946
Test: Presubmits
Change-Id: I82258d7ccf125fd30655873a1b15582654dafac3
2021-09-27 09:15:17 +00:00
Yi-Yo Chiang
399ec6179f Merge "Reland: Add system_ext_userdebug_plat_sepolicy.cil for GSI" am: 866b3dcc80
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1834753

Change-Id: I6126d82676733d6b0fe06fc9f18daf8e47cc5f56
2021-09-24 03:25:31 +00:00
Yi-Yo Chiang
866b3dcc80 Merge "Reland: Add system_ext_userdebug_plat_sepolicy.cil for GSI" 2021-09-24 03:10:34 +00:00
Treehugger Robot
90bb8570f0 Merge "Enable odrefresh to work with composd." am: 8060cb5394
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1833396

Change-Id: I9225fe5b2ed4192a4e4c3735cdcc050ca75b1392
2021-09-23 16:04:04 +00:00
Yi-Yo Chiang
857ffc429f Reland: Add system_ext_userdebug_plat_sepolicy.cil for GSI
system_ext_userdebug_plat_sepolicy.cil is a copy of
userdebug_plat_sepolicy.cil (debug_ramdisk) that's installed in the
system_ext partition.
The build rule is gated by a BoardConfig variable, so products other
than GSI cannot accidentally install this module.

Bug: 188067818
Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash
  gsi_arm64-user from master, device can boot and `adb root` works
Change-Id: I75183e2dfdb434aee0b015b1627c9e23b4f3437f
2021-09-23 14:26:49 +00:00
Santiago Seifert
4ac3913fda Merge "Revert "Add system_ext_userdebug_plat_sepolicy.cil for GSI"" am: 007bd5b5be
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1834615

Change-Id: Ia815cd02d2a6cd3531d7547d1814a55e7992389d
2021-09-23 13:33:47 +00:00
Santiago Seifert
007bd5b5be Merge "Revert "Add system_ext_userdebug_plat_sepolicy.cil for GSI"" 2021-09-23 13:25:55 +00:00
Santiago Seifert
498df59c64 Revert "Add system_ext_userdebug_plat_sepolicy.cil for GSI"
Revert submission 1824717-gsi_debug_policy

Reason for revert: Breaks the build (see b/200933187).
Reverted Changes:
I37ef02628:Add a copy of debug policy to GSI system image
I9c3dad8bb:Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT
I43adc6ada:Add system_ext_userdebug_plat_sepolicy.cil for GSI...
I4d6235c73:Add /system_ext/etc/selinux/ to the debug policy s...

Change-Id: I22da171e7b6628cb4c5f28f316ee317fe28761c2
2021-09-23 13:07:25 +00:00
Alan Stokes
ec4a90f59c Enable odrefresh to work with composd.
composd spawns odrefresh in its usual domain. odrefresh then spawns
fd_server in a different domain, and makes binder calls back to
composd to perform individual compilation steps.

fd_server is fairly generic, and part of the virt APEX, but this
instance is specific to composd (e.g. it has access to ART files), so
I named the domain composd_fd_server.

Bug: 186126194
Test: Run composd_cmd, artifacts generated
Change-Id: I5a431dd00b5b396a67021c618fc6edcfb25aa21b
2021-09-23 12:03:30 +01:00
Yi-Yo Chiang
0cf2f3312e Merge "Add system_ext_userdebug_plat_sepolicy.cil for GSI" am: 55ff75d379
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1824717

Change-Id: I4e6f535d6a8fa479e2f039e773ba36bf7ef7956e
2021-09-23 10:15:16 +00:00
Yi-Yo Chiang
55ff75d379 Merge "Add system_ext_userdebug_plat_sepolicy.cil for GSI" 2021-09-23 10:07:10 +00:00