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:	Thu, 9 Sep 2010 12:59:33 -0400
From:	Mike Frysinger <vapier.adi@...il.com>
To:	Matthew Garrett <mjg@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Richard Purdie <rpurdie@...ys.net>,
	intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] Backlight: Add backlight type

On Wed, Sep 8, 2010 at 12:32, Matthew Garrett <mjg@...hat.com> wrote:
> There may be multiple ways of controlling the backlight on a given machine.
> Allow drivers to expose the type of interface they are providing, making
> it possible for userspace to make appropriate policy decisions.

maybe i missed something, but i dont see the core validating the .type
value at registration time.  since the value is then used later as an
index into an array, shouldnt it verify that it is valid ?

do you want to force everyone to declare they're "raw" ?  or just go
with the memset default to have people start with "raw" ?  otherwise
it might make sense to have the first enum be BACKLIGHT_UNKNOWN and
have the core warn when it hits that.

> --- a/drivers/video/backlight/backlight.c
> +++ b/drivers/video/backlight/backlight.c
>
> +static const char *backlight_types[] = {
> +       [BACKLIGHT_RAW] = "raw",
> +       [BACKLIGHT_PLATFORM] = "platform",
> +       [BACKLIGHT_FIRMWARE] = "firmware",
> +};

const char * const backlight_types[] ?
-mke
--
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