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: <20101119120523.15bc341c.akpm@linux-foundation.org>
Date:	Fri, 19 Nov 2010 12:05:23 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Matthew Garrett <mjg@...hat.com>
Cc:	linux-kernel@...r.kernel.org, rpurdie@...ys.net,
	nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
	intel-gfx@...ts.freedesktop.org, linux-acpi@...r.kernel.org,
	lenb@...nel.org
Subject: Re: [PATCH 1/5] Backlight: Add backlight type

On Fri, 19 Nov 2010 10:53:52 -0500
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.
> 
> ...
>
>  60 files changed, 102 insertions(+), 0 deletions(-)

This patch has a pretty short half-life.

>
> ...
>
> --- a/include/linux/backlight.h
> +++ b/include/linux/backlight.h
> @@ -32,6 +32,12 @@ enum backlight_update_reason {
>  	BACKLIGHT_UPDATE_SYSFS,
>  };
>  
> +enum backlight_type {
> +	BACKLIGHT_RAW,
> +	BACKLIGHT_PLATFORM,
> +	BACKLIGHT_FIRMWARE,
> +};
> +
>  struct backlight_device;
>  struct fb_info;
>  
> @@ -62,6 +68,8 @@ struct backlight_properties {
>  	/* FB Blanking active? (values as for power) */
>  	/* Due to be removed, please use (state & BL_CORE_FBBLANK) */
>  	int fb_blank;
> +	/* Backlight type */
> +	enum backlight_type type;
>  	/* Flags used to signal drivers of state changes */
>  	/* Upper 4 bits are reserved for driver internal use */
>  	unsigned int state;

And if/when the half-life expires, we'll have drivers in-tree which
forget to set backlight_properties.type.  I haven't checked, but if
we're lucky they will default to "0".

What will be the runtime effects upon such unconverted drivers? 
Ideally we'd like them to continue to work OK, and to emit a runtime
warning.  In which case you'll need BACKLIGHT_RAW=1 so the unconverted
driver can be detected, warned about and fixed up by the core code.

--
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