Skip to content

Commit b66c51c

Browse files
authored
Merge pull request #1082 from wenjz-qualcomm/main
tee_supplicant: Introduce SELinux domain for tee_supplicants
2 parents a25bff6 + 1efb8ea commit b66c51c

4 files changed

Lines changed: 46 additions & 0 deletions

File tree

policy/modules/kernel/devices.if

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5032,6 +5032,24 @@ interface(`dev_setattr_all_sysfs',`
50325032
allow $1 sysfs_types:lnk_file { read_lnk_file_perms setattr };
50335033
')
50345034

5035+
##########################################
5036+
## <summary>
5037+
## Read and write the tee device.
5038+
## </summary>
5039+
## <param name="domain">
5040+
## <summary>
5041+
## Domain allowed access.
5042+
## </summary>
5043+
## </param>
5044+
#
5045+
interface(`dev_rw_tee',`
5046+
gen_require(`
5047+
type device_t, tee_device_t;
5048+
')
5049+
5050+
rw_chr_files_pattern($1, device_t, tee_device_t)
5051+
')
5052+
50355053
########################################
50365054
## <summary>
50375055
## Read and write the TPM device.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/usr/bin/qtee_supplicant -- gen_context(system_u:object_r:tee_supplicant_exec_t,s0)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## <summary>tee_supplicant</summary>
2+
#
3+
## <desc>
4+
## qtee_supplicant is a userspace supplicant daemon that
5+
## services callback requests from QTEE via the Linux TEE subsystem.
6+
## It communicates with QTEE through /dev/tee0 and provides normal-world
7+
## services required by trusted applications running in QTEE.
8+
##
9+
## https://github.com/qualcomm/minkipc/tree/main/qtee_supplicant
10+
## </desc>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
policy_module(tee_supplicant)
2+
3+
########################################
4+
#
5+
# Declarations
6+
#
7+
8+
type tee_supplicant_t;
9+
type tee_supplicant_exec_t;
10+
init_daemon_domain(tee_supplicant_t, tee_supplicant_exec_t)
11+
12+
########################################
13+
#
14+
# Local policy
15+
#
16+
17+
dev_rw_tee(tee_supplicant_t)

0 commit comments

Comments
 (0)