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: <1AE640813FDE7649BE1B193DEA596E883BC004B2@SHSMSX101.ccr.corp.intel.com>
Date:	Wed, 6 Jul 2016 02:08:22 +0000
From:	"Zheng, Lv" <lv.zheng@...el.com>
To:	"Rafael J. Wysocki" <rafael@...nel.org>
CC:	"Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	"Brown, Len" <len.brown@...el.com>, Lv Zheng <zetalog@...il.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Arnd Bergmann <arnd@...db.de>
Subject: RE: [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger
 stops working

Hi, Rafael

> From: rjwysocki@...il.com [mailto:rjwysocki@...il.com] On Behalf Of
> Rafael J. Wysocki
> Subject: Re: [PATCH 2/5] ACPI / debugger: Fix regressions that AML
> debugger stops working
> 
> On Tue, Jul 5, 2016 at 1:18 PM, Lv Zheng <lv.zheng@...el.com> wrote:
> > The FIFO unlocking mechanism in acpi_dbg has been messed up by the
> > following commit:
> >   Commit: 287980e49ffc0f6d911601e7e352a812ed27768e
> >   Subject: remove lots of IS_ERR_VALUE abuses
> > It converts !IS_ERR_VALUE(ret) into !ret. This patch fixes the
> > regression.
> >
> > Fixes: 287980e49ffc ("remove lots of IS_ERR_VALUE abuses")
> > Signed-off-by: Lv Zheng <lv.zheng@...el.com>
> > Cc: Arnd Bergmann <arnd@...db.de>
> 
> OK, but ->
> 
> > ---
> >  drivers/acpi/acpi_dbg.c |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
> > index 1f41284..ebc8d18 100644
> > --- a/drivers/acpi/acpi_dbg.c
> > +++ b/drivers/acpi/acpi_dbg.c
> > @@ -602,7 +602,8 @@ static int acpi_aml_read_user(char __user *buf,
> int len)
> >         crc->tail = (crc->tail + n) & (ACPI_AML_BUF_SIZE - 1);
> >         ret = n;
> >  out:
> > -       acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, !ret);
> > +       acpi_aml_unlock_fifo(ACPI_AML_OUT_USER,
> > +                            ret < 0 ? false : true);
> 
> -> The ternary operation is not necessary here, because the result of
> (ret < 0) is already boolean.  So this can be written as
> 
> acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, ret >= 0);
> 
> and analogously below.
> 
> I've made that change, please check the result in bleeding-edge.

[Lv Zheng] 
Confirmed to be working.
Thanks for the simplification.

Thanks and best regards
-Lv

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ