From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
"Jordan Crouse" <jordan@cosmicpenguin.net>,
"Akhil P Oommen" <quic_akhilpo@quicinc.com>,
"Rob Clark" <robdclark@chromium.org>,
"Abhinav Kumar" <quic_abhinavk@quicinc.com>,
"Bjorn Andersson" <bjorn.andersson@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Dan Carpenter" <dan.carpenter@oracle.com>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
"Emma Anholt" <emma@anholt.net>,
"Jonathan Marek" <jonathan@marek.ca>,
linux-kernel@vger.kernel.org (open list),
"Stephen Boyd" <swboyd@chromium.org>,
"Vladimir Lypak" <vladimir.lypak@gmail.com>,
"Yangtao Li" <tiny.windzz@gmail.com>
Subject: [PATCH 0/4] drm/msm: Clear perf counters across context switch
Date: Thu, 3 Mar 2022 16:52:13 -0800 [thread overview]
Message-ID: <20220304005317.776110-1-robdclark@gmail.com> (raw)
From: Rob Clark <robdclark@chromium.org>
Some clever folks figured out a way to use performance counters as a
side-channel[1]. But, other than the special case of using the perf
counters for system profiling, we can reset the counters across context
switches to protect against this.
This series introduces a SYSPROF param which a sufficiently privilaged
userspace (like Mesa's pps-producer, which already must run as root) to
opt-out, and makes the default behavior to reset counters on context
switches.
[1] https://dl.acm.org/doi/pdf/10.1145/3503222.3507757
Rob Clark (4):
drm/msm: Update generated headers
drm/msm: Add SET_PARAM ioctl
drm/msm: Add SYSPROF param (v2)
drm/msm/a6xx: Zap counters across context switch
drivers/gpu/drm/msm/adreno/a2xx.xml.h | 26 +-
drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 1 +
drivers/gpu/drm/msm/adreno/a3xx.xml.h | 30 +-
drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 1 +
drivers/gpu/drm/msm/adreno/a4xx.xml.h | 112 ++-
drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 1 +
drivers/gpu/drm/msm/adreno/a5xx.xml.h | 63 +-
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 1 +
drivers/gpu/drm/msm/adreno/a6xx.xml.h | 674 +++++++++++-------
drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 26 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 30 +
.../gpu/drm/msm/adreno/adreno_common.xml.h | 31 +-
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 14 +
drivers/gpu/drm/msm/adreno/adreno_gpu.h | 2 +
drivers/gpu/drm/msm/adreno/adreno_pm4.xml.h | 46 +-
drivers/gpu/drm/msm/disp/mdp4/mdp4.xml.h | 37 +-
drivers/gpu/drm/msm/disp/mdp5/mdp5.xml.h | 37 +-
drivers/gpu/drm/msm/disp/mdp_common.xml.h | 37 +-
drivers/gpu/drm/msm/dsi/dsi.xml.h | 37 +-
drivers/gpu/drm/msm/dsi/dsi_phy_10nm.xml.h | 37 +-
drivers/gpu/drm/msm/dsi/dsi_phy_14nm.xml.h | 37 +-
drivers/gpu/drm/msm/dsi/dsi_phy_20nm.xml.h | 37 +-
drivers/gpu/drm/msm/dsi/dsi_phy_28nm.xml.h | 37 +-
.../gpu/drm/msm/dsi/dsi_phy_28nm_8960.xml.h | 37 +-
drivers/gpu/drm/msm/dsi/dsi_phy_5nm.xml.h | 480 -------------
drivers/gpu/drm/msm/dsi/dsi_phy_7nm.xml.h | 43 +-
drivers/gpu/drm/msm/dsi/mmss_cc.xml.h | 37 +-
drivers/gpu/drm/msm/dsi/sfpb.xml.h | 37 +-
drivers/gpu/drm/msm/hdmi/hdmi.xml.h | 37 +-
drivers/gpu/drm/msm/hdmi/qfprom.xml.h | 37 +-
drivers/gpu/drm/msm/msm_drv.c | 28 +
drivers/gpu/drm/msm/msm_gpu.c | 2 +
drivers/gpu/drm/msm/msm_gpu.h | 29 +
drivers/gpu/drm/msm/msm_submitqueue.c | 39 +
include/uapi/drm/msm_drm.h | 28 +-
35 files changed, 1058 insertions(+), 1130 deletions(-)
delete mode 100644 drivers/gpu/drm/msm/dsi/dsi_phy_5nm.xml.h
--
2.35.1
next reply other threads:[~2022-03-04 0:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 0:52 Rob Clark [this message]
2022-03-04 0:52 ` [PATCH 1/4] drm/msm: Update generated headers Rob Clark
2022-03-04 0:52 ` [PATCH 2/4] drm/msm: Add SET_PARAM ioctl Rob Clark
2022-03-04 0:52 ` [PATCH 3/4] drm/msm: Add SYSPROF param (v2) Rob Clark
2022-03-04 0:52 ` [PATCH 4/4] drm/msm/a6xx: Zap counters across context switch Rob Clark
2022-03-07 15:06 ` [PATCH 0/4] drm/msm: Clear perf " Akhil P Oommen
-- strict thread matches above, loose matches on Subject: below --
2022-03-03 19:46 Rob Clark
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=20220304005317.776110-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=bjorn.andersson@linaro.org \
--cc=christian.koenig@amd.com \
--cc=dan.carpenter@oracle.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=emma@anholt.net \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=jordan@cosmicpenguin.net \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_akhilpo@quicinc.com \
--cc=robdclark@chromium.org \
--cc=swboyd@chromium.org \
--cc=tiny.windzz@gmail.com \
--cc=vladimir.lypak@gmail.com \
/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