diff --git a/public/attributes b/public/attributes index d384efd8d8b33c9eaf7e5b0491bd101dc2125e27..b51f353112d691a5c6b356e283e485ac8a419bf2 100644 --- a/public/attributes +++ b/public/attributes @@ -190,234 +190,44 @@ attribute halclientdomain; expandattribute halclientdomain true; # HALs -attribute hal_allocator; -expandattribute hal_allocator true; -attribute hal_allocator_client; -expandattribute hal_allocator_client true; -attribute hal_allocator_server; -expandattribute hal_allocator_server false; -attribute hal_audio; -expandattribute hal_audio false; -attribute hal_audio_client; -expandattribute hal_audio_client true; -attribute hal_audio_server; -expandattribute hal_audio_server false; -attribute hal_bluetooth; -expandattribute hal_bluetooth true; -attribute hal_bluetooth_client; -expandattribute hal_bluetooth_client true; -attribute hal_bluetooth_server; -expandattribute hal_bluetooth_server false; -attribute hal_bootctl; -expandattribute hal_bootctl false; -attribute hal_bootctl_client; -expandattribute hal_bootctl_client true; -attribute hal_bootctl_server; -expandattribute hal_bootctl_server false; -attribute hal_broadcastradio; -expandattribute hal_broadcastradio true; -attribute hal_broadcastradio_client; -expandattribute hal_broadcastradio_client true; -attribute hal_broadcastradio_server; -expandattribute hal_broadcastradio_server false; -attribute hal_camera; -expandattribute hal_camera false; -attribute hal_camera_client; -expandattribute hal_camera_client true; -attribute hal_camera_server; -expandattribute hal_camera_server false; -attribute hal_configstore; -expandattribute hal_configstore true; -attribute hal_configstore_client; -expandattribute hal_configstore_client true; -attribute hal_configstore_server; -expandattribute hal_configstore_server false; -attribute hal_contexthub; -expandattribute hal_contexthub true; -attribute hal_contexthub_client; -expandattribute hal_contexthub_client true; -attribute hal_contexthub_server; -expandattribute hal_contexthub_server false; -attribute hal_drm; -expandattribute hal_drm false; -attribute hal_drm_client; -expandattribute hal_drm_client true; -attribute hal_drm_server; -expandattribute hal_drm_server true; -attribute hal_cas; -expandattribute hal_cas true; -attribute hal_cas_client; -expandattribute hal_cas_client true; -attribute hal_cas_server; -expandattribute hal_cas_server true; -attribute hal_dumpstate; -expandattribute hal_dumpstate true; -attribute hal_dumpstate_client; -expandattribute hal_dumpstate_client true; -attribute hal_dumpstate_server; -expandattribute hal_dumpstate_server false; -attribute hal_fingerprint; -expandattribute hal_fingerprint true; -attribute hal_fingerprint_client; -expandattribute hal_fingerprint_client true; -attribute hal_fingerprint_server; -expandattribute hal_fingerprint_server false; -attribute hal_gatekeeper; -expandattribute hal_gatekeeper true; -attribute hal_gatekeeper_client; -expandattribute hal_gatekeeper_client true; -attribute hal_gatekeeper_server; -expandattribute hal_gatekeeper_server false; -attribute hal_gnss; -expandattribute hal_gnss true; -attribute hal_gnss_client; -expandattribute hal_gnss_client true; -attribute hal_gnss_server; -expandattribute hal_gnss_server false; -attribute hal_graphics_allocator; -expandattribute hal_graphics_allocator true; -attribute hal_graphics_allocator_client; -expandattribute hal_graphics_allocator_client true; -attribute hal_graphics_allocator_server; -expandattribute hal_graphics_allocator_server false; -attribute hal_graphics_composer; -expandattribute hal_graphics_composer true; -attribute hal_graphics_composer_client; -expandattribute hal_graphics_composer_client true; -attribute hal_graphics_composer_server; -expandattribute hal_graphics_composer_server false; -attribute hal_health; -expandattribute hal_health true; -attribute hal_health_client; -expandattribute hal_health_client true; -attribute hal_health_server; -expandattribute hal_health_server false; -attribute hal_ir; -expandattribute hal_ir true; -attribute hal_ir_client; -expandattribute hal_ir_client true; -attribute hal_ir_server; -expandattribute hal_ir_server false; -attribute hal_keymaster; -expandattribute hal_keymaster true; -attribute hal_keymaster_client; -expandattribute hal_keymaster_client true; -attribute hal_keymaster_server; -expandattribute hal_keymaster_server false; -attribute hal_light; -expandattribute hal_light true; -attribute hal_light_client; -expandattribute hal_light_client true; -attribute hal_light_server; -expandattribute hal_light_server false; -attribute hal_memtrack; -expandattribute hal_memtrack true; -attribute hal_memtrack_client; -expandattribute hal_memtrack_client true; -attribute hal_memtrack_server; -expandattribute hal_memtrack_server false; -attribute hal_neuralnetworks; -expandattribute hal_neuralnetworks true; -attribute hal_neuralnetworks_client; -expandattribute hal_neuralnetworks_client true; -attribute hal_neuralnetworks_server; -expandattribute hal_neuralnetworks_server false; -attribute hal_nfc; -expandattribute hal_nfc true; -attribute hal_nfc_client; -expandattribute hal_nfc_client true; -attribute hal_nfc_server; -expandattribute hal_nfc_server false; -attribute hal_oemlock; -expandattribute hal_oemlock true; -attribute hal_oemlock_client; -expandattribute hal_oemlock_client true; -attribute hal_oemlock_server; -expandattribute hal_oemlock_server false; -attribute hal_power; -expandattribute hal_power true; -attribute hal_power_client; -expandattribute hal_power_client true; -attribute hal_power_server; -expandattribute hal_power_server false; -attribute hal_sensors; -expandattribute hal_sensors true; -attribute hal_sensors_client; -expandattribute hal_sensors_client true; -attribute hal_sensors_server; -expandattribute hal_sensors_server false; -attribute hal_telephony; -expandattribute hal_telephony true; -attribute hal_telephony_client; -expandattribute hal_telephony_client true; -attribute hal_telephony_server; -expandattribute hal_telephony_server false; -attribute hal_tetheroffload; -expandattribute hal_tetheroffload true; -attribute hal_tetheroffload_client; -expandattribute hal_tetheroffload_client true; -attribute hal_tetheroffload_server; -expandattribute hal_tetheroffload_server false; -attribute hal_thermal; -expandattribute hal_thermal true; -attribute hal_thermal_client; -expandattribute hal_thermal_client true; -attribute hal_thermal_server; -expandattribute hal_thermal_server false; -attribute hal_tv_cec; -expandattribute hal_tv_cec true; -attribute hal_tv_cec_client; -expandattribute hal_tv_cec_client true; -attribute hal_tv_cec_server; -expandattribute hal_tv_cec_server false; -attribute hal_tv_input; -expandattribute hal_tv_input true; -attribute hal_tv_input_client; -expandattribute hal_tv_input_client true; -attribute hal_tv_input_server; -expandattribute hal_tv_input_server false; -attribute hal_usb; -expandattribute hal_usb true; -attribute hal_usb_client; -expandattribute hal_usb_client true; -attribute hal_usb_server; -expandattribute hal_usb_server false; -attribute hal_vibrator; -expandattribute hal_vibrator true; -attribute hal_vibrator_client; -expandattribute hal_vibrator_client true; -attribute hal_vibrator_server; -expandattribute hal_vibrator_server false; -attribute hal_vr; -expandattribute hal_vr true; -attribute hal_vr_client; -expandattribute hal_vr_client true; -attribute hal_vr_server; -expandattribute hal_vr_server false; -attribute hal_weaver; -expandattribute hal_weaver true; -attribute hal_weaver_client; -expandattribute hal_weaver_client true; -attribute hal_weaver_server; -expandattribute hal_weaver_server false; -attribute hal_wifi; -expandattribute hal_wifi true; -attribute hal_wifi_client; -expandattribute hal_wifi_client true; -attribute hal_wifi_server; -expandattribute hal_wifi_server false; -attribute hal_wifi_offload; -expandattribute hal_wifi_offload true; -attribute hal_wifi_offload_client; -expandattribute hal_wifi_offload_client true; -attribute hal_wifi_offload_server; -expandattribute hal_wifi_offload_server false; -attribute hal_wifi_supplicant; -expandattribute hal_wifi_supplicant true; -attribute hal_wifi_supplicant_client; -expandattribute hal_wifi_supplicant_client true; -attribute hal_wifi_supplicant_server; -expandattribute hal_wifi_supplicant_server false; +hal_attribute(allocator); +hal_attribute(audio); +hal_attribute(bluetooth); +hal_attribute(bootctl); +hal_attribute(broadcastradio); +hal_attribute(camera); +hal_attribute(configstore); +hal_attribute(contexthub); +hal_attribute(drm); +hal_attribute(cas); +hal_attribute(dumpstate); +hal_attribute(fingerprint); +hal_attribute(gatekeeper); +hal_attribute(gnss); +hal_attribute(graphics_allocator); +hal_attribute(graphics_composer); +hal_attribute(health); +hal_attribute(ir); +hal_attribute(keymaster); +hal_attribute(light); +hal_attribute(memtrack); +hal_attribute(neuralnetworks); +hal_attribute(nfc); +hal_attribute(oemlock); +hal_attribute(power); +hal_attribute(sensors); +hal_attribute(telephony); +hal_attribute(tetheroffload); +hal_attribute(thermal); +hal_attribute(tv_cec); +hal_attribute(tv_input); +hal_attribute(usb); +hal_attribute(vibrator); +hal_attribute(vr); +hal_attribute(weaver); +hal_attribute(wifi); +hal_attribute(wifi_offload); +hal_attribute(wifi_supplicant); # HwBinder services offered across the core-vendor boundary # diff --git a/public/te_macros b/public/te_macros index 16388eab0f779b428292e4e60bec69ec8922246c..5a8ea5add6168644d28d0d13097d29df7c8a37da 100644 --- a/public/te_macros +++ b/public/te_macros @@ -201,6 +201,22 @@ define(`bluetooth_domain', ` typeattribute $1 bluetoothdomain; ') +##################################### +# hal_attribute(hal_name) +# Add an attribute for hal implementations along with necessary +# restrictions. +define(`hal_attribute', ` +attribute hal_$1; +expandattribute hal_$1 true; +attribute hal_$1_client; +expandattribute hal_$1_client true; +attribute hal_$1_server; +expandattribute hal_$1_server false; + +neverallow { hal_$1_client -halclientdomain } domain:process fork; +neverallow { hal_$1_server -halserverdomain } domain:process fork; +') + ##################################### # hal_server_domain(domain, hal_type) # Allow a base set of permissions required for a domain to offer a