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]
Date:	Fri, 15 Feb 2013 14:47:08 -0800
From:	Bryan Wu <cooloney@...il.com>
To:	Christian Gmeiner <christian.gmeiner@...il.com>,
	akpm <akpm@...ux-foundation.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] leds-ot200: Fix misbehavior caused by wrong bit masks

On Wed, Feb 13, 2013 at 7:58 AM, Christian Gmeiner
<christian.gmeiner@...il.com> wrote:
> During the development of this driver an in-house register
> documentation was used. The last weeks some integration tests
> were done and this problem was found. It turned out that
> the released register documentation is wrong.
>
> The fix is very simple: shift all masks by one.
>
> Our customers can control LEDs from userspace via Java,
> C++ or what every. They have running/working applications where
> they want to control led_3 but led_2 get's used.
> I got a bug report in our in-house bug tracker so it would be
> great to fix this upstream.
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner@...il.com>

Thanks, Christian.

And Andrew, are you going to take care of this patch? Or I will merge this.

-Bryan

> ---
>  drivers/leds/leds-ot200.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/leds/leds-ot200.c b/drivers/leds/leds-ot200.c
> index ee14662..98cae52 100644
> --- a/drivers/leds/leds-ot200.c
> +++ b/drivers/leds/leds-ot200.c
> @@ -47,37 +47,37 @@ static struct ot200_led leds[] = {
>         {
>                 .name = "led_1",
>                 .port = 0x49,
> -               .mask = BIT(7),
> +               .mask = BIT(6),
>         },
>         {
>                 .name = "led_2",
>                 .port = 0x49,
> -               .mask = BIT(6),
> +               .mask = BIT(5),
>         },
>         {
>                 .name = "led_3",
>                 .port = 0x49,
> -               .mask = BIT(5),
> +               .mask = BIT(4),
>         },
>         {
>                 .name = "led_4",
>                 .port = 0x49,
> -               .mask = BIT(4),
> +               .mask = BIT(3),
>         },
>         {
>                 .name = "led_5",
>                 .port = 0x49,
> -               .mask = BIT(3),
> +               .mask = BIT(2),
>         },
>         {
>                 .name = "led_6",
>                 .port = 0x49,
> -               .mask = BIT(2),
> +               .mask = BIT(1),
>         },
>         {
>                 .name = "led_7",
>                 .port = 0x49,
> -               .mask = BIT(1),
> +               .mask = BIT(0),
>         }
>  };
>
> --
> 1.7.12.2.421.g261b511
>
--
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