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: <CAJZ5v0hOvU25zWfVjBw-2iz5Y7V2FkSwoTZVZTpjEG9KOCQ6oQ@mail.gmail.com>
Date:   Wed, 28 Feb 2018 11:33:39 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Jean Delvare <jdelvare@...e.de>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Linux PCI <linux-pci@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/4] x86/pci: Re-use new dmi_get_bios_year() helper

On Wed, Feb 28, 2018 at 11:29 AM, Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> On Mon, 2018-02-26 at 17:28 +0100, Jean Delvare wrote:
>
>> > -   if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year
>> > < 2008) {
>> > -           if (iomem_resource.end <= 0xffffffff)
>> > -                   pci_use_crs = false;
>> > -   }
>> > +   if ((dmi_get_bios_year() < 2008) && (iomem_resource.end <=
>> > 0xffffffff))
>> > +           pci_use_crs = false;
>>
>> You are changing the behavior here, when DMI does not provide a BIOS
>> date. Beforehand, the test would fail and pci_use_crs would be left
>> alone. After your change, dmi_get_bios_year() will return 0, and
>> "0 < 2008" is true, so pci_use_crs is set to false.
>
> Hmm... Indeed.
>
>> I have no opinion on what this driver should do in such case,
>
> I would assume that no BIOS date is related to prehistoric firmwares and
>  using _CRS would sound weird on them.

Careful here.

You seem to be assuming that the DMI information is always valid
and/or complete which is know to not be the case sometimes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ