@@ -6167,3 +6167,61 @@ interface(`dev_unconfined',`
61676167
61686168 typeattribute $1 devices_unconfined_type;
61696169')
6170+
6171+ ########################################
6172+ ## <summary>
6173+ ## Allow read/ioctl/open for Qualcomm FastRPC default devices.
6174+ ## </summary>
6175+ ## <desc>
6176+ ## <p>
6177+ ## Allow the specified domain to read the Qualcomm FastRPC default (non-secure) devices.
6178+ ## This includes all ADSP, CDSP, GDSP, and SDSP devices:
6179+ ## /dev/fastrpc-adsp, /dev/fastrpc-cdsp[0-9]*,
6180+ ## /dev/fastrpc-gdsp[0-9]*, /dev/fastrpc-sdsp
6181+ ## </p>
6182+ ## <p>
6183+ ## Example usage: fastrpc_read_device(xdsprpcd_t)
6184+ ## </p>
6185+ ## </desc>
6186+ ## <param name="domain">
6187+ ## <summary>
6188+ ## Domain allowed access.
6189+ ## </summary>
6190+ ## </param>
6191+ #
6192+ interface(`fastrpc_read_device',`
6193+ gen_require(`
6194+ type device_t, fastrpc_device_t;
6195+ ')
6196+
6197+ read_chr_files_pattern($1, device_t, fastrpc_device_t)
6198+ ')
6199+
6200+ ########################################
6201+ ## <summary>
6202+ ## Allow read/ioctl/open for Qualcomm FastRPC secure devices.
6203+ ## </summary>
6204+ ## <desc>
6205+ ## <p>
6206+ ## Allow the specified domain to read the Qualcomm FastRPC secure devices.
6207+ ## This includes all secure ADSP, CDSP, GDSP, and SDSP devices:
6208+ ## /dev/fastrpc-adsp-secure, /dev/fastrpc-cdsp[0-9]*-secure,
6209+ ## /dev/fastrpc-gdsp[0-9]*-secure, /dev/fastrpc-sdsp-secure
6210+ ## </p>
6211+ ## <p>
6212+ ## Example usage: fastrpc_read_secure_device(xdsprpcd_t)
6213+ ## </p>
6214+ ## </desc>
6215+ ## <param name="domain">
6216+ ## <summary>
6217+ ## Domain allowed access.
6218+ ## </summary>
6219+ ## </param>
6220+ #
6221+ interface(`fastrpc_read_secure_device',`
6222+ gen_require(`
6223+ type device_t, fastrpc_secure_device_t;
6224+ ')
6225+
6226+ read_chr_files_pattern($1, device_t, fastrpc_secure_device_t)
6227+ ')
0 commit comments