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] [day] [month] [year] [list]
Message-Id: <201412220907.37405@pali>
Date:	Mon, 22 Dec 2014 09:07:36 +0100
From:	Pali Rohár <pali.rohar@...il.com>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Arnd Bergmann <arnd@...db.de>,
	"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/10] i8k: Add support for fan labels

On Monday 22 December 2014 00:01:49 Guenter Roeck wrote:
> > +static ssize_t i8k_hwmon_show_fan_label(struct device *dev,
> > +					struct device_attribute *devattr,
> > +					char *buf)
> > +{
> > +	static const char * const labels[] = {
> > +		"Processor Fan",
> > +		"Motherboard Fan",
> > +		"Video Fan",
> > +		"Power Supply Fan",
> > +		"Chipset Fan",
> > +		"Other Fan",
> > +	};
> > +	int index = to_sensor_dev_attr(devattr)->index;
> > +	bool dock = false;
> > +	int type;
> > +
> > +	type = i8k_get_fan_type(index);
> > +	if (type < 0)
> > +		return type;
> > +
> > +	if (type & 0x10) {
> > +		dock = true;
> > +		type &= 0x0F;
> > +	}
> > +
> 
> What if bit 5..7 is set ? This would result in a result of
> "other fan", which given the above does not seem to be
> correct. Given that, I wonder why the type mask is only
> applied if bit 4 is set and not unconditionally.
> 
> Thanks,
> Guenter
> 

NBSVC.MDM maps values 0x0-0x5 to exactly to strings in labels[]. 
Next it maps 0x10-0x15 to values same values in strings labels[] 
but with prefix "Docking". I do not see nothing more in NBSVC.MDM 
so for other values is "Other Fan" better than nothing.

-- 
Pali Rohár
pali.rohar@...il.com

Download attachment "signature.asc " of type "application/pgp-signature" (199 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ