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:	Mon, 7 Aug 2006 13:55:52 +0000
From:	Pavel Machek <pavel@...e.cz>
To:	Shem Multinymous <multinymous@...il.com>
Cc:	Robert Love <rlove@...ve.org>, Jean Delvare <khali@...ux-fr.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org, hdaps-devel@...ts.sourceforge.net
Subject: Re: [PATCH 02/12] hdaps: Use thinkpad_ec instead of direct port access

Hi!

Yes, this looks badly needed.

> As you can see from the comments at the beginning of the patch, the old
> driver got some stuff wrong about the meaning of EC readouts. This patch
> preserves the old broken behavior; it will be fixed in a later patch.
> 
> Signed-off-by: Shem Multinymous <multinymous@...il.com>

Signed-off-by: Pavel Machek <pavel@...e.cz>

> @@ -209,77 +131,79 @@ static int hdaps_read_pair(unsigned int 
>   * hdaps_device_init - initialize the accelerometer.  Returns zero on success
>   * and negative error code on failure.  Can sleep.
>   */
> +#define ABORT_INIT(msg) { printk(KERN_ERR "hdaps init: %s\n", msg); goto bad; }

No.. macro with embedded goto is *evil*.

> +	if (thinkpad_ec_read_row(&args, &data))
> +		ABORT_INIT("read1");
> +	if (data.val[0xF]!=0x00)
> +		ABORT_INIT("check1");

!=0 in if is evil...

> +	mode = data.val[0x1];
> +		
> +	printk(KERN_DEBUG "hdaps: initial mode latch is 0x%02x\n", mode);
> +	if (mode==0x00)

if !mode ?

							Pavel

-- 
Thanks for all the (sleeping) penguins.
-
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