1. 07 2月, 2018 22 次提交
  2. 06 2月, 2018 6 次提交
  3. 05 2月, 2018 4 次提交
  4. 04 2月, 2018 6 次提交
  5. 03 2月, 2018 2 次提交
    • A
      firmware: dmi: handle missing DMI data gracefully · a81114d0
      Ard Biesheuvel 提交于
      Currently, when booting a kernel with DMI support on a platform that has
      no DMI tables, the following output is emitted into the kernel log:
      
        [    0.128818] DMI not present or invalid.
        ...
        [    1.306659] dmi: Firmware registration failed.
        ...
        [    2.908681] dmi-sysfs: dmi entry is absent.
      
      The first one is a pr_info(), but the subsequent ones are pr_err()s that
      complain about a condition that is not really an error to begin with.
      
      So let's clean this up, and give up silently if dma_available is not set.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      Acked-by: NMartin Hundebøll <mnhu@prevas.dk>
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      a81114d0
    • J
      firmware: dmi_scan: Fix handling of empty DMI strings · a7770ae1
      Jean Delvare 提交于
      The handling of empty DMI strings looks quite broken to me:
      * Strings from 1 to 7 spaces are not considered empty.
      * True empty DMI strings (string index set to 0) are not considered
        empty, and result in allocating a 0-char string.
      * Strings with invalid index also result in allocating a 0-char
        string.
      * Strings starting with 8 spaces are all considered empty, even if
        non-space characters follow (sounds like a weird thing to do, but
        I have actually seen occurrences of this in DMI tables before.)
      * Strings which are considered empty are reported as 8 spaces,
        instead of being actually empty.
      
      Some of these issues are the result of an off-by-one error in memcmp,
      the rest is incorrect by design.
      
      So let's get it square: missing strings and strings made of only
      spaces, regardless of their length, should be treated as empty and
      no memory should be allocated for them. All other strings are
      non-empty and should be allocated.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: 79da4721 ("x86: fix DMI out of memory problems")
      Cc: Parag Warudkar <parag.warudkar@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      a7770ae1