Skip to content
Snippets Groups Projects
Commit 58f4c6f0 authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "Find hal_foo_hwservice -> you are hal_foo_client."

parents 93953d0b 8fc79818
No related branches found
No related tags found
No related merge requests found
Showing
with 22 additions and 28 deletions
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
(typeattributeset hal_allocator_client ((and (appdomain) ((not (isolated_app)))))) (typeattributeset hal_allocator_client ((and (appdomain) ((not (isolated_app))))))
(typeattributeset halclientdomain (hal_allocator_client)) (typeattributeset halclientdomain (hal_allocator_client))
; Apps, except isolated apps, are clients of OMX-related services
; Unfortunately, we can't currently express this in module policy language:
(typeattributeset hal_omx_client ((and (appdomain) ((not (isolated_app))))))
; Apps, except isolated apps, are clients of Configstore HAL ; Apps, except isolated apps, are clients of Configstore HAL
; Unfortunately, we can't currently express this in module policy language: ; Unfortunately, we can't currently express this in module policy language:
; typeattribute { appdomain -isolated_app } hal_configstore_client; ; typeattribute { appdomain -isolated_app } hal_configstore_client;
......
...@@ -219,15 +219,6 @@ binder_call(appdomain, appdomain) ...@@ -219,15 +219,6 @@ binder_call(appdomain, appdomain)
# Perform binder IPC to ephemeral apps. # Perform binder IPC to ephemeral apps.
binder_call(appdomain, ephemeral_app) binder_call(appdomain, ephemeral_app)
# TODO(b/80317992): use hal_client_domain on individual domains or have tests
# that the required individual permissions are all granted
hwbinder_use({ appdomain -isolated_app })
allow { appdomain -isolated_app } hal_codec2_hwservice:hwservice_manager find;
allow { appdomain -isolated_app } hal_omx_hwservice:hwservice_manager find;
allow { appdomain -isolated_app } hidl_token_hwservice:hwservice_manager find;
get_prop({ appdomain -isolated_app }, hwservicemanager_prop);
binder_call({ appdomain -isolated_app }, hal_omx_server)
# Talk with graphics composer fences # Talk with graphics composer fences
allow appdomain hal_graphics_composer:fd use; allow appdomain hal_graphics_composer:fd use;
......
...@@ -3,7 +3,7 @@ binder_call(hal_audio_client, hal_audio_server) ...@@ -3,7 +3,7 @@ binder_call(hal_audio_client, hal_audio_server)
binder_call(hal_audio_server, hal_audio_client) binder_call(hal_audio_server, hal_audio_client)
add_hwservice(hal_audio_server, hal_audio_hwservice) add_hwservice(hal_audio_server, hal_audio_hwservice)
allow hal_audio_client hal_audio_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_audio, hal_audio_hwservice)
allow hal_audio ion_device:chr_file r_file_perms; allow hal_audio ion_device:chr_file r_file_perms;
......
...@@ -3,5 +3,4 @@ binder_call(hal_audiocontrol_client, hal_audiocontrol_server) ...@@ -3,5 +3,4 @@ binder_call(hal_audiocontrol_client, hal_audiocontrol_server)
binder_call(hal_audiocontrol_server, hal_audiocontrol_client) binder_call(hal_audiocontrol_server, hal_audiocontrol_client)
add_hwservice(hal_audiocontrol_server, hal_audiocontrol_hwservice) add_hwservice(hal_audiocontrol_server, hal_audiocontrol_hwservice)
hal_attribute_hwservice_client(hal_audiocontrol, hal_audiocontrol_hwservice)
allow hal_audiocontrol_client hal_audiocontrol_hwservice:hwservice_manager find;
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
binder_call(hal_authsecret_client, hal_authsecret_server) binder_call(hal_authsecret_client, hal_authsecret_server)
add_hwservice(hal_authsecret_server, hal_authsecret_hwservice) add_hwservice(hal_authsecret_server, hal_authsecret_hwservice)
allow hal_authsecret_client hal_authsecret_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_authsecret, hal_authsecret_hwservice)
...@@ -3,7 +3,7 @@ binder_call(hal_bluetooth_client, hal_bluetooth_server) ...@@ -3,7 +3,7 @@ binder_call(hal_bluetooth_client, hal_bluetooth_server)
binder_call(hal_bluetooth_server, hal_bluetooth_client) binder_call(hal_bluetooth_server, hal_bluetooth_client)
add_hwservice(hal_bluetooth_server, hal_bluetooth_hwservice) add_hwservice(hal_bluetooth_server, hal_bluetooth_hwservice)
allow hal_bluetooth_client hal_bluetooth_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_bluetooth, hal_bluetooth_hwservice)
wakelock_use(hal_bluetooth); wakelock_use(hal_bluetooth);
......
...@@ -3,6 +3,6 @@ binder_call(hal_bootctl_client, hal_bootctl_server) ...@@ -3,6 +3,6 @@ binder_call(hal_bootctl_client, hal_bootctl_server)
binder_call(hal_bootctl_server, hal_bootctl_client) binder_call(hal_bootctl_server, hal_bootctl_client)
add_hwservice(hal_bootctl_server, hal_bootctl_hwservice) add_hwservice(hal_bootctl_server, hal_bootctl_hwservice)
allow hal_bootctl_client hal_bootctl_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_bootctl, hal_bootctl_hwservice)
dontaudit hal_bootctl self:capability sys_rawio; dontaudit hal_bootctl self:capability sys_rawio;
binder_call(hal_broadcastradio_client, hal_broadcastradio_server) binder_call(hal_broadcastradio_client, hal_broadcastradio_server)
add_hwservice(hal_broadcastradio_server, hal_broadcastradio_hwservice) add_hwservice(hal_broadcastradio_server, hal_broadcastradio_hwservice)
allow hal_broadcastradio_client hal_broadcastradio_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_broadcastradio, hal_broadcastradio_hwservice)
...@@ -3,7 +3,7 @@ binder_call(hal_camera_client, hal_camera_server) ...@@ -3,7 +3,7 @@ binder_call(hal_camera_client, hal_camera_server)
binder_call(hal_camera_server, hal_camera_client) binder_call(hal_camera_server, hal_camera_client)
add_hwservice(hal_camera_server, hal_camera_hwservice) add_hwservice(hal_camera_server, hal_camera_hwservice)
allow hal_camera_client hal_camera_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_camera, hal_camera_hwservice)
allow hal_camera device:dir r_dir_perms; allow hal_camera device:dir r_dir_perms;
allow hal_camera video_device:dir r_dir_perms; allow hal_camera video_device:dir r_dir_perms;
......
...@@ -3,7 +3,7 @@ binder_call(hal_cas_client, hal_cas_server) ...@@ -3,7 +3,7 @@ binder_call(hal_cas_client, hal_cas_server)
binder_call(hal_cas_server, hal_cas_client) binder_call(hal_cas_server, hal_cas_client)
add_hwservice(hal_cas_server, hal_cas_hwservice) add_hwservice(hal_cas_server, hal_cas_hwservice)
allow hal_cas_client hal_cas_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_cas, hal_cas_hwservice)
allow hal_cas_server hidl_memory_hwservice:hwservice_manager find; allow hal_cas_server hidl_memory_hwservice:hwservice_manager find;
# Permit reading device's serial number from system properties # Permit reading device's serial number from system properties
......
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
binder_call(hal_confirmationui_client, hal_confirmationui_server) binder_call(hal_confirmationui_client, hal_confirmationui_server)
add_hwservice(hal_confirmationui_server, hal_confirmationui_hwservice) add_hwservice(hal_confirmationui_server, hal_confirmationui_hwservice)
allow hal_confirmationui_client hal_confirmationui_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_confirmationui, hal_confirmationui_hwservice)
...@@ -3,4 +3,4 @@ binder_call(hal_contexthub_client, hal_contexthub_server) ...@@ -3,4 +3,4 @@ binder_call(hal_contexthub_client, hal_contexthub_server)
binder_call(hal_contexthub_server, hal_contexthub_client) binder_call(hal_contexthub_server, hal_contexthub_client)
add_hwservice(hal_contexthub_server, hal_contexthub_hwservice) add_hwservice(hal_contexthub_server, hal_contexthub_hwservice)
allow hal_contexthub_client hal_contexthub_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_contexthub, hal_contexthub_hwservice)
...@@ -3,7 +3,7 @@ binder_call(hal_drm_client, hal_drm_server) ...@@ -3,7 +3,7 @@ binder_call(hal_drm_client, hal_drm_server)
binder_call(hal_drm_server, hal_drm_client) binder_call(hal_drm_server, hal_drm_client)
add_hwservice(hal_drm_server, hal_drm_hwservice) add_hwservice(hal_drm_server, hal_drm_hwservice)
allow hal_drm_client hal_drm_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_drm, hal_drm_hwservice)
allow hal_drm hidl_memory_hwservice:hwservice_manager find; allow hal_drm hidl_memory_hwservice:hwservice_manager find;
......
...@@ -3,7 +3,7 @@ binder_call(hal_dumpstate_client, hal_dumpstate_server) ...@@ -3,7 +3,7 @@ binder_call(hal_dumpstate_client, hal_dumpstate_server)
binder_call(hal_dumpstate_server, hal_dumpstate_client) binder_call(hal_dumpstate_server, hal_dumpstate_client)
add_hwservice(hal_dumpstate_server, hal_dumpstate_hwservice) add_hwservice(hal_dumpstate_server, hal_dumpstate_hwservice)
allow hal_dumpstate_client hal_dumpstate_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_dumpstate, hal_dumpstate_hwservice)
# write bug reports in /data/data/com.android.shell/files/bugreports/bugreport # write bug reports in /data/data/com.android.shell/files/bugreports/bugreport
allow hal_dumpstate shell_data_file:file write; allow hal_dumpstate shell_data_file:file write;
......
...@@ -3,7 +3,7 @@ binder_call(hal_fingerprint_client, hal_fingerprint_server) ...@@ -3,7 +3,7 @@ binder_call(hal_fingerprint_client, hal_fingerprint_server)
binder_call(hal_fingerprint_server, hal_fingerprint_client) binder_call(hal_fingerprint_server, hal_fingerprint_client)
add_hwservice(hal_fingerprint_server, hal_fingerprint_hwservice) add_hwservice(hal_fingerprint_server, hal_fingerprint_hwservice)
allow hal_fingerprint_client hal_fingerprint_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_fingerprint, hal_fingerprint_hwservice)
# For memory allocation # For memory allocation
allow hal_fingerprint ion_device:chr_file r_file_perms; allow hal_fingerprint ion_device:chr_file r_file_perms;
......
binder_call(hal_gatekeeper_client, hal_gatekeeper_server) binder_call(hal_gatekeeper_client, hal_gatekeeper_server)
add_hwservice(hal_gatekeeper_server, hal_gatekeeper_hwservice) add_hwservice(hal_gatekeeper_server, hal_gatekeeper_hwservice)
allow hal_gatekeeper_client hal_gatekeeper_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_gatekeeper, hal_gatekeeper_hwservice)
# TEE access. # TEE access.
allow hal_gatekeeper tee_device:chr_file rw_file_perms; allow hal_gatekeeper tee_device:chr_file rw_file_perms;
......
...@@ -3,4 +3,4 @@ binder_call(hal_gnss_client, hal_gnss_server) ...@@ -3,4 +3,4 @@ binder_call(hal_gnss_client, hal_gnss_server)
binder_call(hal_gnss_server, hal_gnss_client) binder_call(hal_gnss_server, hal_gnss_client)
add_hwservice(hal_gnss_server, hal_gnss_hwservice) add_hwservice(hal_gnss_server, hal_gnss_hwservice)
allow hal_gnss_client hal_gnss_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_gnss, hal_gnss_hwservice)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
binder_call(hal_graphics_allocator_client, hal_graphics_allocator_server) binder_call(hal_graphics_allocator_client, hal_graphics_allocator_server)
add_hwservice(hal_graphics_allocator_server, hal_graphics_allocator_hwservice) add_hwservice(hal_graphics_allocator_server, hal_graphics_allocator_hwservice)
allow hal_graphics_allocator_client hal_graphics_allocator_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_graphics_allocator, hal_graphics_allocator_hwservice)
allow hal_graphics_allocator_client hal_graphics_mapper_hwservice:hwservice_manager find; allow hal_graphics_allocator_client hal_graphics_mapper_hwservice:hwservice_manager find;
# GPU device access # GPU device access
......
...@@ -3,7 +3,7 @@ binder_call(hal_graphics_composer_client, hal_graphics_composer_server) ...@@ -3,7 +3,7 @@ binder_call(hal_graphics_composer_client, hal_graphics_composer_server)
binder_call(hal_graphics_composer_server, hal_graphics_composer_client) binder_call(hal_graphics_composer_server, hal_graphics_composer_client)
add_hwservice(hal_graphics_composer_server, hal_graphics_composer_hwservice) add_hwservice(hal_graphics_composer_server, hal_graphics_composer_hwservice)
allow hal_graphics_composer_client hal_graphics_composer_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_graphics_composer, hal_graphics_composer_hwservice)
# Coordinate with hal_graphics_mapper # Coordinate with hal_graphics_mapper
allow hal_graphics_composer_server hal_graphics_mapper_hwservice:hwservice_manager find; allow hal_graphics_composer_server hal_graphics_mapper_hwservice:hwservice_manager find;
......
...@@ -3,7 +3,7 @@ binder_call(hal_health_client, hal_health_server) ...@@ -3,7 +3,7 @@ binder_call(hal_health_client, hal_health_server)
binder_call(hal_health_server, hal_health_client) binder_call(hal_health_server, hal_health_client)
add_hwservice(hal_health_server, hal_health_hwservice) add_hwservice(hal_health_server, hal_health_hwservice)
allow hal_health_client hal_health_hwservice:hwservice_manager find; hal_attribute_hwservice_client(hal_health, hal_health_hwservice)
# Read access to system files for HALs in # Read access to system files for HALs in
# /{system,vendor,odm}/lib[64]/hw/ in order # /{system,vendor,odm}/lib[64]/hw/ in order
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment