Commit graph

7566 commits

Author SHA1 Message Date
Felipe Leme
ba498b48bc Merge "Allow apps to read system_user_mode_emulation_prop." am: c696791a7f am: d221f197c2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2072574

Change-Id: I8e01bac1b7708cee593163c65bb64164059826f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 16:02:28 +00:00
Felipe Leme
b85242c00f Allow apps to read system_user_mode_emulation_prop.
As it's used by UserManager...

Test: sesearch --allow -s appdomain -t system_user_mode_emulation_prop $ANDROID_PRODUCT_OUT/vendor/etc/selinux/precompiled_sepolicy
Bug: 226643927

Change-Id: I1134a9e0b8ae758e3ebef054b96f9e3237a2401f
2022-04-21 18:49:12 -07:00
Mitch Phillips
a4e951b3bf Merge "[GWP-ASan] Add sysprop, allow shell and system apps to set it." am: 800e948e61 am: e3256e3d21 am: 41949ce19f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2040964

Change-Id: I93cc3b9a1ff2fe74bea47ed0e7898daf7fef4a4e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 19:18:20 +00:00
Mitch Phillips
800e948e61 Merge "[GWP-ASan] Add sysprop, allow shell and system apps to set it." 2022-04-21 18:12:43 +00:00
Alistair Delva
ce19c41b8f Merge "Adds GPU sepolicy to support devices with DRM gralloc/rendering" 2022-04-21 04:21:45 +00:00
Eric Biggers
02fbbfda85 Merge "vold.te: stop allowing use of keymaster HAL directly" am: 39b27b87ba am: 60ac375f3a am: bbbe7065ff
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2065468

Change-Id: I9608f3e7740358e5bc276596f6f2c793c40aa3b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 19:33:12 +00:00
Treehugger Robot
ab3bbb8f39 Merge "Remove obsolete rule allowing installd to use fsverity ioctls" am: 12399e945e am: 7fd8710e46 am: 765d9cbd6e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2065527

Change-Id: I8bb8dcc11ed364acf78ad34bc5e70e09b5f22d45
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:21:10 +00:00
Eric Biggers
20dcec9d16 Merge "Remove some FDE rules and update comments" am: b83a6d1168 am: fa1f9cb2b8 am: 1eacebf142
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2065887

Change-Id: I98e0e9f1c6131617119aa966bb88d7ec229b1d66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:14:22 +00:00
Eric Biggers
bf717e18f1 vold.te: stop allowing use of keymaster HAL directly
Since Android 12, vold goes through the keystore daemon instead of using
the keymaster HAL directly.  Therefore, the SELinux rules that allow
vold to use the keymaster HAL directly are no longer needed.

Bug: 181910578
Change-Id: I8ecc47530cba82128c869ffd2fed9009dd7d5e05
2022-04-19 21:57:18 +00:00
Treehugger Robot
12399e945e Merge "Remove obsolete rule allowing installd to use fsverity ioctls" 2022-04-19 20:49:43 +00:00
Jason Macnak
a93398051c Adds GPU sepolicy to support devices with DRM gralloc/rendering
... such as Cuttlefish (Cloud Android virtual device) which has a
DRM virtio-gpu based gralloc and (sometimes) DRM virtio-gpu based
rendering (when forwarding rendering commands to the host machine
with Mesa3D in the guest and virglrenderer on the host).

After this change is submitted, changes such as aosp/1997572 can
be submitted to removed sepolicy that is currently duplicated
across device/google/cuttlefish and device/linaro/dragonboard as
well.

Adds a sysfs_gpu type (existing replicated sysfs_gpu definitions
across several devices are removed in the attached topic). The
uses of `sysfs_gpu:file` comes from Mesa using libdrm's
`drmGetDevices2()` which calls into `drmParsePciDeviceInfo()` to
get vendor id, device id, version etc.

Bug: b/161819018
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
Merged-In: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
2022-04-18 17:30:56 -07:00
Jason Macnak
365024e53f Adds GPU sepolicy to support devices with DRM gralloc/rendering
... such as Cuttlefish (Cloud Android virtual device) which has a
DRM virtio-gpu based gralloc and (sometimes) DRM virtio-gpu based
rendering (when forwarding rendering commands to the host machine
with Mesa3D in the guest and virglrenderer on the host).

After this change is submitted, changes such as aosp/1997572 can
be submitted to removed sepolicy that is currently duplicated
across device/google/cuttlefish and device/linaro/dragonboard as
well.

Adds a sysfs_gpu type (existing replicated sysfs_gpu definitions
across several devices are removed in the attached topic). The
uses of `sysfs_gpu:file` comes from Mesa using libdrm's
`drmGetDevices2()` which calls into `drmParsePciDeviceInfo()` to
get vendor id, device id, version etc.

Ignore-AOSP-First: must be submitted in internal as a topic first to
                   avoid having duplicate definitions of sysfs_gpu
                   in projects that are only available in internal

Bug: b/161819018
Test: launch_cvd
Test: launch_cvd --gpu_mode=gfxstream
Change-Id: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
Merged-In: I4f7d4b0fb90bfeef72f94396ff0c5fe44d53510c
2022-04-18 12:56:38 -07:00
Eric Biggers
9bf0a0c141 Remove some FDE rules and update comments
Now that FDE (Full Disk Encryption) is no longer supported, the SELinux
policy doesn't need to support it.  Remove two rules that are no longer
needed.  Also update some comments that implied that other rules were
needed only because of FDE support, when actually they are still needed
for other reasons.  Finally, fix some outdated documentation links.

Bug: 208476087
Change-Id: I4e03dead91d34fcefdfcdc68d44dd97f433d6eaf
2022-04-15 21:06:51 +00:00
Eric Biggers
7be3e86f48 Remove obsolete rule allowing installd to use fsverity ioctls
The code that needed this was removed by https://r.android.com/1977357.

Bug: 120629632
Change-Id: I771a0f93b28c9b44715c718eaf534a8a65f2ae30
2022-04-15 01:03:28 +00:00
Xinyi Zhou
2c05b69417 Change nearby from system_api_service to app_api_service am: 791567ece6 am: 4bf6ea7727 am: 223c2b078b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2064652

Change-Id: I2dc8d8ceb3d4e5d82b81d1980579c63ca3ca5fff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 18:23:57 +00:00
Xinyi Zhou
791567ece6 Change nearby from system_api_service to app_api_service
This fixes CTS tests where NearbyManager is null because of SELinux is
in enforcing mode. Detailed explanation: https://docs.google.com/document/d/1CiGn7Vg6LYwrMFvWonuK3fhNDCG5Sm4uCvefkvqpDcY/edit?usp=sharing

NearbyManager APIs are using BLUETOOTH_PRIVILEDGED permission so only System apps can use them.

Fix: 228273869
Test: -m
Change-Id: I091fbea408cea52e934cb6a3917226fb1b2adbc4
2022-04-13 21:18:47 -07:00
Mitch Phillips
8cd32cd93e [GWP-ASan] Add sysprop, allow shell and system apps to set it.
Bug: 219651032
Test: atest bionic-unit-tests

Change-Id: Ic4804ce0e4f3b6ba8eb8d82aca11b400b45c03dc
2022-04-12 13:20:05 -07:00
Kalesh Singh
ae50165897 Merge changes from topic "mglru-exp" am: 6ba41462d5 am: 65164b314d am: 0c82758926
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2056411

Change-Id: I319daa2c5e8b58e67eb3f5685dfba87836cf5f20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 14:43:26 +00:00
Kalesh Singh
6ba41462d5 Merge changes from topic "mglru-exp"
* changes:
  Add sepolicy for Multi-Gen LRU sysfs control
  Add sepolicy for mglru_native flag namespace
2022-04-12 13:48:48 +00:00
Kalesh Singh
98f63495b2 Add sepolicy for Multi-Gen LRU sysfs control
init is allowed to enable/disable MG-LRU.

Bug: 227651406
Bug: 228525049
Test: setprop persist.device_config.mglru_native.lru_gen_config
Test: verify no avc denials in logcat
Change-Id: I20223f3628cb6909c3fd2eb2b821ff2d52202dd2
2022-04-08 13:37:50 -07:00
Lorenzo Colitti
ce493bd00d Merge "Connectivity Native AIDL interface Sepolicy" am: bf8af42bf5 am: 5ef1893f50 am: 4d7cd06a40
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1943988

Change-Id: I330642784c6fddd6949a55156d1fa6b198425a4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 22:36:20 +00:00
Lorenzo Colitti
bf8af42bf5 Merge "Connectivity Native AIDL interface Sepolicy" 2022-04-01 21:46:37 +00:00
Neha Pattan
1838513cca Merge "Sepolicy changes for adding new system service for AdServices." am: dcb324bdb3 am: e5d6614096 am: c5c329718a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2046744

Change-Id: I6f1d6ee7b30e7d6a5f26282268b4a56fa57cb873
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-01 19:33:33 +00:00
Neha Pattan
dcb324bdb3 Merge "Sepolicy changes for adding new system service for AdServices." 2022-04-01 18:38:07 +00:00
Andy Yu
1055581f7a Merge "Add label and permission for game_mode_intervention.list" am: 6a10d563ea am: e4e8932d22 am: 7c187abfea
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2045643

Change-Id: Iad6e7ea44a3c98823c7121e554764b64130cb620
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 20:27:27 +00:00
Andy Yu
6a10d563ea Merge "Add label and permission for game_mode_intervention.list" 2022-03-30 19:35:59 +00:00
Andy Yu
8337d04202 Add label and permission for game_mode_intervention.list
Bug: 219543620
Doc: go/game-dashboard-information-to-perfetto
Test: TBD
Change-Id: Ic6622aadef05e22c95d4ba739beed0e6fa1f3a38
2022-03-29 14:12:14 -07:00
Adam Shih
7357fdc82d Merge "suppress su behavior when running lsof" am: 8296a542fe am: 213d717fc4 am: 19863ea4df
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2044870

Change-Id: Ia4ec5d797c84663f5d772d170236173756f6f151
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 06:25:03 +00:00
Neha Pattan
64ef8be1de Sepolicy changes for adding new system service for AdServices.
Test: build
Bug: 216375107
Change-Id: I238ac3f8966ce05768aef17bd05217a9772cf2f3
2022-03-28 19:26:50 +00:00
Adam Shih
ae4dbf54d8 suppress su behavior when running lsof
Relevant error logs show up when dumpstate do lsof using su identity:
RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT);

This is an intended behavior and the log is useless for debugging so I
suppress them.
Bug: 226717429
Test: do bugreport with relevant error gone.
Change-Id: Ide03315c1189ae2cbfe919566e6b97341c5991bb
2022-03-28 05:55:41 +00:00
Mikhail Naganov
d08f5c240f Merge "Add AIDL audio HAL service to SEPolicy" am: 1704f61dcf am: ba497daa6c am: 3cb68e23a1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2040968

Change-Id: Ice3516fe2dc57fd35c0b2c67b8cf9e397e2d3018
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 23:24:33 +00:00
Mikhail Naganov
1704f61dcf Merge "Add AIDL audio HAL service to SEPolicy" 2022-03-25 22:23:40 +00:00
Treehugger Robot
ba6b6196ff Merge "Add search in bpf directory for bpfdomains" am: d796c9eb6c am: 383b9f8467 am: ffb744699e
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2034669

Change-Id: I9f0fe5f591f8195b96eb84a570507760581c2af8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:23:39 +00:00
Treehugger Robot
d796c9eb6c Merge "Add search in bpf directory for bpfdomains" 2022-03-25 20:32:15 +00:00
Treehugger Robot
c97d76e491 Merge "Remove media crash neverallow exception." am: 34f4ca820f am: a5003227d3 am: a7b911daf6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2027103

Change-Id: I1635dcb6ffd32050fa9f18f3f0163f4dda2d86b2
2022-03-24 12:21:29 +00:00
Treehugger Robot
34f4ca820f Merge "Remove media crash neverallow exception." 2022-03-24 11:22:39 +00:00
Mikhail Naganov
676da7273f Add AIDL audio HAL service to SEPolicy
This adds the two top interfaces: IConfig and IModule
to service context, allows the HAL service to call
Binder, and registers the example implementation
service executable.

Bug: 205884982
Test: m
Change-Id: I322e813c96123167ea29b6c25a08ec9677c9b4d1
2022-03-24 01:39:29 +00:00
Gary Jian
1527fda402 Merge "Allow system_app to access radio_config system properties" am: ee0b51e099 am: c19e667cbd am: b3c40d2a23
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2024724

Change-Id: Ia43175b3e4073a065c7ea7515216f5a1cc8e202d
2022-03-23 06:56:18 +00:00
Adam Shih
f3c203bd9f Merge "suppress su behavior when running lsof" am: 92f87ac0b9 am: 052730e12c am: f7de4bd498
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2038023

Change-Id: I6613f2d8da09ecbbe49052d95f1cb31837e0156b
2022-03-23 05:52:50 +00:00
Gary Jian
ee0b51e099 Merge "Allow system_app to access radio_config system properties" 2022-03-23 05:46:22 +00:00
Treehugger Robot
5f8eb928e9 Merge "Allow init to relabelto console_device" am: 3a8977155c am: 5cc5fc4d31 am: aecb8dbfb6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2035646

Change-Id: Ie53faddd95bdd5aa268d83f2cb31cf701d535710
2022-03-23 05:18:51 +00:00
Adam Shih
92f87ac0b9 Merge "suppress su behavior when running lsof" 2022-03-23 05:03:02 +00:00
Treehugger Robot
3a8977155c Merge "Allow init to relabelto console_device" 2022-03-23 04:29:53 +00:00
Adam Shih
643d2439c2 suppress su behavior when running lsof
Relevant error logs show up when dumpstate do lsof using su identity:
RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT);

This is an intended behavior and the log is useless for debugging so I
suppress them.

Bug: 225767289
Test: do bugreport with no su related avc errors
Change-Id: I0f322cfc8a461da9ffb17f7493c6bbdc58cce7b6
2022-03-23 10:52:00 +08:00
Ocean Chen
7eae0544a4 Merge "Add persist.device_config.storage_native_boot.smart_idle_maint_enabled property policies" am: b299b79473 am: eeeb06a4ee am: 1739c39853
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2030532

Change-Id: Ib7cf6da50ce19e543e10cd4c76be28f2190d5798
2022-03-23 02:47:01 +00:00
Ocean Chen
b299b79473 Merge "Add persist.device_config.storage_native_boot.smart_idle_maint_enabled property policies" 2022-03-23 01:51:08 +00:00
Shikha Malhotra
3a0a549d44 Merge "Added permission to allow for ioctl to be added to install_data_file" am: b00341ad1e am: 9e7c0e6ead am: 14218bf4d3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2030123

Change-Id: I02c2e50b2cc02dc5107643bb07d564dc3f214f25
2022-03-22 17:05:46 +00:00
Shikha Malhotra
b00341ad1e Merge "Added permission to allow for ioctl to be added to install_data_file" 2022-03-22 16:32:40 +00:00
Stephane Lee
a499a7a280 Merge "Add sepolicies to allow hal_health_default to load BPFs." am: 68e028b731 am: affee5160d am: 7529345cfd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2020276

Change-Id: I4265c46b275c8ad9d859b80f877f5173b23bd534
2022-03-22 16:11:51 +00:00
Stephane Lee
68e028b731 Merge "Add sepolicies to allow hal_health_default to load BPFs." 2022-03-22 15:29:20 +00:00
Inseob Kim
85091cd806 Allow init to relabelto console_device
Init will try restorecon /dev/console, together with /dev, at the second
stage boot.

Bug: 193118220
Test: atest MicrodroidHostTestCases
Change-Id: Ie9796368b54bb0773eabf5ff6feb2b4aa41d0bfa
2022-03-22 22:11:03 +09:00
Ocean Chen
63e6e1dc02 Add persist.device_config.storage_native_boot.smart_idle_maint_enabled property policies
Add policies to set persist.device_config.storage_native_boot.smart_idle_maint_enabled property.

Bug: 202283480
Bug: 181079477
Bug: 215443809
Change-Id: I998e6dca950a8ceebb5fbc39568e3e8d6b86e8ce
2022-03-22 08:33:40 +00:00
Yi-yo Chiang
6867f096c4 Merge "Add proc_cmdline read permission to read_fstab" am: bc3f8b3486 am: c58b9fc8ad am: 35386f8a93
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2033184

Change-Id: I194331fbf2393652784dfceb376530118d5235e6
2022-03-22 03:23:48 +00:00
Stephane Lee
b30e888b5c Add search in bpf directory for bpfdomains
Bug: 203462310
Test: Ensure that associated BPFs can be loaded
Change-Id: I317a890abb518cf4ac47cd089e882315434342ce
2022-03-21 17:31:17 -07:00
Stephane Lee
52862a32c1 Add sepolicies to allow hal_health_default to load BPFs.
Bug: 203462310
Test: Ensure that the BPF filter can be loaded
Change-Id: Ib507d4c1718dd56fb336501ed7598de7b44a687b
2022-03-21 12:54:49 -07:00
Yi-Yo Chiang
cdd95be894 Add proc_cmdline read permission to read_fstab
ReadDefaultFstab() calls fs_mgr_get_boot_config() which could read
/proc/bootconfig and /proc/cmdline.

Bug: 225310919
Test: TH presubmit
Change-Id: Ibe66a41d0d74d7b71dc70436af68b7a7eed721b6
2022-03-20 16:35:19 +08:00
Shikha Malhotra
7c81cab94e Added permission to allow for ioctl to be added to install_data_file
This is in addition to allowing setting of extended attributes (for project quota IDs) on files and dirs and to enable project ID inheritance through FS_IOC_SETFLAGS

Bug: b/215154615
Test: atest installd/StorageHostTest
Test: atest installd/installd_service_test.cpp
Change-Id: I769ae7ed110175dbb5d511a4345c57057d71ae64
2022-03-17 10:53:13 +00:00
Bram Bonne
b93f26fd89 Move sdk_sandbox sepolicy to AOSP.
Bug: 224796470
Bug: 203670791
Bug: 204989872
Bug: 211761016
Bug: 217543371
Bug: 217559719
Bug: 215105355
Bug: 220320098
Test: make, ensure device boots

Change-Id: Ia96ae5407f5a83390ce1b610da0d49264e90d7e2
Merged-In: Ib085c49f29dab47268e479fe5266490a66adaa87
Merged-In: I2215ffe74e0fa19ff936e90c08c4ebfd177e5258
Merged-In: I478c9a16032dc1f1286f5295fc080cbe574f09c9
Merged-In: Ibf478466e5d6ab0ee08fca4da3b4bae974a82db0
Merged-In: I5d519605d9fbe80c7b4c9fb6572bc72425f6e90a
Merged-In: I05d2071e023d0de8a93dcd111674f8d8102a21ce
Merged-In: I6572a7a5c46c52c9421d0e9c9fc653ddbd6de145
Merged-In: I1b6d1a778cb658bdfd930b684e4ba0640031b226
Merged-In: I9fb98e0caee75bdaaa35d11d174004505f236799
2022-03-17 10:22:33 +01:00
Jaegeuk Kim
9ca7b96fc3 SELinux policy for /dev/sys/block/by-name/rootdisk am: be66c59171 am: 7592330707 am: e1d9f6d0fe
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2006729

Change-Id: Iabc3077691cc91c6071761c474f3a8b9b2fa4e61
2022-03-16 23:22:21 +00:00
Jaegeuk Kim
be66c59171 SELinux policy for /dev/sys/block/by-name/rootdisk
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I550dfb5649ccb5ca61ea5abbf730bd84756f047e
2022-03-16 11:04:39 -07:00
Alan Stokes
807162fe31 Remove redundant sepolicy am: 7bde36e94e am: e61cf0a4a5 am: 7af9000b77
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2026608

Change-Id: Iede7911169de5d49d43b60b9a9211c8b7febf574
2022-03-16 10:06:50 +00:00
Steven Moreland
7fd8933f0c Remove media crash neverallow exception.
Unneeded.

Bug: N/A
Test: compile time
Change-Id: I0557794a33ae942bd7764d5e41515d7d4bb77ed6
2022-03-15 18:02:36 +00:00
Alan Stokes
7bde36e94e Remove redundant sepolicy
We don't use MLS in Microdroid, so we don't need MLS rules, nor
mlstrusted[subject|object] labels. (We keep one MLS rule to satisfy
checkpolicy.)

A lot of attributes are unused in Microdroid, so we can remove their
declarations and any references to them. (That may not make the
compiled policy smaller, since hopefully they get optimised out
anyway, but it means there is less policy for humans to deal with.)

Remove labels that relate only to apps, which we don't have - MAC
permissions, run-as, seapp_contexts.

In passing, fix a comment snafu in both system & microdroid policy.

Bug: 223596375
Test: Run staged-apex-compile & compos_verify, no denials
Test: atest MicrodroidTests MicrodroidHostTestCases
Change-Id: Ifd3589945a2d8b4c0361e00eec5678795513fd8c
2022-03-15 15:43:50 +00:00
Gary Jian
874dd08030 Allow system_app to access radio_config system properties
Bug: 220995034
Test: manual
Change-Id: Ib71e45c74b5f561ca40548de6aa36c5f7044ecd1
2022-03-15 14:58:03 +08:00
Carlos Llamas
f6be743d0e Merge "sepolicy: allow access to binderfs feature files" am: 82a5ceb80c am: 21d01b7bb6 am: bf8b11fe42
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1998993

Change-Id: I768ca3460466752d9d4dc19906f58e688cb5b750
2022-03-10 06:32:13 +00:00
Carlos Llamas
75821321c7 sepolicy: allow access to binderfs feature files
The binder driver now advertises the features it supports through
individual files under /dev/binderfs/features/*. Let all domains have
access to these files to determine how to interact with the driver.

Bug: 191910201
Tested: clients are able to read feature files via libbinder
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Ice5de9efee74e571ef0a23ce093af162fc3b276e
2022-03-09 08:55:10 -08:00
Shikha Malhotra
dec9767d04 Merge "Adding more permission for selinux to some attributes and flags" am: 2df2acd1e8 am: e790959c0f am: 41c72af5e3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1933140

Change-Id: Ib642508925521387cf911ab26e107f6de6fc9350
2022-03-09 10:48:01 +00:00
Shikha Malhotra
2df2acd1e8 Merge "Adding more permission for selinux to some attributes and flags" 2022-03-09 08:19:09 +00:00
Evan Rosky
45a0b3a858 Merge "Add a persist.wm.debug property type and associated permissions" am: bd4cd1ac70 am: ded5bd867f am: 9a2c7ceb13
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2005839

Change-Id: I2a56ce8dc08c16b3652387d57b12448c8a057310
2022-03-08 03:01:17 +00:00
Evan Rosky
5cfdf2bd6e Add a persist.wm.debug property type and associated permissions
This is intended for wm properties related to wmshell/sysui.
Using this context allows sysui to manipulate these properties
in debug builds.

Bug: 219067621
Test: manual
Change-Id: I5808bf92dbba37e9e6da5559f8e0a5fdac016bf3
2022-03-07 19:44:59 +00:00
Nikita Ioffe
1bd088d1d0 Merge "Rename SupplementalProcess to SdkSandbox" into tm-dev 2022-03-01 17:07:16 +00:00
Robert Shih
480ed0f632 Merge "Allow dumpstate to call dump() on drm hals" am: 9846fb4082 am: 5869511f62 am: d74671eba8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2000271

Change-Id: I57c2996ac08da6d456793a8f23cc733b70dcdeb2
2022-02-25 20:29:45 +00:00
Robert Shih
bf4d7522d7 Allow dumpstate to call dump() on drm hals
Bug: 220996660
Test: adb bugreport
Change-Id: I222c5e845d481dd9f3dcf796d50ca91c6174a023
2022-02-25 06:07:53 +00:00
Tyler Wear
691def4fd5 Connectivity Native AIDL interface Sepolicy
Sepolicy files for new ConnectivityNative service.
This is a new service implemented in java accessible from
native code. Stable aidl is used to avoid having to manually write
the unparcling code in two different languages. A new service is
required because there is no connectivity service in the system
server that exposes a stable aidl interface.

Bug: 179733303
Change-Id: If2372712a4a8ac7b0631a2195aabc910d1a829cc
2022-02-24 08:53:13 -08:00
Alan Stokes
acd6ba29f9 Allow piping console output to clients am: 23161e51cc am: d4f00ed894 am: dafeb398e6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1997006

Change-Id: I594edf2a21ace103f68cec5be2f6ddd036284d81
2022-02-24 10:58:27 +00:00
Nikita Ioffe
e2da633ef7 Rename SupplementalProcess to SdkSandbox
Ignore-AOSP-First: sepolicy is not in aosp, yet
Bug: 220320098
Test: presubmit
Change-Id: I9fb98e0caee75bdaaa35d11d174004505f236799
2022-02-23 20:44:20 +00:00
Alan Stokes
23161e51cc Allow piping console output to clients
Any virtualization service client should be able to use a pipe for the
VM log fds.

We previously had some support for this in crosvm (but appdomain is
the wrong label), but not for virtualizationservice. Instead I've
centralised it in the virtualizationservice_use macro so it applies to
exactly those things that can start a VM.

I've removed read permission from crosvm; it doesn't seem to be
needed, and logically it shouldn't be.

Test: Patch in https://r.android.com/1997004, see no denials
Change-Id: Ia9cff469c552dd297ed02932e9e91a5a8cc2c13f
2022-02-23 17:28:49 +00:00
Treehugger Robot
e69edec168 Merge "Allow hal_graphics_composer to write to a pipe We would like SurfaceFlinger to be able to create a pipe and provide the write-end to the graphics composer to dump debug info for dumpsys. Bug: 220171623 Test: atest VtsHalGraphicsComposer3_TargetTest Test: adb shell dumpsys SurfaceFlinger Test: adb shell dumpsys android.hardware.graphics.composer3.IComposer/default" am: 5beaf4adfb am: 8d1ef06ab3 am: 11b45863c9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1991020

Change-Id: Ie057e41548f3cb971e615e439944198e3db6b627
2022-02-22 19:14:09 +00:00
Shikha Malhotra
ddfb8a99cc Adding more permission for selinux to some attributes and flags
Test: atest installd/StorageHostTest
Test: atest installd/installd_service_test.cpp
Change-Id: I7a2d4055b7e4050394304a92279c595d2153da23
2022-02-19 14:35:55 +00:00
Ady Abraham
3f045e296e Allow hal_graphics_composer to write to a pipe
We would like SurfaceFlinger to be able to create a pipe and provide
the write-end to the graphics composer to dump debug info for dumpsys.
    
 Bug: 220171623
 Test: atest VtsHalGraphicsComposer3_TargetTest
 Test: adb shell dumpsys SurfaceFlinger
 Test: adb shell dumpsys android.hardware.graphics.composer3.IComposer/default

Change-Id: Ie2cbe76fb0d224235a8ea99f68a20e2139e1cc56
2022-02-19 01:09:41 +00:00
Thiébaud Weksteen
e7d529fed6 Merge "Associate hal_service_type with all HAL services" am: b18abcdd51 am: 71b8ad6234 am: 351e89d5d3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1987147

Change-Id: I7220245e469f58126ea4af0744690f907e9d2928
2022-02-18 10:07:48 +00:00
Thiébaud Weksteen
373cf3ba8e Associate hal_service_type with all HAL services
By default, HAL's services are not accessible by dumpstate. HIDL
implementations were silenced via a dontaudit on hwservice_manager. But
AIDL implementations will trigger a denial, unless authorized via
`dump_hal`. Mark all HAL services with a new attribute
`hal_service_type` so they can be ignored by dumpstate.

Test: m selinux_policy
Bug: 219172252
Change-Id: Ib484368fdeff814d4799792d57a238d6d6e965fd
2022-02-16 10:49:21 +11:00
Ramji Jiyani
982c6d39a2 Merge "system_dlkm: sepolicy: add system_dlkm_file_type" am: ba8615a186 am: 86cfb85d49 am: b925768cb3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1978574

Change-Id: I17438ed404b798434e5cee28981ebd2b78b48e98
2022-02-11 19:24:08 +00:00
Daniel Norman
d309c7225c Merge "Expose the APEX multi-install props to non-root getprop." am: ea98866236 am: 17327ac36a am: 004827ac14
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1965921

Change-Id: Ie247ac133be1573e4d8c3f1978b81e59729b4106
2022-02-11 19:23:55 +00:00
Ramji Jiyani
ba8615a186 Merge "system_dlkm: sepolicy: add system_dlkm_file_type" 2022-02-11 18:36:04 +00:00
Daniel Norman
ea98866236 Merge "Expose the APEX multi-install props to non-root getprop." 2022-02-11 18:25:27 +00:00
Ramji Jiyani
4a556890f9 system_dlkm: sepolicy: add system_dlkm_file_type
Add new attribute system_dlkm_file_type for
/system_dlkm partition files.

Bug: 218392646
Bug: 200082547
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I193c3f1270f7a1b1259bc241def3fe51d77396f3
2022-02-11 04:19:33 +00:00
Treehugger Robot
a77159c365 Merge changes from topic "revert-1979386-revert-1967140-EVS_sepolicy_updates_T-MBLQTXKQEY-UVTCTRHQWF" am: 48f59f9ec2 am: 33f3804491 am: 35d788475c am: 05ef2c2c88
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1978173

Change-Id: Id411487bab280f9c0e5d5f575ec8d9e3154fd447
2022-02-10 22:06:17 +00:00
Treehugger Robot
48f59f9ec2 Merge changes from topic "revert-1979386-revert-1967140-EVS_sepolicy_updates_T-MBLQTXKQEY-UVTCTRHQWF"
* changes:
  Revert^2 "Updates sepolicy for EVS HAL"
  Revert^2 "Adds a sepolicy for EVS manager service"
2022-02-10 20:50:42 +00:00
Changyeon Jo
eacb1095a8 Revert^2 "Updates sepolicy for EVS HAL"
418f41ad13

Bug: 216727303
Test: m -j selinux_policy on failed targets reported
      in b/218802298
Change-Id: Iec8fd2a1e9073bf3dc679e308407572a8fcf44d9
2022-02-10 17:21:54 +00:00
Changyeon Jo
8c12609bce Revert^2 "Adds a sepolicy for EVS manager service"
0137c98b90

Bug: 216727303
Test: m -j selinux_policy on failed targets reported
      in b/218802298
Change-Id: I2ae2fc85a4055f2cb7d19ff70b120e7b7ff0957d
2022-02-10 17:21:14 +00:00
Mohammed Rashidy
1ea99c86e9 Merge changes from topic "revert-1967140-EVS_sepolicy_updates_T-MBLQTXKQEY" am: 7f1eaf1b45 am: aa0cb606c3 am: 3bed79292e am: f1ea833625
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1979387

Change-Id: I8ad7455e22999359816e3e47dfcb5b95845a63e4
2022-02-10 12:32:56 +00:00
Mohammed Rashidy
5e3beea9bc Revert "Updates sepolicy for EVS HAL" am: 418f41ad13 am: 4d67e0d02b am: a46cbab128 am: 7f9b355e86
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1979386

Change-Id: I6e704950a709e76c8e2c5fdb3829487a4012f887
2022-02-10 12:32:54 +00:00
Mohammed Rashidy
4d67e0d02b Revert "Updates sepolicy for EVS HAL" am: 418f41ad13
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1979386

Change-Id: If3080898b802cf7551c01c9425499591b815da6b
2022-02-10 11:55:30 +00:00
Mohammed Rashidy
7f1eaf1b45 Merge changes from topic "revert-1967140-EVS_sepolicy_updates_T-MBLQTXKQEY"
* changes:
  Revert "Adds a sepolicy for EVS manager service"
  Revert "Updates sepolicy for EVS HAL"
2022-02-10 11:38:40 +00:00
Mohammed Rashidy
0137c98b90 Revert "Adds a sepolicy for EVS manager service"
Revert submission 1967140-EVS_sepolicy_updates_T

Reason for revert: triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=cf_x86_64_auto-userdebug&lkgb=8168894&lkbb=8168958&fkbb=8168947, bug b/218802298
Reverted Changes:
I730d56ab1:Allows hal_evs_default to read directories
I2df8e10f5:Updates sepolicy for EVS HAL
Ie6cb3e269:Adds a sepolicy for EVS manager service

Change-Id: I207c261bcf2c8498d937ab02c499bf709a5f1b15
2022-02-10 10:07:44 +00:00
Mohammed Rashidy
418f41ad13 Revert "Updates sepolicy for EVS HAL"
Revert submission 1967140-EVS_sepolicy_updates_T

Reason for revert: triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=cf_x86_64_auto-userdebug&lkgb=8168894&lkbb=8168958&fkbb=8168947, bug b/218802298
Reverted Changes:
I730d56ab1:Allows hal_evs_default to read directories
I2df8e10f5:Updates sepolicy for EVS HAL
Ie6cb3e269:Adds a sepolicy for EVS manager service

Change-Id: I1cc37b0e56646db61bdb34cb209aefe7376c5a50
2022-02-10 10:07:44 +00:00
Treehugger Robot
47f43ab23c Merge changes from topic "EVS_sepolicy_updates_T" am: 2cedd28cf9 am: 177cf20196 am: 85c9e1cf9e am: feb9f3f2c2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1967009

Change-Id: I112edf374e2b96e74f786897d580d396bec33c29
2022-02-10 08:52:51 +00:00
Maciej Żenczykowski
cd95bce516 Merge "bpfdomain: attribute for domain which can use BPF" am: 337e6b1e1c am: 960f03e7e6 am: 03fdb25b24 am: cefda06338
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1978573

Change-Id: Ie478be8bae6218b7b06c5df549acb9e780171818
2022-02-10 08:06:16 +00:00
Treehugger Robot
2cedd28cf9 Merge changes from topic "EVS_sepolicy_updates_T"
* changes:
  Updates sepolicy for EVS HAL
  Adds a sepolicy for EVS manager service
2022-02-10 08:02:04 +00:00
Changyeon Jo
a083d7a8d8 Updates sepolicy for EVS HAL
This CL updates hal_evs_default to be sufficient for the defautl EVS HAL
implementation and modifies other services' policies to be able to
communicate with EVS HAL implementations

Bug: 217271351
Test: m -j selinux_policy and Treehugger
Change-Id: I2df8e10f574d62f8b84e0ff0381656ab1b18b52f
2022-02-10 01:42:59 +00:00
Changyeon Jo
5c3bc58163 Adds a sepolicy for EVS manager service
Bug: 170401743
Bug: 216727303
Test: m -j selinux_policy and TreeHugger
Change-Id: Ie6cb3e269fc46a61b56ca93efd69fbc447da0e3d
2022-02-10 01:42:21 +00:00
Steven Moreland
6598175e06 bpfdomain: attribute for domain which can use BPF
Require all domains which can be used for BPF to be marked as
bpfdomain, and add a restriction for these domains to not
be able to use net_raw or net_admin. We want to make sure the
network stack has exclusive access to certain BPF attach
points.

Bug: 140330870
Bug: 162057235
Test: build (compile-time neverallows)
Change-Id: I29100e48a757fdcf600931d5eb42988101275325
2022-02-10 00:34:50 +00:00
Steven Moreland
706d6649bb Merge "Allow BPF programs from vendor." am: 2536bf9dac am: 4e83d24871 am: 75fba000fe am: 6ba9fb383f
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1189663

Change-Id: I7c2c05d981dac467a9dc1d4fe0c7486ade14141f
2022-02-09 18:33:39 +00:00
Steven Moreland
2536bf9dac Merge "Allow BPF programs from vendor." 2022-02-09 17:28:16 +00:00
Jayant Chowdhary
58c0794156 Merge "System wide sepolicy changes for aidl camera hals." am: b00bf9d282 am: 4c51fa993e am: f3ccb9095a am: 887847beaa
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1975831

Change-Id: If90113a972d3f96bed74db0ae65da50caff1afbf
2022-02-09 04:04:33 +00:00
Jayant Chowdhary
b00bf9d282 Merge "System wide sepolicy changes for aidl camera hals." 2022-02-09 03:08:37 +00:00
Steven Moreland
c27d24c37c Allow BPF programs from vendor.
Who needs all those context switches?

bpfloader controls which types of vendor programs can be used.

Bug: 140330870
Bug: 162057235
Test: successfully load bpf programs from vendor
Change-Id: I36e4f6550da33fea5bad509470dfd39f301f13c8
2022-02-08 22:46:54 +00:00
Treehugger Robot
9fb9dcf800 Merge "Add rule to allow servicemanager to call the hostapd service." am: 14db21eafa am: 5d45c0bc91 am: e026b73807 am: e1656b7cb0
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1975506

Change-Id: I93e9aeb113bda9950de8a139f7c1ee9fa65fbb3b
2022-02-08 21:12:04 +00:00
Gabriel Biren
d59d96c476 Add rule to allow servicemanager to call
the hostapd service.

Needed in order to allow hostapd to
receive a callback from servicemanager
when the active service count changes.

Bug: 213475388
Test: atest VtsHalHostapdTargetTest
Change-Id: I3a5ec8219d23227fab85325f90d8b4aee6c76973
2022-02-08 18:00:15 +00:00
Jayant Chowdhary
e3019be3db System wide sepolicy changes for aidl camera hals.
Bug: 196432585

Test: Camera CTS

Change-Id: I0ec0158c9cf82937d6c00841448e6e42f6ff4bb0
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2022-02-08 09:37:17 +00:00
Treehugger Robot
7693f8aff2 Merge "Allow VM clients access to hypervisor capability" am: 391f2b26fc am: eb03dcc59c am: 8f2e879b23 am: 67cd76be91
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1970590

Change-Id: I6f6bf1dca397ee20d7e025a50e3618933bc13c4d
2022-02-04 10:53:47 +00:00
Treehugger Robot
391f2b26fc Merge "Allow VM clients access to hypervisor capability" 2022-02-04 09:37:19 +00:00
Kevin Han
1c02210689 Merge "Extend visibility of hibernation service for CTS" am: 4d81dc33f8 am: 641d56be3f am: 461c5fd19d am: d9b5d64cdd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1966099

Change-Id: I2af8f4ff4785dc779a4ef375e3230ad06bb77ec1
2022-02-04 00:37:48 +00:00
Seth Moore
3f7ee1390e Add remotely provisioned key pool se policy am: a75cad0d0a am: 10ec76f621 am: 7a7ac7d5aa am: 38ed66df25
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1969539

Change-Id: If922ac778d3afbb210b284dfd167fc9212ef691f
2022-02-04 00:00:45 +00:00
Kevin Han
4d81dc33f8 Merge "Extend visibility of hibernation service for CTS" 2022-02-03 23:43:03 +00:00
Alan Stokes
3864ea8e4a Allow VM clients access to hypervisor capability
Clients of virtualization service use these properties to
determine whether normal and protected VMs are supported and tailor
their VM requests accordingly.

Bug: 217687661
Test: adb unroot; adb shell getprop | grep ro.boot.hypervisor
Change-Id: Ia1c017c2346217dbc45973cbfb5adbecabedf050
2022-02-03 12:18:11 +00:00
Seth Moore
a75cad0d0a Add remotely provisioned key pool se policy
Keystore now hosts a native binder for the remotely provisioned key
pool, which is used to services such as credstore to lookup remotely
provisioned keys.

Add a new service context and include it in the keystore services.

Add a dependency on this new service for credstore. Also include a
credstore dependency on IRemotelyProvisionedComponent, as it's needed
to make use of the key pool.

Bug: 194696876
Test: CtsIdentityTestCases
Change-Id: I0fa71c5be79922a279eb1056305bbd3e8078116e
2022-02-02 15:07:26 -08:00
Treehugger Robot
a068287a1e Merge "Adds selinux rules for ICarDisplayProxy service" am: 108fdbc5f7 am: 8a96be8df9 am: 2ac9d08d7e am: baebbb72fd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1965562

Change-Id: Id6c66d646e8ee01db0250097c3cd967c2be8ecfe
2022-01-31 22:49:41 +00:00
Treehugger Robot
108fdbc5f7 Merge "Adds selinux rules for ICarDisplayProxy service" 2022-01-31 21:52:46 +00:00
Changyeon Jo
66eba13833 Adds selinux rules for ICarDisplayProxy service
Bug: 170401743
Test: m -j selinux_policy
Change-Id: Idf3f09d0bcf24de18d6eddb05e51991b4c5edbe8
2022-01-31 19:40:20 +00:00
Kevin Han
4ef3178e8c Extend visibility of hibernation service for CTS
Expand the visibility of the app hibernation service so that CTS can
actually test the APIs.

Bug: 216383448
Test: atest AppHibernationIntegrationTest
Change-Id: Ibde79c9b7e2d863a7c8f4f311ec008cd72962d45
2022-01-28 18:48:56 -08:00
Daniel Norman
2d1c5129d9 Expose the APEX multi-install props to non-root getprop.
Used for *TS testing to ensure that user devices do not multi-install
APEXes.

Bug: 216852347
Test: (non root) getprop | grep ro.boot.vendor.apex
Change-Id: Ibc670fefbf89c4a4c1fa5d2ab9d7784c04946690
2022-01-28 16:16:12 -08:00
Robert Shih
5c11b33da4 Merge "Add sepolicy for DRM AIDL HAL" am: d70f0af2bf am: 0de1ba742a am: 77bf16ed0d am: 7295a03aec
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1918837

Change-Id: I116a39f718ce3d71dea6318191acd57aae8874a6
2022-01-28 19:55:47 +00:00
Robert Shih
4968374205 Add sepolicy for DRM AIDL HAL
Bug: 208486736
Test: atest VtsAidlHalDrmTargetTest
Change-Id: Ia2b1488a564d94384d183d30291fbf5a6d2df4ab
2022-01-27 01:51:05 -08:00
Treehugger Robot
37cb5c0ee8 Merge "Move mtectrl to private" am: 6003019fa8 am: d0a3b18e55 am: b709430731 am: e4548984ba
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1958841

Change-Id: I0b25d2d45a17835d9c7a9d68356c48ed860b96f9
2022-01-26 10:34:36 +00:00
Treehugger Robot
6003019fa8 Merge "Move mtectrl to private" 2022-01-26 09:30:59 +00:00
Inseob Kim
3bd63cc206 Move mtectrl to private
Because mtectrl is a system internal domain, and we don't need to expose
the type to vendor.

Test: build and boot
Change-Id: Idb5c4a4c6f175e338722971944bf08ba99835476
2022-01-26 08:59:55 +09:00
Etienne Ruffieux
465106bff0 Merge "Added new context declaration for Bluetooth configs" am: 0a19dbdcd3 am: e1da066e3d am: f38dd0b771 am: d30f5d496b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1944887

Change-Id: I676b1f2500ecfa67a0cfa91b7d3ed5d88ff65223
2022-01-25 15:21:01 +00:00
Etienne Ruffieux
0a19dbdcd3 Merge "Added new context declaration for Bluetooth configs" 2022-01-25 14:00:08 +00:00
Treehugger Robot
65a4373bac Merge "Add use_bionic_libs macro" am: d9befdb685 am: 138fc583dd am: bc453f9d64 am: b01c8b042c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1956088

Change-Id: I6aefefde61153e5aba8da505cc3e630f7ed123d4
2022-01-25 05:38:55 +00:00
Treehugger Robot
d9befdb685 Merge "Add use_bionic_libs macro" 2022-01-25 04:37:07 +00:00
Paul Hu
d4a42947c3 Merge "Add sepolicy for mdns service" am: 415a2f9b58 am: 1f935d64bf am: dc91d13405 am: 5f1b07275c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1916037

Change-Id: Ibad85dfc0da838419d71f5a466d77152eb837e5d
2022-01-25 03:40:42 +00:00
Paul Hu
415a2f9b58 Merge "Add sepolicy for mdns service" 2022-01-25 02:35:42 +00:00
Hunsuk Choi
dfbaf937fc Merge "Combining hal_radio_*_service into hal_radio_service" am: 5c27113222 am: f3e65b463f am: 13a711981a am: adee6a673c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1958840

Change-Id: Ifbf8a50deaa0b5c61d5ee70eb5ed81d1cf0b0ebc
2022-01-25 01:52:56 +00:00
Etienne Ruffieux
bde2fc6c48 Added new context declaration for Bluetooth configs
As we need to create new sysprops for Bluetooth mainline
configs, we need to have a property context available to
vendors and be able to access configs from other packages.

Tag: #feature
Bug: 211570675
Test: Added overlays and logs
Change-Id: If9c61f251578b61c070619069519e0aa563a9573
2022-01-25 01:18:05 +00:00
Jiyong Park
16c1ae3a3d Add use_bionic_libs macro
... to dedupe rules for allowing access to bootstrap bionic libraries.

Bug: N/A
Test: m
Change-Id: I575487416a356c22f5f06f1713032f11d979d7d4
2022-01-25 09:47:56 +09:00
Hunsuk Choi
7938201cbb Combining hal_radio_*_service into hal_radio_service
Test: build and flash
Bug: 198331673
Change-Id: Id5d699ffc77f708e2144ffea6d2a6805822e7f50
2022-01-24 19:42:42 +00:00
paulhu
70b0a77ee0 Add sepolicy for mdns service
mdns service is a subset of netd-provided services, so it gets
the same treatment as netd_service or dnsresolver_service

Bug: 209894875
Test: built, flashed, booted
Change-Id: I33de769c4fff41e816792a34015a70f89e4b8a8c
2022-01-25 00:50:21 +08:00
George Chang
32a844da1f Merge "Add hal_nfc_service" am: 95113bbbed am: c3c16ea2b2 am: a0cae343bb am: 90e0a6832a
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1878147

Change-Id: I81761b15b3342d18cb2f11d588757a936da5979d
2022-01-22 02:57:37 +00:00
George Chang
95113bbbed Merge "Add hal_nfc_service" 2022-01-22 01:46:41 +00:00
Sharon Su
2a5d8ecd56 Merge "Change in SELinux Policy for wallpaper effects generation API. Test: presubmit tests" am: 0cd7ba7617 am: 1da3471495 am: 2ca8a20307 am: e4fd25aa8d
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1955283

Change-Id: If5e653764f71e4f7f3f3d500158c88023f3147c0
2022-01-22 01:00:35 +00:00
Treehugger Robot
5929ac1cf0 Merge "Add sepolicy for IInputProcessor HAL" am: c23930818d am: e12bcb296e am: 4bec13cf50 am: 94ba617915
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1945423

Change-Id: I471ae65938d4088d05adb4aa0c1a28dc8e9022ad
2022-01-22 00:12:18 +00:00
Sharon Su
0cd7ba7617 Merge "Change in SELinux Policy for wallpaper effects generation API. Test: presubmit tests" 2022-01-22 00:06:00 +00:00
Treehugger Robot
c23930818d Merge "Add sepolicy for IInputProcessor HAL" 2022-01-21 22:45:52 +00:00
Florian Mayer
27cd44ab1f Merge "Add policy for command line tool to control MTE boot state." am: 06337c4260 am: 7aaa59df0a am: 1a3afc5428 am: 95d03982f1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1954938

Change-Id: Iafb5a1db2e7bdda1c03c2a623e72a7f8e1df2cfb
2022-01-21 19:15:44 +00:00
Florian Mayer
06337c4260 Merge "Add policy for command line tool to control MTE boot state." 2022-01-21 18:11:00 +00:00
Sharon Su
cedde105ae Change in SELinux Policy for wallpaper effects generation API.
Test: presubmit tests

Change-Id: I02f9545376534d1570cfa270dfe15c9df6f81d47
2022-01-21 09:28:49 +00:00
Badhri Jagan Sridharan
51033ba97d Merge "Add selinux rules for android.hardware.usb.IUsb AIDL migration" am: 001b47c547 am: b0c62dd704 am: 289ec8f593 am: acfd07d0c3
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1955730

Change-Id: I85a53a5b7a1d4dc44b590bb7f07be27583250f3a
2022-01-21 06:23:52 +00:00
Badhri Jagan Sridharan
001b47c547 Merge "Add selinux rules for android.hardware.usb.IUsb AIDL migration" 2022-01-21 05:33:33 +00:00
Treehugger Robot
3b907b9cba Merge "Make NearbyManager available as System API." am: 8d149e3294 am: 2fd7deb6bb am: e653f44c15 am: 48ba970044
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1955856

Change-Id: Id7b815a4aa7dcd91b901452899ae65fb2f8eadf4
2022-01-21 02:18:34 +00:00
Treehugger Robot
8d149e3294 Merge "Make NearbyManager available as System API." 2022-01-21 01:18:27 +00:00
Siarhei Vishniakou
c655bece6a Add sepolicy for IInputProcessor HAL
This sepolicy is needed so that the vendor can launch a new HAL process,
and then this HAL process could join the servicemanager as an impl for
IInputProcessor. This HAL will be used to contain the previous impl of
InputClassifier and also new features that we are going to add.

Bug: 210158587
Test: use together with a HAL implementation, make sure HAL runs
Change-Id: I476c215ad622ea18b4ce5cba9c07ae3257a65817
2022-01-20 23:40:05 +00:00
Badhri Jagan Sridharan
c887ea3965 Add selinux rules for android.hardware.usb.IUsb AIDL migration
Covers the rules needed for the default AIDL implementation.

Bug: 200993386
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Change-Id: Ib152d12686e225e3c1074295a70c624a5115e9bd
2022-01-20 23:03:26 +00:00
John Reck
10056b058a Merge "Add IAllocator stable-aidl" am: 423f4c7e93 am: 94f409898b am: d22fb4ed68 am: 2abe31e7a9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1953816

Change-Id: I1af9325c0cc2b08b098912fa86c33c0060f741e6
2022-01-20 18:19:38 +00:00
Florian Mayer
23173455ab Add policy for command line tool to control MTE boot state.
Bug: 206895651

Change-Id: I2e84193668dcdf24bde1c7e12b3cfd8a03954a16
2022-01-20 17:30:09 +00:00
Eric Lin
3d482ca579 Make NearbyManager available as System API.
As the Fastpair in Mainline Module design, we intend to let OEM to:
* Support Fast Pair initial pairing by setting up its own server to
  sync and serve certified Fast Pair devices’ metadata.
* Support Fast Pair subsequent pairing by associating already
  paired Fast Pair devices to OEM’s accounts.
We also want to migrate GMS Fast Pair to use this mainline
implementation in the future and let our test signed with "platform"
can access to the NearbyManager.
Therefore, we need to make NearbyManager available as System API.

Bug: 214495869
Test: build, flash, boot, check "nearby_service" available for "privileged apps"
Change-Id: Icda959a33ba61eb39a3b584fc3b7a8b340fba11e
2022-01-20 07:54:36 +00:00
George Chang
0ddfebb4e1 Add hal_nfc_service
Bug: 204868826
Test: atest VtsAidlHalNfcTargetTest
Change-Id: If01d1d0a74f5c787805d3744772d40a7aa7db9cb
2022-01-20 03:48:57 +00:00
John Reck
22903f0435 Add IAllocator stable-aidl
Test: Builds & boots; no sepolicy errors logged
Bug: 193558894
Change-Id: I11e162310548b67addc032ccc0d499cbf391e7f9
2022-01-18 19:40:26 -05:00
Gabriel Biren
5ef7ddaa84 Merge "Add supplicant service to the dumpstate exceptions and dontaudit lists." am: 8f86dd4eef am: 827400d274 am: 7fc39bd6e4 am: 99adbe20c6
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1949457

Change-Id: Iddff2dbf4ef0719cd629101e6910141a0c5b0b80
2022-01-18 19:31:23 +00:00
Gabriel Biren
8f86dd4eef Merge "Add supplicant service to the dumpstate exceptions and dontaudit lists." 2022-01-18 18:15:46 +00:00
Gabriel Biren
3d0529483b Add supplicant service to the dumpstate
exceptions and dontaudit lists.

wpa_supplicant does not have a dump() method, so
dumpstate shouldn't need to access this HAL.

Bug: 213616004
Test: Treehugger tests
Change-Id: I5a0d80725434b56c9663948c3727faea9fb38db6
2022-01-14 17:17:31 +00:00
Nikita Ioffe
d599bbc6b1 Merge "Move allow rules from public/app.te to private/app.te" 2022-01-14 13:10:05 +00:00
Nikita Ioffe
269e7cfc51 Move allow rules from public/app.te to private/app.te
Allow rules in public/*.te can only reference types defined in
public/*.te files. This can be quite cumbersome in cases a rule needs to
be updated to reference a type that is only defined in private/*.te.

This change moves all the allow rules from public/app.te to
private/app.te to make it possible to reference private types in the
allow rules.

Bug: 211761016
Test: m
Test: presubmit
Change-Id: I0c4a3f1ef568bbfdfb2176869fcd92ee648617fa
Merged-In: I0c4a3f1ef568bbfdfb2176869fcd92ee648617fa
2022-01-13 22:56:14 +00:00
Jeremy Meyer
84558678f9 Merge "Add resources_manager_service" am: 0f72360b2f am: bebb429e43 am: 4833a09ba8 am: 81670747b9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1944288

Change-Id: I8c867849177c82a0d7cb53b0d9589c521880fe9b
2022-01-12 21:46:53 +00:00
Jeremy Meyer
0f72360b2f Merge "Add resources_manager_service" 2022-01-12 20:41:28 +00:00
Treehugger Robot
bbff680a61 Merge "Make virtual_device_service accessible from CTS" am: b4cc3b36f4 am: 5af1fc8bef am: 80675f15e2 am: d8c42d9b94
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1912337

Change-Id: If24b93113d6d592264e9170141094baaf903562c
2022-01-12 19:02:35 +00:00
Maurice Lam
2e38cfa2f7 Make virtual_device_service accessible from CTS
This is safe because methods in VirtualDeviceManager are guarded by
the internal|role permission CREATE_VIRTUAL_DEVICE, and all subseuqent
methods can only be called on the returned binder.

Fixes: 209527778
Test: Manual
Change-Id: I60a5cf76eec1e45803cf09ab4924331f7c12ced4
2022-01-11 13:21:14 -08:00
Michael Rosenfeld
1f6be21071 Merge "Allow the shell to disable charging." am: 30aace3ebe am: bd58116534 am: dea57851db am: f964ce2aeb
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1899603

Change-Id: I5484c107deaac519ec0b38c92899596771998cf4
2022-01-10 23:08:18 +00:00
Jeremy Meyer
d8a3c2b156 Add resources_manager_service
Test: manual, calling the service with `adb shell cmd` works
Bug: 206615535
Change-Id: I8d3b945f6abff352991446e5d88e5a535a7f9ccf
2022-01-10 23:03:42 +00:00
Michael Rosenfeld
5425c870f9 Allow the shell to disable charging.
Bug: 204184680
Test: manual and through instrumentation
Change-Id: I1fe9b35d51140eccba9c05c956875c512de447b1
2022-01-10 10:36:01 -08:00
Nikita Ioffe
eb833f0b5d Move allow rules from public/app.te to private/app.te
Allow rules in public/*.te can only reference types defined in
public/*.te files. This can be quite cumbersome in cases a rule needs to
be updated to reference a type that is only defined in private/*.te.

This change moves all the allow rules from public/app.te to
private/app.te to make it possible to reference private types in the
allow rules.

Ignore-AOSP-First: resolving merge conflict
Bug: 211761016
Test: m
Test: presubmit
Change-Id: I0c4a3f1ef568bbfdfb2176869fcd92ee648617fa
2022-01-07 03:22:01 +00:00
Xinyi Zhou
ad7ee9515c Merge "Allow system app to find NearbyManager" am: b6a6ff20ef am: ee85803987 am: 82606f8c6b am: 38da50d9ba
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1937217

Change-Id: Ic7bfe94398b6253528cb34688e2028e353c5f477
2022-01-06 20:53:41 +00:00
Xinyi Zhou
e9857ab5cf Allow system app to find NearbyManager
Bug: 189954300
Test: -build, flash, boot
Change-Id: Ia21b10213311b0639f320b559e78963d562f30a3
2022-01-05 11:57:44 -08:00
Treehugger Robot
18685b63db Merge "Make surface_flinger_native_boot_prop a system_restricted_prop for ADPF" am: 96c5222c94 am: 6cd97931e3 am: be132f1e8a am: 8bf0d2c1dc
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1931900

Change-Id: Iaa106a0ef7f4404b596b571a2e709b106e706558
2021-12-28 01:53:33 +00:00
Treehugger Robot
96c5222c94 Merge "Make surface_flinger_native_boot_prop a system_restricted_prop for ADPF" 2021-12-28 00:54:22 +00:00
Matt Buckley
964c68b02d Make surface_flinger_native_boot_prop a system_restricted_prop for ADPF
Test: manual
Bug: b/195990840
Change-Id: Icb758c48a1faa8901a1d2c2c442451c42fc3b5b1
2021-12-27 18:24:12 +00:00
Devin Moore
e966a379b7 Merge "Add policy for new AIDL IR hal" am: 4f85138c08 am: 4e044e5893 am: 570c442620 am: 6026ac4077
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1886401

Change-Id: Ia75ace8881d2761443b63b853558452c2b8d5eed
2021-12-22 22:52:58 +00:00
Devin Moore
4f85138c08 Merge "Add policy for new AIDL IR hal" 2021-12-22 21:44:17 +00:00
Hui Wu
a3a0a6aa0e Merge "Changes in SELinux Policy for cloudsearch API" am: c66fb7aefc am: 39e16393b7 am: 9f75793c0f am: 82f06faacd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1927577

Change-Id: Id9b1d96e40f6c1687b8e844febc24603a3dfdb90
2021-12-17 04:39:08 +00:00
Hui Wu
c66fb7aefc Merge "Changes in SELinux Policy for cloudsearch API" 2021-12-17 03:04:08 +00:00
Devin Moore
978b9e5d1c Add policy for new AIDL IR hal
IR interface is converted to AIDL and this contains the necessary
permissions for the default service to serve the interface.

Test: atest VtsHalIrTargetTest hal_implementation_test
Test: check for permission issues after tests
Bug: 205000342
Change-Id: I8d9d81d957bf6ef3c6d815ce089549f8f5337555
2021-12-16 20:24:27 +00:00
Hui Wu
f3e29c7066 Changes in SELinux Policy for cloudsearch API
Bug: 210528288
Test: Presubmit Tests

Change-Id: I344d28a95bf7d466620fced9cc85b50bbfcd1947
2021-12-16 19:31:53 +00:00
Treehugger Robot
f2bd40a55d Merge "Add rule for new gesture_prop." am: ac9f469ff0 am: 29be9a0edf am: f3ece72da2 am: 497884ce80
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1918579

Change-Id: Iaffb9425d5c34afd898f2dc44a79801093d912d5
2021-12-15 06:15:05 +00:00
Treehugger Robot
ac9f469ff0 Merge "Add rule for new gesture_prop." 2021-12-15 05:03:42 +00:00
Super Liu
078141a921 Add rule for new gesture_prop.
Bug: 209713977
Bug: 193467627
Test: local build and manual check.
Signed-off-by: Super Liu <supercjliu@google.com>
Change-Id: Ib1d2d6dcc7d6ddc6243c806a883d9252d7c081af
2021-12-15 09:32:01 +08:00
Rafay Kamran
b8e41c33da Merge "Initial sepolicy for supplemental process" 2021-12-13 14:19:08 +00:00
Treehugger Robot
82c5365ef2 Merge "Add hal_vehicle_service for AIDL VHAL service." am: 885bc3ca66 am: e197d7519c am: 908395f200 am: 2880a5cd82
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1914197

Change-Id: Ie8a90a36917c63a64e80dad6078fe62b81421bb0
2021-12-11 02:16:52 +00:00
Treehugger Robot
885bc3ca66 Merge "Add hal_vehicle_service for AIDL VHAL service." 2021-12-11 00:49:12 +00:00
Joanne Chung
c8bd82fea5 Add rule for new system service am: eed1918f7f am: f9637630c6 am: 025b236f3b am: 89a1a242a9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1891636

Change-Id: Ib4aa58bd2fb5f989bcf517735c382ed92acaefee
2021-12-10 10:03:11 +00:00
Joanne Chung
eed1918f7f Add rule for new system service
Update policy for new system service, used for Apps to present the
toolbar UI.

Bug: 190030331
Bug: 205822301
Test: manual. Can boot to home and get manager successfully.

Change-Id: Iee88681a93ae272a90896ccd2a6b64c26c809e82
2021-12-10 13:30:55 +08:00
Treehugger Robot
5e4344494e Merge "Add charger_vendor type" am: 0ce3e70c84 am: 9f386d408d am: 246b50221e am: e1a8cb87f1
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1870393

Change-Id: I17d6a340f7e0975ca678e1aff15f5e1a945bc006
2021-12-10 03:34:43 +00:00
Treehugger Robot
0ce3e70c84 Merge "Add charger_vendor type" 2021-12-10 02:16:55 +00:00
Chris Weir
db4bf99faa Merge "Give Netlink Interceptor route_socket perms" am: b7ed015cd8 am: e2040a2f81 am: 911a3d8a88 am: a5a6a79410
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1907018

Change-Id: Id826869669bd16d1c1bea5a3408e0b0212ba41e4
2021-12-09 02:56:12 +00:00
Chris Weir
b7ed015cd8 Merge "Give Netlink Interceptor route_socket perms" 2021-12-09 01:52:32 +00:00
Yifan Hong
dea55126b3 Merge changes from topic "fastbootd-health-aidl" am: 71d99f1316 am: 9d822c3f9a am: 204c9eed02 am: 213137ecb2
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1913615

Change-Id: Id6444b31b48fd89be1b90b90b1bd32d5d33078b4
2021-12-08 08:27:40 +00:00
Yu Shan
78be3081e7 Add hal_vehicle_service for AIDL VHAL service.
Add selinux policy for AIDL Vehicel HAL service.
This CL mostly follows https://android-review.googlesource.com/c/platform/system/sepolicy/+/1541205/.

Test: Manually test on emulator, verify AIDL VHAL service is up and
accessible by client.
Bug: 209718034

Change-Id: Icad92e357dacea681b8539f6ebe6110a8ca8b357
2021-12-07 22:23:50 -08:00
Yifan Hong
035ce4b7f4 Add charger_vendor type
This is the context when health HAL runs in offline
charging mode.

This has the same permissions as the health HAL, but
is also able to do charger specific things.

Also restrict neverallow rules in charger_type.

Test: manual in offline charging mode
Bug: 203246116
Change-Id: I6034853c113dff95b26461153501ad0528d10279
2021-12-07 16:24:23 -08:00
Yifan Hong
adc0f709b6 recovery/fastbootd: allow to talk to health HAL.
- Allow to use binder.
- Allow to talk to health HAL.

Test: manual in recovery
Test: fastboot getvar battery-voltage
Bug: 177269435
Change-Id: Ic3b1619ac34a10cb6007b8e011a01841343e9e8b
2021-12-07 16:22:53 -08:00
Yifan Hong
259491ba0b servicemanager: allow to read VINTF files in recovery.
Test: manual
Bug: 206888109
Change-Id: I2b7f0f33c27beb0d4401d1d697fdc58e7c62986f
2021-12-07 16:22:53 -08:00
Yifan Hong
10464a67b3 Merge "recovery: allow to talk to health HAL." am: d725f8acaf am: 3a4f392ce3 am: 51f741fb42 am: e34b04f5d8
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1907020

Change-Id: I01021df10202b38d8c72c4432cb2e6c6c096140b
2021-12-07 19:27:40 +00:00
Yifan Hong
d725f8acaf Merge "recovery: allow to talk to health HAL." 2021-12-07 18:18:07 +00:00
RafayKamran
eaa18ce0aa Initial sepolicy for supplemental process
Almost 1:1 of the sepolicy for ephemeral apps

Test: make

Bug: 203670791
Ignore-AOSP-First: Feature is developed in internal branch

Change-Id: Ib085c49f29dab47268e479fe5266490a66adaa87
2021-12-06 14:36:08 +00:00
Treehugger Robot
ef31d40f68 Merge "Add logd.ready" am: f5646ff42b am: 9a922c3ce2 am: cfc47ad673 am: 20b9fca8e9
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1895329

Change-Id: Ic350fbdc8163003ee3e9c96f56fc75e162338330
2021-12-02 04:44:03 +00:00
Treehugger Robot
f5646ff42b Merge "Add logd.ready" 2021-12-02 03:34:00 +00:00
Kedar Chitnis
d0132d8c3a Merge "Update sepolicy to add dumpstate device service for AIDL HAL" am: bb0315bab9 am: 3591bd6749 am: e09c5cdd49 am: 3f32fe230b
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1895075

Change-Id: I2334cebf812c6069fcc88d66882b85da2521ff75
2021-12-01 13:12:57 +00:00
Kedar Chitnis
bb0315bab9 Merge "Update sepolicy to add dumpstate device service for AIDL HAL" 2021-12-01 12:16:33 +00:00
Chris Weir
7129b929e3 Give Netlink Interceptor route_socket perms
VTS for Netlink Interceptor needs access to netlink_route_socket, and
other services routing traffic to Netlink Interceptor may as well.

Bug: 201467304
Test: VtsHalNetlinkInterceptorV1_0Test
Change-Id: Ic52e54f1eec7175154d2e89e307740071b1ba168
2021-12-01 04:08:19 +00:00
Yifan Hong
0ad8b6a1d2 recovery: allow to talk to health HAL.
On non-A/B devices, recovery needs to check if battery
is okay before applying the update. This requires
talking to the AIDL health HAL if the device uses
AIDL health HAL.

Test: manually calling GetBatteryInfo and check for denials
Bug: 170338625
Bug: 177269435
Change-Id: Ia89353cfff023376a4176c0582312bdcab00b5e6
2021-11-30 16:44:42 -08:00
Jiyong Park
ff3048349a Add logd.ready
logd.ready is a system property that logd sets when it is ready to
serve incoming socket requests for reading and writing logs. Clients of
logd (e.g. logcat) can use this to synchronize with logd, otherwise they
may experience a crash due to the refused socket connection to logd when
they are started before logd is ready.

Bug: 206826522
Test: run microdroid. see logcat logs are shown immediately
Change-Id: Iee13485b0f4c2beda9bc8434f514c4e32e119492
2021-11-30 15:10:53 +09:00
Paul Lawrence
04cddf8af2 Merge "Allow bpfloader to read fuse's bpf_prog number" 2021-11-29 16:18:42 +00:00
Kedar Chitnis
a465cbc194 Update sepolicy to add dumpstate device service for AIDL HAL
- Add hal_dumpstate_service AIDL service to hal_dumpstate.te,
  service.te
- Add default example hal_dumpstate service to file_contexts,
  service_contexts
- Adde hal_dumpstate_service to API level 31 compatibility
  ignore list (31.0.ignore.cil)

Bug: 205760700
Test: VtsHalDumpstateTargetTest, dumpstate, dumpstate_test, dumpsys
Change-Id: If49fa16ac5ab1d3a1930bb800d530cbd32c5dec1
2021-11-25 07:52:32 +00:00
Jack Yu
0b373e5fde Merge changes from topic "OMAPI_VNTF" am: b25774f53c am: 55cd3d5260 am: 9c4918ca8d am: 256bb6d01c
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/1897109

Change-Id: I87e2bfe890a79171ef7ca57a50fbe39a87d695e3
2021-11-23 06:00:30 +00:00
Rajesh Nyamagoud
ce542660c9 Added sepolicy rule for vendor uuid mapping config
New type added in sepolicy to restrict Vendor defined uuid mapping
config file access to SecureElement.

Bug: b/180639372
Test: Run OMAPI CTS and VTS tests
Change-Id: I81d715fa5d5a72c893c529eb542ce62747afcd03
2021-11-20 01:08:11 +00:00
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
Paul Lawrence
3efe0a7b22 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
Ignore-AOSP-First: Does not merge cleanly, so putting in both places

Change-Id: Ibccdf177c75fef0314c86319be3f0b0f249ce59d
2021-11-19 00:29:31 +00:00
Gavin Corkery
1319c3dafd Merge "Sepolicy for SupplementalProcessManager" 2021-11-18 09:57:56 +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
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
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
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
Yifan Hong
4b326c0d3f Merge "Add charger_type." 2021-11-10 00:06:55 +00:00
Gavin Corkery
79214e605e Sepolicy for SupplementalProcessManager
Test: Builds
Bug: 204989700
Ignore-AOSP-First: Feature developed internally
Change-Id: I4c03cd79ca7456defc46333d61b58101f80f1ca8
2021-11-09 12:35:51 +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
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
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
Treehugger Robot
e1c861ca1a Merge "Allow keystore to read vendor security patch level." 2021-11-03 23:32:35 +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
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
Chris Weir
07fcb348fa Merge "SEPolicy for Netlink Interceptor" 2021-11-02 18:02:45 +00:00
Janis Danisevskis
2a10f4f10c Allow keystore to read vendor security patch level.
The software KeyMint implementation used by km_compat needs to read the
vendor security patch level.

Bug: 189973657
Test: Android S GSI starts on rvc-vendor based devices.
      Also keystore2_km_compat_tests
Change-Id: I405d6a2b30fa2780321a3e209035c8f8283f5365
2021-11-02 09:03:19 -07:00
Treehugger Robot
54bd8438b1 Merge "Allow init to write to /proc/cpu/alignment" 2021-11-01 22:33:09 +00:00
Treehugger Robot
e7fa65e301 Merge "Allow vendor charger to set sys.boot_from_charger_mode." 2021-11-01 21:19:39 +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
Shuzhen Wang
5f45be324d Merge "Camera: Allow stream socket read/write with surfaceflinger" 2021-11-01 15:08:02 +00: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
Yifan Hong
70da34e4e3 Allow vendor charger to set sys.boot_from_charger_mode.
This allows booting from charger mode directly without rebooting.

Test: pass
Bug: 203246116
Change-Id: I70d06c0f920c360f4ed6d776cfee98f234d6d97a
2021-10-29 05:33:14 +00:00
Shuzhen Wang
5ed0c50e86 Camera: Allow stream socket read/write with surfaceflinger
This is needed for the camera service to be able to use
AChoreographer ndk.

Test: adb shell dmesg | audit2allow -p policy
Bug: 200306379
Change-Id: I191760f1cdd0a88c9d140fffd4470e9ae1956c52
2021-10-28 15:38:48 -07:00