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: <51FB137D.7070000@gmail.com>
Date:	Fri, 02 Aug 2013 10:03:41 +0800
From:	Aaron Lu <aaron.lwe@...il.com>
To:	Felipe Contreras <felipe.contreras@...il.com>
CC:	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
	"Rafael J. Wysocki" <rjw@...k.pl>, Len Brown <lenb@...nel.org>,
	Zhang Rui <rui.zhang@...el.com>
Subject: Re: [PATCH] acpi: video: fix reversed indexed BQC

On 08/02/2013 07:34 AM, Felipe Contreras wrote:
> Commit 1a7c618 (ACPI video: support _BQC/_BCL/_BCM methods that use
> index values) assumed that bl->levels were not reverted, but at this
> point they already are, so there's no need to revert them yet again.

When acpi_video_bqc_value_to_level is called, bl->levels is not
reverted. Can you please point me the code path when it is called and
bl->levels were still reverted? I think we will need to fix that then.

-Aaron

> 
> Signed-off-by: Felipe Contreras <felipe.contreras@...il.com>
> ---
>  drivers/acpi/video.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> index 0ec434d..b27c049 100644
> --- a/drivers/acpi/video.c
> +++ b/drivers/acpi/video.c
> @@ -499,19 +499,10 @@ acpi_video_bqc_value_to_level(struct acpi_video_device *device,
>  {
>  	unsigned long long level;
>  
> -	if (device->brightness->flags._BQC_use_index) {
> -		/*
> -		 * _BQC returns an index that doesn't account for
> -		 * the first 2 items with special meaning, so we need
> -		 * to compensate for that by offsetting ourselves
> -		 */
> -		if (device->brightness->flags._BCL_reversed)
> -			bqc_value = device->brightness->count - 3 - bqc_value;
> -
> +	if (device->brightness->flags._BQC_use_index)
>  		level = device->brightness->levels[bqc_value + 2];
> -	} else {
> +	else
>  		level = bqc_value;
> -	}
>  
>  	level += bqc_offset_aml_bug_workaround;
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ