From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Gilad Ben-Yossef <gilad@benyossef.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Felipe Balbi <balbi@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Mathias Nyman <mathias.nyman@intel.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Chunfeng Yun <chunfeng.yun@mediatek.com>, Bin Liu <b-liu@ti.com>,
linux-crypto@vger.kernel.org, linux-pm@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] Fix debugfs register access while suspended
Date: Fri, 24 Jan 2020 17:24:52 +0100 [thread overview]
Message-ID: <20200124162452.GC286344@oden.dyn.berto.se> (raw)
In-Reply-To: <20200124132957.15769-1-geert+renesas@glider.be>
Hi Geert,
Thanks for your series.
On 2020-01-24 14:29:55 +0100, Geert Uytterhoeven wrote:
> Hi all,
>
> While comparing register values read from debugfs files under
> /sys/kernel/debug/ccree/, I noticed some oddities.
> Apparently there is no guarantee these registers are read from the
> device while it is resumed. This may lead to bogus values, or crashes
> and lock-ups.
>
> This patch series:
> 1. Allows debugfs_create_regset32() to be used for devices whose
> registers must be accessed when resumed,
> 2. Fixes the CCREE driver to make use of this.
>
> I have identified several other drivers that may be affected (i.e.
> using debugfs_create_regset32() and pm_runtime_*()):
> - drivers/gpu/drm/msm/disp/dpu1
> - drivers/usb/dwc3
> - drivers/usb/host/ehci-omap.c
> - drivers/usb/host/ehci-tegra.c
> - drivers/usb/host/ohci-platform.c
> - drivers/usb/host/xhci.c
> - drivers/usb/host/xhci-dbgcap.c
> - drivers/usb/host/xhci-histb.c
> - drivers/usb/host/xhci-hub.c
> - drivers/usb/host/xhci-mtk.c
> - drivers/usb/host/xhci-pci.c
> - drivers/usb/host/xhci-plat.c
> - drivers/usb/host/xhci-tegra.c
> - drivers/usb/mtu3
> - drivers/usb/musb
>
> Some of these call pm_runtime_forbid(), but given the comment "users
> should enable runtime pm using power/control in sysfs", this can be
> overridden from userspace, so these are unsafe, too?
>
> Thanks for your comments!
Looks good to me,
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
>
> Geert Uytterhoeven (2):
> debugfs: regset32: Add Runtime PM support
> crypto: ccree - fix debugfs register access while suspended
>
> drivers/crypto/ccree/cc_debugfs.c | 2 ++
> fs/debugfs/file.c | 8 ++++++++
> include/linux/debugfs.h | 1 +
> 3 files changed, 11 insertions(+)
>
> --
> 2.17.1
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
--
Regards,
Niklas Söderlund
prev parent reply other threads:[~2020-01-24 16:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 13:29 [PATCH 0/2] Fix debugfs register access while suspended Geert Uytterhoeven
2020-01-24 13:29 ` [PATCH 1/2] debugfs: regset32: Add Runtime PM support Geert Uytterhoeven
2020-01-31 10:13 ` Rafael J. Wysocki
2020-02-10 19:01 ` Greg Kroah-Hartman
2020-01-24 13:29 ` [PATCH 2/2] crypto: ccree - fix debugfs register access while suspended Geert Uytterhoeven
2020-01-26 13:32 ` Gilad Ben-Yossef
2020-01-31 10:11 ` Rafael J. Wysocki
2020-01-24 16:24 ` Niklas Söderlund [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=20200124162452.GC286344@oden.dyn.berto.se \
--to=niklas.soderlund@ragnatech.se \
--cc=b-liu@ti.com \
--cc=balbi@kernel.org \
--cc=chunfeng.yun@mediatek.com \
--cc=davem@davemloft.net \
--cc=geert+renesas@glider.be \
--cc=gilad@benyossef.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=jonathanh@nvidia.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=rafael@kernel.org \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=stern@rowland.harvard.edu \
--cc=thierry.reding@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;
as well as URLs for NNTP newsgroup(s).