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] [day] [month] [year] [list]
Date:   Thu, 09 Mar 2023 18:41:11 +0200
From:   Jani Nikula <jani.nikula@...el.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     linux-kernel@...r.kernel.org, Jean Delvare <jdelvare@...e.com>,
        linux-hwmon@...r.kernel.org
Subject: Re: [PATCH] hwmon: constify struct hwmon_chip_info info member harder

On Thu, 09 Mar 2023, Guenter Roeck <linux@...ck-us.net> wrote:
> On Thu, Mar 09, 2023 at 01:14:28PM +0200, Jani Nikula wrote:
>> On Thu, 09 Mar 2023, Guenter Roeck <linux@...ck-us.net> wrote:
>> > On Thu, Mar 09, 2023 at 10:28:41AM +0200, Jani Nikula wrote:
>> >> Let the struct hwmon_chip_info info member be a pointer to a const array
>> >> of const pointers, rather than mutable array of const pointers.
>> >> 
>> >> Cc: Jean Delvare <jdelvare@...e.com>
>> >> Cc: Guenter Roeck <linux@...ck-us.net>
>> >> Cc: linux-hwmon@...r.kernel.org
>> >> Signed-off-by: Jani Nikula <jani.nikula@...el.com>
>> >> ---
>> >>  include/linux/hwmon.h | 2 +-
>> >>  1 file changed, 1 insertion(+), 1 deletion(-)
>> >> 
>> >> diff --git a/include/linux/hwmon.h b/include/linux/hwmon.h
>> >> index c1b62384b6ee..492dd27a5dd8 100644
>> >> --- a/include/linux/hwmon.h
>> >> +++ b/include/linux/hwmon.h
>> >> @@ -430,7 +430,7 @@ struct hwmon_channel_info {
>> >>   */
>> >>  struct hwmon_chip_info {
>> >>  	const struct hwmon_ops *ops;
>> >> -	const struct hwmon_channel_info **info;
>> >> +	const struct hwmon_channel_info * const *info;
>> >
>> > As pointed out by 0-day, you's also have to change each
>> > instance where this is is assigned to another variable.
>> 
>> Ah, sorry, I had THERMAL_OF=n.
>> 
>
> You also didn't test compile drivers/hwmon/hwmon.c.
> I had wondered about that, and 0-day now confirmed it.

I most certainly did. And as I looked into why I didn't see the failure
0-day hits I noticed THERMAL_OF=n like I said.

BR,
Jani.

>
> Guenter
>
>> BR,
>> Jani.
>> 
>> 
>> >
>> > Guenter
>> >
>> >>  };
>> >>  
>> >>  /* hwmon_device_register() is deprecated */
>> >> -- 
>> >> 2.39.1
>> >> 
>> 
>> -- 
>> Jani Nikula, Intel Open Source Graphics Center

-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ