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: <CAHp75VckJ6Ea445qjGocTCEiOhZ-wKZHV5fP4-_Vt=HvDKLLgw@mail.gmail.com>
Date:   Fri, 5 Jan 2018 16:44:13 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Mario Limonciello <Mario.Limonciello@...l.com>
Cc:     Pali Rohár <pali.rohar@...il.com>,
        Darren Hart <dvhart@...radead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        Andy Lutomirski <luto@...nel.org>, quasisec@...gle.com,
        "Rafael J. Wysocki" <rjw@...ysocki.net>, mjg59@...gle.com,
        Christoph Hellwig <hch@....de>, Greg KH <greg@...ah.com>,
        One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
Subject: Re: [PATCH v10 12/15] platform/x86: dell-smbios: Add filtering support

On Fri, Jan 5, 2018 at 4:32 PM,  <Mario.Limonciello@...l.com> wrote:

>> I know that this patch is already applied and merged, but I spotted this
>> problem:
>>
>> On Thursday 19 October 2017 12:50:15 Mario Limonciello wrote:
>> > +/* calls that are explicitly blacklisted */
>> > +static struct smbios_call call_blacklist[] = {
>> > +   {0x0000, 01, 07}, /* manufacturing use */
>> > +   {0x0000, 06, 05}, /* manufacturing use */
>> > +   {0x0000, 11, 03}, /* write once */
>> > +   {0x0000, 11, 07}, /* write once */
>>
>> Numbers prefixed by zero means that they are in octal notation, right?
> Is that how the kernel interprets an integer prefix by zero?

No, compiler.

> I prefixed by zero for readability, they're supposed to be decimal.

...which make a confusion. Luckily you don't have 8 and 9 there,
otherwise I even don't know if it would be a compilation warning.

>> This can lead to misunderstanding, confusion or problems in future...
>>
>> Can we have all numbers either in hexadecimal or decimal notation?
>
> Could you elaborate more why this is problematic the way it is?

> Are you meaning you would rather see this?
>         {0x0000, 1, 7}, /* manufacturing use */
>         {0x0000, 6, 5}, /* manufacturing use */
>         {0x0000, 11, 3}, /* write once */
>         {0x0000, 11, 7}, /* write once */

I think something like that. You might use white space for indentation.

>
> That seems less readable to me but should interpret the same way.
>
> Perhaps it would be better if you submit a patch with what is clearer to
> you.



-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ