mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_stone
synced 2026-01-27 17:18:49 +00:00
sm6375-common: Make fastrpc_shell_3 publicly available
* Used by GCAM for DSP-accelerated HDR processing * Arguably we should label /vendor/dsp/cdsp/fastrpc_shell_3 to same_process_hal_file like Pixels, but the partition is prebuilt thus we're unable to relabel it. * Copy the file to writable tmpfs, setup attributes and bind mount back to workaround the limitation. [ghostrider-reborn]: Allow adsp/cdsprpcd and neuralnetworks HAL to access fastrpc_shell_3 [kras edit: 1. rename some contexts as per qva/kona 2. extend to allow camera HAL and VPP service to access it as well] Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com> Change-Id: Ide90e5c7307d413db5ece736e859559f06679545
This commit is contained in:
@@ -84,6 +84,11 @@ on init
|
|||||||
on post-fs
|
on post-fs
|
||||||
chmod 0755 /sys/kernel/debug/tracing
|
chmod 0755 /sys/kernel/debug/tracing
|
||||||
|
|
||||||
|
mkdir /mnt/vendor/dsp 0770 root root
|
||||||
|
copy /vendor/dsp/cdsp/fastrpc_shell_3 /mnt/vendor/dsp/fastrpc_shell_3
|
||||||
|
chmod 0644 /mnt/vendor/dsp/fastrpc_shell_3
|
||||||
|
mount none /mnt/vendor/dsp/fastrpc_shell_3 /vendor/dsp/cdsp/fastrpc_shell_3 bind
|
||||||
|
|
||||||
on early-boot
|
on early-boot
|
||||||
# set RLIMIT_MEMLOCK to 64MB
|
# set RLIMIT_MEMLOCK to 64MB
|
||||||
setrlimit 8 67108864 67108864
|
setrlimit 8 67108864 67108864
|
||||||
|
|||||||
3
sepolicy/vendor/adsprpcd.te
vendored
3
sepolicy/vendor/adsprpcd.te
vendored
@@ -1 +1,4 @@
|
|||||||
|
type public_adsprpcd_file, file_type;
|
||||||
|
|
||||||
|
r_dir_file(vendor_adsprpcd, public_adsprpcd_file)
|
||||||
r_dir_file(vendor_adsprpcd, vendor_sysfs_graphics)
|
r_dir_file(vendor_adsprpcd, vendor_sysfs_graphics)
|
||||||
|
|||||||
5
sepolicy/vendor/app.te
vendored
5
sepolicy/vendor/app.te
vendored
@@ -1,2 +1,5 @@
|
|||||||
get_prop({ appdomain -isolated_app }, vendor_fingerprint_prop)
|
get_prop({ appdomain -isolated_app }, vendor_fingerprint_prop)
|
||||||
get_prop({ appdomain -isolated_app }, vendor_tee_listener_prop)
|
get_prop({ appdomain -isolated_app }, vendor_tee_listener_prop)
|
||||||
|
|
||||||
|
allow { appdomain -isolated_app } adsprpcd_file:dir r_dir_perms;
|
||||||
|
allow { appdomain -isolated_app } public_adsprpcd_file:file r_file_perms;
|
||||||
|
|||||||
1
sepolicy/vendor/cdsprpcd.te
vendored
Normal file
1
sepolicy/vendor/cdsprpcd.te
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
r_dir_file(vendor_cdsprpcd, public_adsprpcd_file)
|
||||||
5
sepolicy/vendor/file_contexts
vendored
5
sepolicy/vendor/file_contexts
vendored
@@ -15,6 +15,11 @@
|
|||||||
# Camera
|
# Camera
|
||||||
/mnt/vendor/persist/camera(/.*)? u:object_r:camera_persist_file:s0
|
/mnt/vendor/persist/camera(/.*)? u:object_r:camera_persist_file:s0
|
||||||
|
|
||||||
|
# Hexagon DSP-side executable needed for Halide operation
|
||||||
|
# This is labeled as public_adsprpcd_file as it needs to be read by apps
|
||||||
|
# (e.g. Google Camera App)
|
||||||
|
/mnt/vendor/dsp/fastrpc_shell_3 u:object_r:public_adsprpcd_file:s0
|
||||||
|
|
||||||
# Fingerprint
|
# Fingerprint
|
||||||
/dev/goodix_fp u:object_r:vendor_fingerprint_device:s0
|
/dev/goodix_fp u:object_r:vendor_fingerprint_device:s0
|
||||||
/dev/silead_fp u:object_r:vendor_fingerprint_device:s0
|
/dev/silead_fp u:object_r:vendor_fingerprint_device:s0
|
||||||
|
|||||||
2
sepolicy/vendor/hal_camera_default.te
vendored
2
sepolicy/vendor/hal_camera_default.te
vendored
@@ -1,2 +1,4 @@
|
|||||||
r_dir_file(hal_camera_default, camera_persist_file)
|
r_dir_file(hal_camera_default, camera_persist_file)
|
||||||
set_prop(hal_camera_default, vendor_camera_sensor_prop)
|
set_prop(hal_camera_default, vendor_camera_sensor_prop)
|
||||||
|
|
||||||
|
allow hal_camera_default public_adsprpcd_file:file r_file_perms;
|
||||||
|
|||||||
1
sepolicy/vendor/hal_neuralnetworks_default.te
vendored
Normal file
1
sepolicy/vendor/hal_neuralnetworks_default.te
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
r_dir_file(vendor_hal_neuralnetworks_default, public_adsprpcd_file)
|
||||||
1
sepolicy/vendor/init.te
vendored
Normal file
1
sepolicy/vendor/init.te
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
allow init adsprpcd_file:file mounton;
|
||||||
1
sepolicy/vendor/vppservice.te
vendored
Normal file
1
sepolicy/vendor/vppservice.te
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
r_dir_file(vendor_vppservice, public_adsprpcd_file)
|
||||||
Reference in New Issue
Block a user