devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add tooling to disable debugfs on OMAP based systems
@ 2025-11-29 14:20 Richard Weinberger
  2025-11-29 14:20 ` [PATCH 1/4] dt-bindings: Document new common property: has-inaccessible-regs Richard Weinberger
                   ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: Richard Weinberger @ 2025-11-29 14:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-omap, devicetree, arnd, lee, dakr, rafael, gregkh, broonie,
	tony, rogerq, khilman, andreas, aaro.koskinen, conor+dt, krzk+dt,
	robh, Richard Weinberger

It came to my attention that commands such as `grep -r / -e ...` can cause
crashes on an AM572x based system.
An investigation found that reading from various files in /sys/kernel/debug/regmap
causes imprecise async data aborts.

One of these register maps is the CTRL_MODULE_CORE register map at 0x4A002000.
It contains various registers marked as reserved, but the manual indicates
that read access is still allowed.
On said system, reading from most registers seems to work, but for some
an async data abort happens. So it's not entirely clear what registers are safe
and which are not.

So, add tooling to allow disabling debugfs access to such dangerous registers.
Splitting the register map definitions in the device tree seemed less practical to
me since it would unnecessarily make the device trees more complicated.

Richard Weinberger (4):
  dt-bindings: Document new common property: has-inaccessible-regs
  regmap: Allow disabling debugfs via regmap_config
  syscon: Wire up has-inaccessible-regs
  arm: dts: omap: Mark various register maps as dangerous

 .../devicetree/bindings/common-properties.txt        | 12 ++++++++++++
 arch/arm/boot/dts/ti/omap/dra7-l4.dtsi               |  4 ++++
 arch/arm/boot/dts/ti/omap/dra7.dtsi                  |  1 +
 arch/arm/boot/dts/ti/omap/dra74x.dtsi                |  1 +
 drivers/base/regmap/regmap.c                         |  2 ++
 drivers/mfd/syscon.c                                 | 10 ++++++++++
 include/linux/regmap.h                               |  3 +++
 7 files changed, 33 insertions(+)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-12-01 22:40 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-29 14:20 [PATCH 0/4] Add tooling to disable debugfs on OMAP based systems Richard Weinberger
2025-11-29 14:20 ` [PATCH 1/4] dt-bindings: Document new common property: has-inaccessible-regs Richard Weinberger
2025-11-29 15:23   ` Krzysztof Kozlowski
2025-11-29 15:33     ` Richard Weinberger
2025-11-29 15:44       ` Krzysztof Kozlowski
2025-11-29 15:49         ` Krzysztof Kozlowski
2025-11-29 23:02           ` Andreas Kemnade
2025-11-29 15:56         ` Richard Weinberger
2025-11-30  8:17           ` Krzysztof Kozlowski
2025-12-01 21:34             ` Richard Weinberger
2025-12-01 21:41               ` Krzysztof Kozlowski
2025-12-01 22:40                 ` Richard Weinberger
2025-12-01 12:19       ` Mark Brown
2025-12-01 13:13   ` Rob Herring
2025-11-29 14:20 ` [PATCH 2/4] regmap: Allow disabling debugfs via regmap_config Richard Weinberger
2025-12-01 12:03   ` Mark Brown
2025-11-29 14:20 ` [PATCH 3/4] syscon: Wire up has-inaccessible-regs Richard Weinberger
2025-11-29 15:25   ` Krzysztof Kozlowski
2025-11-29 14:20 ` [PATCH 4/4] arm: dts: omap: Mark various register maps as dangerous Richard Weinberger
2025-11-29 15:26   ` Krzysztof Kozlowski
2025-11-29 15:35     ` Richard Weinberger
2025-11-29 15:54       ` Krzysztof Kozlowski
2025-11-29 16:02         ` Richard Weinberger
2025-11-29 16:48       ` Andreas Kemnade
2025-11-29 14:36 ` [PATCH 0/4] Add tooling to disable debugfs on OMAP based systems Andreas Kemnade
2025-11-29 15:18   ` Richard Weinberger
2025-12-01 12:27   ` Mark Brown
2025-12-01 12:26 ` Rob Herring

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).