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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <58ccca49-f30c-4461-b4aa-4985f72c89fb@kernel.org>
Date: Sat, 29 Nov 2025 16:25:28 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Richard Weinberger <richard@....at>, linux-kernel@...r.kernel.org
Cc: linux-omap@...r.kernel.org, devicetree@...r.kernel.org, arnd@...db.de,
 lee@...nel.org, dakr@...nel.org, rafael@...nel.org,
 gregkh@...uxfoundation.org, broonie@...nel.org, tony@...mide.com,
 rogerq@...nel.org, khilman@...libre.com, andreas@...nade.info,
 aaro.koskinen@....fi, conor+dt@...nel.org, krzk+dt@...nel.org,
 robh@...nel.org
Subject: Re: [PATCH 3/4] syscon: Wire up has-inaccessible-regs

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ