Assign pkvm_enabler to vendor_misc_writer domain
Builds of gs101 targets with pKVM force-enabled have an init service which checks that /dev/kvm exists and if not, runs misc_writer to instruct the bootloader to enable pKVM, and forces a reboot. Assign the binary to the existing vendor_misc_writer domain and add permission to execute the /vendor/bin/misc_writer binary. Since this is for tests only, the rules are only added to targets that define TARGET_PKVM_ENABLED. Bug: 192819132 Test: flash a _pkvm build, observe double-reboot, check /dev/kvm exists Change-Id: I5f9962e4cdd3ec267ab19ea4485e4e94a3ec15cd
This commit is contained in:
parent
7d5cf2a1bd
commit
a03f3b1a50
3 changed files with 8 additions and 0 deletions
|
@ -34,3 +34,8 @@ BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/wifi_logger
|
|||
|
||||
# Public
|
||||
PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/gs101-sepolicy/public
|
||||
|
||||
# pKVM
|
||||
ifeq ($(TARGET_PKVM_ENABLED),true)
|
||||
BOARD_SEPOLICY_DIRS += device/google/gs101-sepolicy/pkvm
|
||||
endif
|
||||
|
|
1
pkvm/file_contexts
Normal file
1
pkvm/file_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
/vendor/bin/pkvm_enabler u:object_r:vendor_misc_writer_exec:s0
|
2
pkvm/vendor_misc_writer.te
Normal file
2
pkvm/vendor_misc_writer.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Allow pkvm_enabler to execute misc_writer.
|
||||
allow vendor_misc_writer vendor_misc_writer_exec:file execute_no_trans;
|
Loading…
Add table
Add a link
Reference in a new issue