Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sepolicy for intel evs app #336

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions car/evs_intel_app.te
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# evs app
type evs_intel_app, domain, coredomain;
hal_client_domain(evs_intel_app, hal_evs)
hal_client_domain(evs_intel_app, hal_vehicle)
hal_client_domain(evs_intel_app, hal_configstore)
hal_client_domain(evs_intel_app, hal_graphics_allocator)

# allow init to launch processes in this context
type evs_intel_app_exec, exec_type, file_type, system_file_type;
init_daemon_domain(evs_intel_app)

# gets access to its own files on disk
type evs_intel_app_files, file_type, system_file_type;
allow evs_intel_app evs_intel_app_files:file { getattr open read };
allow evs_intel_app evs_intel_app_files:dir search;

# Allow use of gralloc buffers and EGL
allow evs_intel_app gpu_device:chr_file rw_file_perms;
allow evs_intel_app ion_device:chr_file r_file_perms;
allow evs_intel_app system_file:dir r_dir_perms;
allow evs_intel_app gpu_device:dir search;
allow evs_intel_app self:process execmem;

# Allow use of binder and find surfaceflinger
binder_use(evs_intel_app);
allow evs_intel_app surfaceflinger_service:service_manager find;

# Allow get a list of available services
allow evs_intel_app servicemanager:service_manager list;

# Allow find evsmanagerd service
allow evs_intel_app evsmanagerd_service:service_manager find;

allow evs_intel_app gpu_device:dir { read open};
allow evs_intel_app sysfs_app_readable:file { read open getattr};
allow evs_intel_app sysfs_gpu:dir { search read };
3 changes: 3 additions & 0 deletions car/evsmanagerd.te
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
allow evsmanagerd hal_graphics_allocator_default_tmpfs:file rw_file_perms;
allow evsmanagerd { appdomain -isolated_app_all }:fd use;
binder_call(evs_intel_app, evsmanagerd)
binder_call(evsmanagerd, evs_intel_app)

4 changes: 4 additions & 0 deletions car/file_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@

/vendor/bin/hw/android.hardware.broadcastradio@intel-service u:object_r:hal_broadcastradio_default_exec:s0
/vendor/bin/hw/android.hardware.automotive.audiocontrol@1.0-service.intel u:object_r:hal_audiocontrol_default_exec:s0

/system/bin/evs_intel_app u:object_r:evs_intel_app_exec:s0
/system/bin/evs_app_support_lib u:object_r:evs_intel_app_exec:s0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not proper to put Intel's binary to system partition. It will be lost after flashing the GSI image.

/system/etc/automotive/evs(/.*)? u:object_r:evs_intel_app_files:s0