From: Krzysztof Kozlowski <krzk@kernel.org>
To: Richard Weinberger <richard@nod.at>, linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
arnd@arndb.de, lee@kernel.org, dakr@kernel.org,
rafael@kernel.org, gregkh@linuxfoundation.org,
broonie@kernel.org, tony@atomide.com, rogerq@kernel.org,
khilman@baylibre.com, andreas@kemnade.info, aaro.koskinen@iki.fi,
conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 3/4] syscon: Wire up has-inaccessible-regs
Date: Sat, 29 Nov 2025 16:25:28 +0100 [thread overview]
Message-ID: <58ccca49-f30c-4461-b4aa-4985f72c89fb@kernel.org> (raw)
In-Reply-To: <20251129142042.344359-4-richard@nod.at>
On 29/11/2025 15:20, Richard Weinberger wrote:
> Evaluate the has-inaccessible-regs device tree property to disable
> debugfs access if a register map contains dangerous/harmful registers.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
> drivers/mfd/syscon.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index ae71a2710bed8..73fff0df3f42f 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -70,6 +70,16 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_res)
> else if (of_property_read_bool(np, "native-endian"))
> syscon_config.val_format_endian = REGMAP_ENDIAN_NATIVE;
>
> +
> + /*
> + * Disable debugfs access if a register map has various inaccessible
> + * registers.
> + * In such a case the device driver has to know exactly how and when
> + * access is allowed but general access via userspace can cause harm.
> + */
> + if (of_property_read_bool(np, "has-inaccessible-regs"))
> + syscon_config.debugfs_disable = true;
So you mark ENTIRE device like that? Then you don't need the property.
Your compatible already tells you that (IOW, this is fully deducible
from the compatible).
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-11-29 15:25 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=58ccca49-f30c-4461-b4aa-4985f72c89fb@kernel.org \
--to=krzk@kernel.org \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=dakr@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=tony@atomide.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).