-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sepolicy: move and guard access to power HAL
On devices with prebuilt vendor, if the power HAL accesses input device nodes to support DT2W related feature, the resulting sepolicy may trigger following neverallow in system/sepolicy/public/app.te: neverallow { appdomain -shell # bugreport } input_device:chr_file ~getattr; Since the vendor image and the vendor sepolicy are prebuilt, power HAL sepolicy on such devices is often written in the following fashion: allow hal_power input_device:dir search; allow hal_power input_device:chr_file rw_file_perms; This combined with the flipendo/turbo_adapter sepolicy will give the app(s) direct access to input device nodes, thus triggering the neverallow. Considering that flipendo and turbo_adapter's access to power HAL is not critical, guard the sepolicy to allow opting out. Signed-off-by: Chenyang Zhong <[email protected]> Change-Id: Iac02247e2b0ac5ba5f3f464bd0b21ef41b99693b Signed-off-by: Chenyang Zhong <[email protected]> Signed-off-by: Anushek Prasal <[email protected]>
- Loading branch information
Showing
5 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Access to PowerHal service | ||
hal_client_domain(flipendo, hal_power); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# To find and call hal_power_default so turbo can obtain the service extension (IPowerExt) | ||
hal_client_domain(turbo_adapter, hal_power) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters