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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201705271517.30111@pali>
Date:   Sat, 27 May 2017 15:17:29 +0200
From:   Pali Rohár <pali.rohar@...il.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Darren Hart <dvhart@...radead.org>,
        Andy Shevchenko <andy@...radead.org>,
        Andy Lutomirski <luto@...nel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] platform/x86: wmi: Fix printing info about WDG structure

On Saturday 27 May 2017 15:07:09 Andy Shevchenko wrote:
> On Sat, May 27, 2017 at 2:51 PM, Pali Rohár <pali.rohar@...il.com>
> wrote:
> > object_id and notify_id are in one union structure and their
> > meaning is defined by flags. Therefore do not print notify_id for
> > non-event block and do not print object_id for event block. Remove
> > also reserved member as it does not have any defined meaning or
> > type yet.
> > 
> > As object_id and notify_id union members overlaps and have
> > different types, it caused that kernel print to dmesg binary data.
> > This patch eliminates it.
> > 
> > -       pr_info("\tobject_id: %c%c\n", g->object_id[0],
> > g->object_id[1]); -       pr_info("\tnotify_id: %02X\n",
> > g->notify_id);
> > 
> > -       pr_info("\treserved: %02X\n", g->reserved);
> 
> Do we need this? Commit message doesn't clarify.

I wrote to commit message that reserved does not have defined meaning 
nor type. Also reserved overlap with object_id[1] so for non-event 
should not be print at all. And as it is reserved, I removed it.

> > +       if (g->flags & ACPI_WMI_EVENT)
> > +               pr_info("\tnotify_id: 0x%02X\n", g->notify_id);
> > +       else
> > 
> > +               pr_info("\tobject_id: %c%c\n", g->object_id[0],
> > g->object_id[1]);
> 
> If this can still contain non-printable characters the %*pE can help
> instead.

Those are printable ASCII. object_id contains two characters which are 
suffix for ACPI method.

Problem was only for events when we tried to print notify_id as 
object_id. notify_id is binary and overlaps with object_id.

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