8fc7981885
Before, it was possible to access a hwservice without declaring that you were a client. This introduces the following macro: hal_attribute_hwservice_client(hal_foo, hal_foo_hwservice) which makes sure the above implication holds using a neverallow rule. Bug: 80319537 Test: boot + sanity Change-Id: Iededae68f14f0f3bd412c1205aa3b650a54d55c6
42 lines
2.3 KiB
Text
42 lines
2.3 KiB
Text
; THIS IS A WORKAROUND for the current limitations of the module policy language
|
|
; This should be used sparingly until we figure out a saner way to achieve the
|
|
; stuff below, for example, by improving typeattribute statement of module
|
|
; language.
|
|
;
|
|
; NOTE: This file has no effect on recovery policy.
|
|
|
|
; Apps, except isolated apps, are clients of Allocator HAL
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
; typeattribute { appdomain -isolated_app } hal_allocator_client;
|
|
; typeattribute hal_allocator_client halclientdomain;
|
|
(typeattributeset hal_allocator_client ((and (appdomain) ((not (isolated_app))))))
|
|
(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
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
; typeattribute { appdomain -isolated_app } hal_configstore_client;
|
|
(typeattributeset hal_configstore_client ((and (appdomain) ((not (isolated_app))))))
|
|
|
|
; Apps, except isolated apps, are clients of Graphics Allocator HAL
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
; typeattribute { appdomain -isolated_app } hal_graphics_allocator_client;
|
|
(typeattributeset hal_graphics_allocator_client ((and (appdomain) ((not (isolated_app))))))
|
|
|
|
; Apps, except isolated apps, are clients of Cas HAL
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
; typeattribute { appdomain -isolated_app } hal_cas_client;
|
|
(typeattributeset hal_cas_client ((and (appdomain) ((not (isolated_app))))))
|
|
|
|
; Domains hosting Camera HAL implementations are clients of Allocator HAL
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
; typeattribute hal_camera hal_allocator_client;
|
|
(typeattributeset hal_allocator_client (hal_camera))
|
|
|
|
; Apps, except isolated apps, are clients of Neuralnetworks HAL
|
|
; Unfortunately, we can't currently express this in module policy language:
|
|
; typeattribute { appdomain -isolated_app } hal_neuralnetworks_client;
|
|
(typeattributeset hal_neuralnetworks_client ((and (appdomain) ((not (isolated_app))))))
|