misc: fastrpc: check before loading process to the DSP

Reject session if DSP domain is secure, device node is non-secure and signed
PD is requested. Secure device node can access DSP without any restriction.

Unsigned PD offload is only allowed for the DSP domain that can support
unsigned offloading.

Signed-off-by: Jeya R <jeyr@codeaurora.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220214161002.6831-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jeya R
2022-02-14 16:09:56 +00:00
committed by Greg Kroah-Hartman
parent 3abe3ab3cd
commit 7f1f481263
2 changed files with 50 additions and 0 deletions

View File

@@ -46,6 +46,23 @@ enum fastrpc_map_flags {
FASTRPC_MAP_MAX,
};
enum fastrpc_proc_attr {
/* Macro for Debug attr */
FASTRPC_MODE_DEBUG = (1 << 0),
/* Macro for Ptrace */
FASTRPC_MODE_PTRACE = (1 << 1),
/* Macro for CRC Check */
FASTRPC_MODE_CRC = (1 << 2),
/* Macro for Unsigned PD */
FASTRPC_MODE_UNSIGNED_MODULE = (1 << 3),
/* Macro for Adaptive QoS */
FASTRPC_MODE_ADAPTIVE_QOS = (1 << 4),
/* Macro for System Process */
FASTRPC_MODE_SYSTEM_PROCESS = (1 << 5),
/* Macro for Prvileged Process */
FASTRPC_MODE_PRIVILEGED = (1 << 6),
};
struct fastrpc_invoke_args {
__u64 ptr;
__u64 length;