lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200124162452.GC286344@oden.dyn.berto.se>
Date:   Fri, 24 Jan 2020 17:24:52 +0100
From:   Niklas Söderlund 
        <niklas.soderlund@...natech.se>
To:     Geert Uytterhoeven <geert+renesas@...der.be>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Gilad Ben-Yossef <gilad@...yossef.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S . Miller" <davem@...emloft.net>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
        Felipe Balbi <balbi@...nel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Chunfeng Yun <chunfeng.yun@...iatek.com>,
        Bin Liu <b-liu@...com>, linux-crypto@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] Fix debugfs register access while suspended

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@...natech.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@...ux-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ