linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amit Pundir <amit.pundir@linaro.org>
To: Sibi Sankar <quic_sibis@quicinc.com>
Cc: andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	robh+dt@kernel.org, manivannan.sadhasivam@linaro.org,
	agross@kernel.org, linux-arm-msm@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	konrad.dybcio@somainline.org, regressions@leemhuis.info,
	sumit.semwal@linaro.org, will@kernel.org,
	catalin.marinas@arm.com, robin.murphy@arm.com
Subject: Re: [PATCH 0/4] Fix XPU violation during modem metadata authentication
Date: Tue, 27 Dec 2022 17:48:20 +0530	[thread overview]
Message-ID: <CAMi1Hd08aVZE4Hg_tnVd0-hb5QfUydEQjGhQyPdBTpE5O9Os4g@mail.gmail.com> (raw)
In-Reply-To: <20221213140724.8612-1-quic_sibis@quicinc.com>

On Tue, 13 Dec 2022 at 19:37, Sibi Sankar <quic_sibis@quicinc.com> wrote:
>
> The memory region allocated using dma_alloc_attr with no kernel mapping
> attribute set would still be a part of the linear kernel map. Any access
> to this 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.
> The addition of the carveout and memunmap is required only on SoCs that
> mandate memory protection before transferring control to Q6, hence the
> driver falls back to dynamic memory allocation in the absence of the
> modem metadata carveout.
>
> Relevant discussions on the mailing list:
> https://lore.kernel.org/lkml/20221114110329.68413-1-manivannan.sadhasivam@linaro.org/
>
> Depends on:
> https://patchwork.kernel.org/project/linux-arm-msm/cover/20221124184333.133911-1-krzysztof.kozlowski@linaro.org/
>
> Reported-by: Amit Pundir <amit.pundir@linaro.org>

Smoke tested this series on db845c (SDM845) running v6.2-rc1, with the
upstream workaround (b7d9aae40484 Revert "arm64: dma: Drop cache
invalidation from arch_dma_prep_coherent()") reverted and I can no
longer reproduce the above crash in my limited (10+) test runs so far.
So for the entire series:

Tested-by: Amit Pundir <amit.pundir@linaro.org>

Regards,
Amit Pundir

> https://people.linaro.org/~amit.pundir/linaro-sid-developer-dragonboard-845c-569/6.1-rc4_defconfig
> Reproduced with ^^ defconfig SDM845 SoCs
>
> Sibi Sankar (4):
>   arm64: dts: qcom: Introduce a carveout for modem metadata
>   dt-bindings: remoteproc: qcom: sc7180: Update memory-region
>     requirements
>   dt-bindings: remoteproc: qcom: q6v5: Update memory region requirements
>   remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem
>     headers
>
>  .../bindings/remoteproc/qcom,q6v5.txt         | 29 ++++++-
>  .../remoteproc/qcom,sc7180-mss-pil.yaml       |  3 +-
>  .../remoteproc/qcom,sc7280-mss-pil.yaml       |  3 +-
>  .../boot/dts/qcom/msm8996-xiaomi-common.dtsi  |  6 ++
>  arch/arm64/boot/dts/qcom/msm8996.dtsi         |  9 ++
>  arch/arm64/boot/dts/qcom/msm8998.dtsi         |  9 ++
>  arch/arm64/boot/dts/qcom/sc7180-idp.dts       |  7 +-
>  arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi  |  7 +-
>  .../dts/qcom/sc7280-herobrine-lte-sku.dtsi    |  7 +-
>  arch/arm64/boot/dts/qcom/sdm845.dtsi          |  9 ++
>  drivers/remoteproc/qcom_q6v5_mss.c            | 85 +++++++++++++------
>  11 files changed, 142 insertions(+), 32 deletions(-)
>
> --
> 2.17.1
>

      parent reply	other threads:[~2022-12-27 12:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 14:07 [PATCH 0/4] Fix XPU violation during modem metadata authentication Sibi Sankar
2022-12-13 14:07 ` [PATCH 1/4] arm64: dts: qcom: Introduce a carveout for modem metadata Sibi Sankar
2022-12-13 19:40   ` Krzysztof Kozlowski
2022-12-14  6:49     ` Sibi Sankar
2022-12-14  8:09       ` Krzysztof Kozlowski
2022-12-14 11:27   ` Krzysztof Kozlowski
2022-12-14 11:44     ` Sibi Sankar
2022-12-14 12:54       ` Krzysztof Kozlowski
2022-12-13 14:07 ` [PATCH 2/4] dt-bindings: remoteproc: qcom: sc7180: Update memory-region requirements Sibi Sankar
2022-12-13 19:41   ` Krzysztof Kozlowski
2022-12-14 10:25     ` Sibi Sankar
2022-12-14 11:30       ` Krzysztof Kozlowski
2022-12-14 11:56         ` Sibi Sankar
2022-12-13 14:07 ` [PATCH 3/4] dt-bindings: remoteproc: qcom: q6v5: Update memory region requirements Sibi Sankar
2022-12-13 14:07 ` [PATCH 4/4] remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers Sibi Sankar
2022-12-13 15:07   ` Robin Murphy
2022-12-13 15:57     ` Sibi Sankar
2022-12-13 16:07       ` Manivannan Sadhasivam
2022-12-14 12:49         ` Robin Murphy
2022-12-13 19:47   ` Krzysztof Kozlowski
2022-12-14 10:33     ` Sibi Sankar
2022-12-14 11:28       ` Krzysztof Kozlowski
2022-12-14 11:51         ` Sibi Sankar
2022-12-15  8:51           ` Krzysztof Kozlowski
2022-12-27 12:18 ` Amit Pundir [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMi1Hd08aVZE4Hg_tnVd0-hb5QfUydEQjGhQyPdBTpE5O9Os4g@mail.gmail.com \
    --to=amit.pundir@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=quic_sibis@quicinc.com \
    --cc=regressions@leemhuis.info \
    --cc=robh+dt@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sumit.semwal@linaro.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).