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: <844845d6-01fe-50c4-94cd-e19ce8a5d060@gmail.com>
Date:   Sun, 13 Oct 2019 18:36:01 +0200
From:   Jacek Anaszewski <jacek.anaszewski@...il.com>
To:     Pavel Machek <pavel@....cz>
Cc:     Jean-Jacques Hiblot <jjhiblot@...com>, dmurphy@...com,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH] leds: tlc591xx: update the maximum brightness

On 10/13/19 1:45 PM, Pavel Machek wrote:
> Hi!
> 
>>> @@ -112,11 +113,11 @@ tlc591xx_brightness_set(struct led_classdev *led_cdev,
>>>  	struct tlc591xx_priv *priv = led->priv;
>>>  	int err;
>>>  
>>> -	switch (brightness) {
>>> +	switch ((int)brightness) {
>>>  	case 0:
> 
> Can we get a rid of the cast here? Do we need to move away from the
> enum for the brightness?

I at first also wanted to ask for dropping the cast but first tried
to do it myself. Then I found out compiler (or sparse, I don't recall
exactly) complains about TLC591XX_MAX_BRIGHTNESS not being a value of
enum led_brighteess type. That's the reason for the cast Jean added,
I presume.

>> Added tag:
>>
>> Fixes: e370d010a5fe ("leds: tlc591xx: Driver for the TI 8/16 Channel i2c
>> LED driver")
>>
>> and applied to the for-5.5 branch.
> 
> Actually, careful with the Fixes tag. -stable people will want to
> apply it, and it may not be a good idea in this case. Maximum
> brightness of 256 is pretty unusual, so I'd call this "a bit risky".

I entirely disagree. Not seeing anything risky in that since
max_brightness is also initialized to this value. If userspace properly
uses the ABI, then it will be safe.

> Best regards,
> 									Pavel
> 

-- 
Best regards,
Jacek Anaszewski

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ