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: <47164712-876e-4bb8-a4fa-4b3d91f2554b@roeck-us.net>
Date: Fri, 1 Nov 2024 08:08:31 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Jerome Brunet <jbrunet@...libre.com>
Cc: Jean Delvare <jdelvare@...e.com>, Jonathan Corbet <corbet@....net>,
	Patrick Rudolph <patrick.rudolph@...ements.com>,
	Naresh Solanki <naresh.solanki@...ements.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Delphine CC Chiu <Delphine_CC_Chiu@...ynn.com>,
	linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org, devicetree@...r.kernel.org,
	linux-i2c@...r.kernel.org
Subject: Re: [PATCH v3 3/6] hwmon: (pmbus/core) add wp module param

On Thu, Oct 24, 2024 at 08:10:37PM +0200, Jerome Brunet wrote:
> Add a module parameter to force the write protection mode of pmbus chips.
> 
> 2 protections modes are provided to start with:
> * 0: Remove the write protection if possible
> * 1: Enable full write protection if possible
> 
> Of course, if the parameter is not provided, the default write protection
> status of the pmbus chips is left untouched.
> 
> Suggested-by: Guenter Roeck <linux@...ck-us.net>
> Signed-off-by: Jerome Brunet <jbrunet@...libre.com>
> ---
>  Documentation/admin-guide/kernel-parameters.txt |  4 ++
>  drivers/hwmon/pmbus/pmbus_core.c                | 74 ++++++++++++++++++-------
>  2 files changed, 59 insertions(+), 19 deletions(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 1518343bbe2237f1d577df5656339d6224b769be..aa79242fe0a9238f618182289f18563ed63cba1c 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -4733,6 +4733,10 @@
>  			Format: { parport<nr> | timid | 0 }
>  			See also Documentation/admin-guide/parport.rst.
>  
> +	pmbus.wp=	[HW] PMBus Chips write protection forced mode
> +			Format: { 0 | 1 }
> +			See drivers/hwmon/pmbus/pmbus_core.c
> +

I have always seen that file as applicable for core kernel parameters,
not for driver kernel parameters. I can not accept a global change like
this without guidance. Please explain why it is desirable to have this
parameter documented here and not in driver documentation.

>  	pmtmr=		[X86] Manual setup of pmtmr I/O Port.
>  			Override pmtimer IOPort with a hex value.
>  			e.g. pmtmr=0x508
> diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
> index 7bdd8f2ffcabc51500437182f411e9826cd7a55d..ce697ca03de01c0e5a352f8f6b72671137721868 100644
> --- a/drivers/hwmon/pmbus/pmbus_core.c
> +++ b/drivers/hwmon/pmbus/pmbus_core.c
> @@ -31,6 +31,20 @@
>  #define PMBUS_ATTR_ALLOC_SIZE	32
>  #define PMBUS_NAME_SIZE		24
>  
> +/*
> + * PMBus write protect forced mode:
> + * PMBus may come up with a variety of write protection configuration.
> + * 'pmbus_wp' may be used if a particular write protection is necessary.
> + * The ability to actually alter the protection may also depend on the chip
> + * so the actual runtime write protection configuration may differ from
> + * the requested one. pmbus_core currently support the following value:
> + * - 0: write protection removed
> + * - 1: write protection fully enabled, including OPERATION and VOUT_COMMAND
> + *      registers. Chips essentially become read-only with this.

Would it be desirable to also suppport the ability to set the output voltage
but not limits (PB_WP_VOUT) ?

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ