remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers
authorSibi Sankar <quic_sibis@quicinc.com>
Tue, 17 Jan 2023 08:58:35 +0000 (14:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:40 +0000 (09:33 +0100)
commitdc5887dcc5382a3b7a7806fc35b7809da013f6df
tree03a98dc181805d3c6a3fd7c3f1fb2b32ae9a3644
parent0e27e6598201555077c87390be03938b54209e7b
remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers

[ Upstream commit 57f72170a2b2a362c35bb9407fc844eac5afdec1 ]

Any access to the dynamically allocated metadata region by the application
processor after assigning it to the remote Q6 will result in a XPU
violation. Fix this by replacing the dynamically allocated memory region
with a no-map carveout and unmap the modem metadata memory region before
passing control to the remote Q6.

Reported-and-tested-by: Amit Pundir <amit.pundir@linaro.org>
Fixes: 6c5a9dc2481b ("remoteproc: qcom: Make secure world call for mem ownership switch")
Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230117085840.32356-7-quic_sibis@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/remoteproc/qcom_q6v5_mss.c