30 lines
986 B
Plaintext
Raw Normal View History

type hal_gnss_pixel, domain;
hal_server_domain(hal_gnss_pixel, hal_gnss)
type hal_gnss_pixel_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_gnss_pixel)
#IPC between pixel and vendor HAL
binder_call(hal_gnss_pixel, hal_gnss_default)
#Read modem state
allow hal_gnss_pixel sysfs_modem_state:file r_file_perms;
#Toggle coredump node
allow hal_gnss_pixel sysfs_gps:file rw_file_perms;
sepolicy: allow hal_gnss_pixel create fifo node avc: denied { read } for name="u:object_r:vendor_chre_hal_prop:s0" dev="tmpfs" ino=401 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_chre_hal_prop:s0 tclass=file avc: denied { find } for pid=900 uid=1021 name=android.hardware.contexthub.IContextHub/default scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:hal_contexthub_service:s0 tclass=service_manager avc: denied { call } for scontext=u:r:hal_gnss_pixel:s0 tcontext=u:r:hal_contexthub_default:s0 tclass=binder avc: denied { call } for scontext=u:r:hal_contexthub_default:s0 tcontext=u:r:hal_gnss_pixel:s0 tclass=binder avc: denied { search } for name="gps" dev="dm-54" ino=380 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=dir avc: denied { write } for name="gps" dev="dm-54" ino=380 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=dir avc: denied { add_name } for name=".pps_pipe" scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=dir avc: denied { create } for name=".pps_pipe" scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=fifo_file avc: denied { read } for name=".pps_pipe" dev="dm-54" ino=11418 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=fifo_file avc: denied { open } for path="/data/vendor/gps/.pps_pipe" dev="dm-54" ino=11418 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=fifo_file permissive=1 avc: denied { write } for name=".pps_pipe" dev="dm-54" ino=11418 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=fifo_file avc: denied { search } for name="gps" dev="dm-49" ino=380 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=dir avc: denied { write } for name=".ppspipe" dev="dm-49" ino=18610 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=fifo_file avc: denied { write } for name="gps" dev="dm-54" ino=380 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=dir avc: denied { open } for path="/data/vendor/gps/.ppspipe" dev="dm-49" ino=18610 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=fifo_file avc: denied { remove_name } for name=".pps_pipe" dev="dm-54" ino=11712 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=dir avc: denied { unlink } for name=".pps_pipe" dev="dm-59" ino=6600 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:vendor_gps_file:s0 tclass=fifo_file Bug: 339391267 Test: Verified the boot health at b/339391267#comment21. Test: Verified the boot health at b/339391267#comment22. Change-Id: I9f0b0939aa2bc3af0049067edaa17bc507be9fe7
2024-05-10 09:12:05 +00:00
# Allow access to CHRE multiclient HAL.
get_prop(hal_gnss_pixel, vendor_chre_hal_prop)
# Allow binder to CHRE.
binder_call(hal_gnss_pixel, hal_contexthub_default)
allow hal_gnss_pixel hal_contexthub_service:service_manager find;
# Allow connect to gnss service
allow hal_gnss_pixel vendor_gps_file:dir create_dir_perms;
sepolicy: Allow hal_gnss_pixel access sscoredump file avc: denied { read } for name="ssrdump" dev="dm-48" ino=404 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=dir permissive=0 avc: denied { search } for name="ssrdump" dev="dm-48" ino=404 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=dir permissive=0 avc: denied { read } for name="ssrdump" dev="dm-48" ino=404 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=dir permissive=1 avc: denied { open } for path="/data/vendor/ssrdump" dev="dm-48" ino=404 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=dir permissive=1 avc: denied { search } for name="ssrdump" dev="dm-48" ino=404 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=dir permissive=1 avc: denied { getattr } for path="/data/vendor/ssrdump/crashinfo_gnss_2024-05-22_16-00-45.txt" dev="dm-48" ino=19897 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=file permissive=1 avc: denied { read } for name="crashinfo_modem_2024-05-22_16-34-51.txt" dev="dm-48" ino=20760 scontext=u:r:hal_gnss_pixel:s0 tcontext=u:object_r:sscoredump_vendor_data_crashinfo_file:s0 tclass=file permissive=1 Bug: 341224300 Test: b/341224300#comment13 abtd boot health check. Test: b/341224300 SST test verification. Change-Id: Ie2b55cb487e7e801a0199b1e9dd9ad16f1e3d682
2024-05-31 02:12:23 +00:00
allow hal_gnss_pixel vendor_gps_file:fifo_file create_file_perms;
# Allow access ssrdump information
allow hal_gnss_pixel sscoredump_vendor_data_crashinfo_file:file r_file_perms;
allow hal_gnss_pixel sscoredump_vendor_data_crashinfo_file:dir r_dir_perms;