1. 18 4月, 2018 1 次提交
    • C
      ipmi: Add a way to tune some timeouts · ce7fa1c3
      Corey Minyard 提交于
      By default the retry timeout is 1 second.  Allow that to be modified,
      primarily for slow operations, like firmware writes.
      
      Also, the timeout was driven by a 1 second timer, so 1 second really
      meant between 0 and 1 second.  Set the default to 2 seconds so it
      means between 1 and 2 seconds.
      
      Also allow the time the interface automatically stays in mainenance
      mode to be modified from it's default 30 seconds.
      
      Also consolidate some of the timeout and retry setup.
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      
      more
      ce7fa1c3
  2. 06 4月, 2018 1 次提交
    • K
      kernel.h: Retain constant expression output for max()/min() · 3c8ba0d6
      Kees Cook 提交于
      In the effort to remove all VLAs from the kernel[1], it is desirable to
      build with -Wvla.  However, this warning is overly pessimistic, in that
      it is only happy with stack array sizes that are declared as constant
      expressions, and not constant values.  One case of this is the
      evaluation of the max() macro which, due to its construction, ends up
      converting constant expression arguments into a constant value result.
      
      All attempts to rewrite this macro with __builtin_constant_p() failed
      with older compilers (e.g.  gcc 4.4)[2].  However, Martin Uecker,
      constructed[3] a mind-shattering solution that works everywhere.
      Cthulhu fhtagn!
      
      This patch updates the min()/max() macros to evaluate to a constant
      expression when called on constant expression arguments.  This removes
      several false-positive stack VLA warnings from an x86 allmodconfig build
      when -Wvla is added:
      
        $ diff -u before.txt after.txt | grep ^-
        -drivers/input/touchscreen/cyttsp4_core.c:871:2: warning: ISO C90 forbids variable length array ‘ids’ [-Wvla]
        -fs/btrfs/tree-checker.c:344:4: warning: ISO C90 forbids variable length array ‘namebuf’ [-Wvla]
        -lib/vsprintf.c:747:2: warning: ISO C90 forbids variable length array ‘sym’ [-Wvla]
        -net/ipv4/proc.c:403:2: warning: ISO C90 forbids variable length array ‘buff’ [-Wvla]
        -net/ipv6/proc.c:198:2: warning: ISO C90 forbids variable length array ‘buff’ [-Wvla]
        -net/ipv6/proc.c:218:2: warning: ISO C90 forbids variable length array ‘buff64’ [-Wvla]
      
      This also updates two cases where different enums were being compared
      and explicitly casts them to int (which matches the old side-effect of
      the single-evaluation code): one in tpm/tpm_tis_core.h, and one in
      drm/drm_color_mgmt.c.
      
       [1] https://lkml.org/lkml/2018/3/7/621
       [2] https://lkml.org/lkml/2018/3/10/170
       [3] https://lkml.org/lkml/2018/3/20/845Co-Developed-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Co-Developed-by: NMartin Uecker <Martin.Uecker@med.uni-goettingen.de>
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3c8ba0d6
  3. 28 3月, 2018 2 次提交
  4. 26 3月, 2018 3 次提交
  5. 23 3月, 2018 9 次提交
  6. 20 3月, 2018 1 次提交
  7. 16 3月, 2018 2 次提交
  8. 15 3月, 2018 1 次提交
  9. 13 3月, 2018 2 次提交
    • K
      ipmi_ssif: Fix kernel panic at msg_done_handler · f002612b
      Kamlakant Patel 提交于
      This happens when BMC doesn't return any data and the code is trying
      to print the value of data[2].
      
      Getting following crash:
      [  484.728410] Unable to handle kernel NULL pointer dereference at virtual address 00000002
      [  484.736496] pgd = ffff0000094a2000
      [  484.739885] [00000002] *pgd=00000047fcffe003, *pud=00000047fcffd003, *pmd=0000000000000000
      [  484.748158] Internal error: Oops: 96000005 [#1] SMP
      [...]
      [  485.101451] Call trace:
      [...]
      [  485.188473] [<ffff000000a46e68>] msg_done_handler+0x668/0x700 [ipmi_ssif]
      [  485.195249] [<ffff000000a456b8>] ipmi_ssif_thread+0x110/0x128 [ipmi_ssif]
      [  485.202038] [<ffff0000080f1430>] kthread+0x108/0x138
      [  485.206994] [<ffff0000080838e0>] ret_from_fork+0x10/0x30
      [  485.212294] Code: aa1903e1 aa1803e0 b900227f 95fef6a5 (39400aa3)
      
      Adding a check to validate the data len before printing data[2] to fix this issue.
      Signed-off-by: NKamlakant Patel <kamlakant.patel@cavium.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      f002612b
    • C
      ipmi:pci: Blacklist a Realtek "IPMI" device · bc48fa1b
      Corey Minyard 提交于
      Realtek has some sort of "Virtual" IPMI device on the PCI bus as a
      KCS controller, but whatever it is, it's not one.  Ignore it if seen.
      Reported-by: NChris Chiu <chiu@endlessm.com>
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Tested-by: NDaniel Drake <drake@endlessm.com>
      bc48fa1b
  10. 12 3月, 2018 2 次提交
    • C
      ipmi: Remove ACPI SPMI probing from the system interface driver · 4876234a
      Corey Minyard 提交于
      The IPMI spec states:
      
        The purpose of the SPMI Table is to provide a mechanism that can
        be used by the OSPM (an ACPI term for “OS Operating System-directed
        configuration and Power Management” essentially meaning an ACPI-aware
        OS or OS loader) very early in the boot process, e.g., before the
        ability to execute ACPI control methods in the OS is available.
      
      When we are probing IPMI in Linux, ACPI control methods are available,
      so we shouldn't be probing using SPMI.  It could cause some confusion
      during the probing process.
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      4876234a
    • C
      ipmi: Remove ACPI SPMI probing from the SSIF (I2C) driver · 4866b1dc
      Corey Minyard 提交于
      The IPMI spec states:
      
        The purpose of the SPMI Table is to provide a mechanism that can
        be used by the OSPM (an ACPI term for “OS Operating System-directed
        configuration and Power Management” essentially meaning an ACPI-aware
        OS or OS loader) very early in the boot process, e.g., before the
        ability to execute ACPI control methods in the OS is available.
      
      When we are probing IPMI in Linux, ACPI control methods are available,
      so we shouldn't be probing using SPMI.  It could cause some confusion
      during the probing process.
      Signed-off-by: NCorey Minyard <cminyard@mvista.com>
      Tested-by: NJiandi An <anjiandi@codeaurora.org>
      4866b1dc
  11. 09 3月, 2018 3 次提交
  12. 07 3月, 2018 5 次提交
  13. 03 3月, 2018 3 次提交
  14. 01 3月, 2018 4 次提交
  15. 27 2月, 2018 1 次提交