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, 21 Oct 2010 17:54:20 +0100
From:	Sitsofe Wheeler <sitsofe@...oo.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Henrique de Moraes Holschuh <hmh@....eng.br>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	Len Brown <lenb@...nel.org>, Zhang Rui <rui.zhang@...el.com>,
	David Zeuthen <davidz@...hat.com>,
	Richard Hughes <richard@...hsie.com>,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPI / Battery: Return -ENODATA for unknown values in
	get_property()

On Sun, Oct 17, 2010 at 08:32:42PM +0200, Rafael J. Wysocki wrote:
> 
> Still, if user space has problems with failing reads from the sysfs
> attributes, it may be better to simply put -1 in there.  Patch is
> appended, please test.

This patch does what it says on the tin (returns -1 in sysfs on my EeePC
900). So:

Tested-by: Sitsofe Wheeler <sitsofe@...oo.com>

It's a shame the previous changes didn't work as they stopped a buggy
upower using the -1 value (and producing a nonsense rate like 8.4e-06)
but it's not clear which part of the stack can't handle -ENODATA
perhaps it is another part of the kernel?

Richard, any chance of upower being changed to test for -1 before doing
doing anything with current_now (
http://cgit.freedesktop.org/DeviceKit/upower/tree/src/linux/up-device-supply.c?id=5387183d53c16a987a0737c1bdec1b62edf3daa6#n561)?
I guess there are a whole bunch of other attributes that could
theoretically be -1 and shouldn't be used if they return it...

-- 
Sitsofe | http://sucs.org/~sits/
--
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