From ced57af116652f4050a8cc3c75948f02d5334fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= Date: Mon, 9 Oct 2023 15:57:26 -0700 Subject: [PATCH] trusty: keymint/gatekeeper: Pass device name from init scripts If the ro.hardware.trusty_ipc_dev.gatekeeper (respectively .keymint) property is set, pass it as the device name to the gatekeeper (respectively keymint) HALs. Test: "setprop ro.hardware.trusty_ipc_dev VSOCK:2048:1" and restart HALs Change-Id: I0947e532ac70ce1821cec49897f21ca10e1af03e --- .../gatekeeper/android.hardware.gatekeeper-service.trusty.rc | 3 ++- .../android.hardware.security.keymint-service.trusty.rc | 3 ++- .../android.hardware.security.keymint-service.rust.trusty.rc | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/trusty/gatekeeper/android.hardware.gatekeeper-service.trusty.rc b/trusty/gatekeeper/android.hardware.gatekeeper-service.trusty.rc index 66ecbd1f0..2c9bd8305 100644 --- a/trusty/gatekeeper/android.hardware.gatekeeper-service.trusty.rc +++ b/trusty/gatekeeper/android.hardware.gatekeeper-service.trusty.rc @@ -1,4 +1,5 @@ -service vendor.gatekeeper_default /vendor/bin/hw/android.hardware.gatekeeper-service.trusty +service vendor.gatekeeper_default /vendor/bin/hw/android.hardware.gatekeeper-service.trusty \ + --dev ${ro.hardware.trusty_ipc_dev.gatekeeper:-/dev/trusty-ipc-dev0} class hal user system group system diff --git a/trusty/keymaster/keymint/android.hardware.security.keymint-service.trusty.rc b/trusty/keymaster/keymint/android.hardware.security.keymint-service.trusty.rc index 389af412f..0ceb58416 100644 --- a/trusty/keymaster/keymint/android.hardware.security.keymint-service.trusty.rc +++ b/trusty/keymaster/keymint/android.hardware.security.keymint-service.trusty.rc @@ -1,4 +1,5 @@ -service vendor.keymint-trusty /vendor/bin/hw/android.hardware.security.keymint-service.trusty +service vendor.keymint-trusty /vendor/bin/hw/android.hardware.security.keymint-service.trusty \ + --dev ${ro.hardware.trusty_ipc_dev.keymint:-/dev/trusty-ipc-dev0} class early_hal user nobody group drmrpc diff --git a/trusty/keymint/android.hardware.security.keymint-service.rust.trusty.rc b/trusty/keymint/android.hardware.security.keymint-service.rust.trusty.rc index e3d94c659..3e3f2a5c3 100644 --- a/trusty/keymint/android.hardware.security.keymint-service.rust.trusty.rc +++ b/trusty/keymint/android.hardware.security.keymint-service.rust.trusty.rc @@ -1,7 +1,8 @@ -service vendor.keymint.rust-trusty /vendor/bin/hw/android.hardware.security.keymint-service.rust.trusty +service vendor.keymint.rust-trusty /vendor/bin/hw/android.hardware.security.keymint-service.rust.trusty \ + --dev ${ro.hardware.trusty_ipc_dev.keymint:-/dev/trusty-ipc-dev0} class early_hal user nobody group drmrpc # The keymint service is not allowed to restart. # If it crashes, a device restart is required. - oneshot \ No newline at end of file + oneshot