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:	Tue, 26 Jul 2011 09:24:27 -0700
From:	Andres Salomon <dilinger@...ued.net>
To:	Daniel Drake <dsd@...top.org>
Cc:	mingo@...hat.com, tglx@...utronix.de, hpa@...or.com,
	x86@...nel.org, pgf@...top.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86, olpc: Wait for last byte of EC command to be
 accepted

Acked-by: Andres Salomon <dilinger@...ued.net>

After some squinting.. This patch looks correct.  This is a
long-standing issue, we should probably add a Cc: stable@...nel.org so
it gets picked up for stable kernels.

On Tue, 26 Jul 2011
16:42:26 +0100 (BST) Daniel Drake <dsd@...top.org> wrote:

> From: Paul Fox <pgf@...top.org>
> 
> When executing EC commands, only waiting when there are still more
> bytes to write is usually fine. However, if the system suspends very
> quickly after a call to olpc_ec_cmd(), the last data byte may not yet
> be transferred to the EC, and the command will not complete.
> 
> This solves a bug where the SCI wakeup mask was not correctly written
> when going into suspend.
> 
> Signed-off-by: Paul Fox <pgf@...top.org>
> Signed-off-by: Daniel Drake <dsd@...top.org>
> ---
>  arch/x86/platform/olpc/olpc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/platform/olpc/olpc.c
> b/arch/x86/platform/olpc/olpc.c index 8b9940e..7cce722 100644
> --- a/arch/x86/platform/olpc/olpc.c
> +++ b/arch/x86/platform/olpc/olpc.c
> @@ -161,13 +161,13 @@ restart:
>  	if (inbuf && inlen) {
>  		/* write data to EC */
>  		for (i = 0; i < inlen; i++) {
> +			pr_devel("olpc-ec:  sending cmd arg 0x%x\n",
> inbuf[i]);
> +			outb(inbuf[i], 0x68);
>  			if (wait_on_ibf(0x6c, 0)) {
>  				printk(KERN_ERR "olpc-ec:  timeout
> waiting for" " EC accept data!\n");
>  				goto err;
>  			}
> -			pr_devel("olpc-ec:  sending cmd arg 0x%x\n",
> inbuf[i]);
> -			outb(inbuf[i], 0x68);
>  		}
>  	}
>  	if (outbuf && outlen) {

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