<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char/ipmi, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-06-13T13:56:28Z</updated>
<entry>
<title>ipmi: Remove smi_msg from waiting_rcv_msgs list before handle_one_recv_msg()</title>
<updated>2016-06-13T13:56:28Z</updated>
<author>
<name>Junichi Nomura</name>
<email>j-nomura@ce.jp.nec.com</email>
</author>
<published>2016-06-10T04:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae4ea9a2460c7fee2ae8feeb4dfe96f5f6c3e562'/>
<id>urn:sha1:ae4ea9a2460c7fee2ae8feeb4dfe96f5f6c3e562</id>
<content type='text'>
Commit 7ea0ed2b5be8 ("ipmi: Make the message handler easier to use for
SMI interfaces") changed handle_new_recv_msgs() to call handle_one_recv_msg()
for a smi_msg while the smi_msg is still connected to waiting_rcv_msgs list.
That could lead to following list corruption problems:

1) low-level function treats smi_msg as not connected to list

  handle_one_recv_msg() could end up calling smi_send(), which
  assumes the msg is not connected to list.

  For example, the following sequence could corrupt list by
  doing list_add_tail() for the entry still connected to other list.

    handle_new_recv_msgs()
      msg = list_entry(waiting_rcv_msgs)
      handle_one_recv_msg(msg)
        handle_ipmb_get_msg_cmd(msg)
          smi_send(msg)
            spin_lock(xmit_msgs_lock)
            list_add_tail(msg)
            spin_unlock(xmit_msgs_lock)

2) race between multiple handle_new_recv_msgs() instances

  handle_new_recv_msgs() once releases waiting_rcv_msgs_lock before calling
  handle_one_recv_msg() then retakes the lock and list_del() it.

  If others call handle_new_recv_msgs() during the window shown below
  list_del() will be done twice for the same smi_msg.

  handle_new_recv_msgs()
    spin_lock(waiting_rcv_msgs_lock)
    msg = list_entry(waiting_rcv_msgs)
    spin_unlock(waiting_rcv_msgs_lock)
  |
  | handle_one_recv_msg(msg)
  |
    spin_lock(waiting_rcv_msgs_lock)
    list_del(msg)
    spin_unlock(waiting_rcv_msgs_lock)

Fixes: 7ea0ed2b5be8 ("ipmi: Make the message handler easier to use for SMI interfaces")
Signed-off-by: Jun'ichi Nomura &lt;j-nomura@ce.jp.nec.com&gt;
[Added a comment to describe why this works.]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Cc: stable@vger.kernel.org # 3.19
Tested-by: Ye Feng &lt;yefeng.yl@alibaba-inc.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Fix the I2C address extraction from SPMI tables</title>
<updated>2016-05-17T00:49:49Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2016-05-06T17:57:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70f95b76f155153a2a51a9a4568b9bcd4e573f5c'/>
<id>urn:sha1:70f95b76f155153a2a51a9a4568b9bcd4e573f5c</id>
<content type='text'>
Unlike everywhere else in the IPMI specification, the I2C address
specified in the SPMI table is not shifted to the left one bit with
the LSB zero.  Instead it is not shifted with the MSB zero.

Reported-by: Sanjeev &lt;singhsan@codeaurora.org&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>IPMI: reserve memio regions separately</title>
<updated>2016-05-17T00:49:48Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2016-04-27T03:25:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57a38f1340eb2b036dbc4ec34f4a14603e5dd47c'/>
<id>urn:sha1:57a38f1340eb2b036dbc4ec34f4a14603e5dd47c</id>
<content type='text'>
Commit d61a3ead2680 ("[PATCH] IPMI: reserve I/O ports separately")
changed the way I/O ports were reserved and includes this comment in
log:

 Some BIOSes reserve disjoint I/O regions in their ACPI tables for the IPMI
 controller.  This causes problems when trying to register the entire I/O
 region.  Therefore we must register each I/O port separately.

There is a similar problem with memio regions on an arm64 platform
(AMD Seattle). Where I see:

 ipmi message handler version 39.2
 ipmi_si AMDI0300:00: probing via device tree
 ipmi_si AMDI0300:00: ipmi_si: probing via ACPI
 ipmi_si AMDI0300:00: [mem 0xe0010000] regsize 1 spacing 4 irq 23
 ipmi_si: Adding ACPI-specified kcs state machine
 IPMI System Interface driver.
 ipmi_si: Trying ACPI-specified kcs state machine at mem \
          address 0xe0010000, slave address 0x0, irq 23
 ipmi_si: Could not set up I/O space

The problem is that the ACPI core registers disjoint regions for the
platform device:

e0010000-e0010000 : AMDI0300:00
e0010004-e0010004 : AMDI0300:00

and the ipmi_si driver tries to register one region e0010000-e0010004.

Based on a patch from Mark Salter &lt;msalter@redhat.com&gt;, who also wrote
all the above text.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Tested-by: Mark Salter &lt;msalter@redhat.com&gt;
</content>
</entry>
<entry>
<title>ipmi: Fix some minor coding style issues</title>
<updated>2016-05-17T00:49:48Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2016-04-27T03:40:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=76824852a941375aad640b35025dac75d077113a'/>
<id>urn:sha1:76824852a941375aad640b35025dac75d077113a</id>
<content type='text'>
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi/watchdog: use nmi_panic() when kernel panics in NMI handler</title>
<updated>2016-03-22T22:36:02Z</updated>
<author>
<name>Hidehiro Kawai</name>
<email>hidehiro.kawai.ez@hitachi.com</email>
</author>
<published>2016-03-22T21:27:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73cbf4a1ddfab247f9018550637c28a7d8dd9108'/>
<id>urn:sha1:73cbf4a1ddfab247f9018550637c28a7d8dd9108</id>
<content type='text'>
Commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to panic
on NMI") introduced nmi_panic() which prevents concurrent and recursive
execution of panic().  It also saves registers for the crash dump on x86
by later commit 58c5661f2144 ("panic, x86: Allow CPUs to save registers
even if looping in NMI context").

ipmi_watchdog driver can call panic() from NMI handler, so replace it
with nmi_panic().

Signed-off-by: Hidehiro Kawai &lt;hidehiro.kawai.ez@hitachi.com&gt;
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipmi: do not probe ACPI devices if si_tryacpi is unset</title>
<updated>2016-03-18T12:01:24Z</updated>
<author>
<name>Joe Lawrence</name>
<email>joe.lawrence@stratus.com</email>
</author>
<published>2016-02-18T21:02:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9f0257b39c138330fec96e0f8f1a0135c1f0b6a5'/>
<id>urn:sha1:9f0257b39c138330fec96e0f8f1a0135c1f0b6a5</id>
<content type='text'>
Extend the tryacpi module parameter to turn off acpi_ipmi_probe such
that hard-coded options (type, ports, address, etc.) have complete
control over the smi_info data structures setup by the driver.

Signed-off-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi_si: Avoid a wrong long timeout on transaction done</title>
<updated>2016-03-18T12:01:23Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2016-01-25T22:11:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d9dffd2a0bd84039f1b4f7e8835f1b0bbde0b3a7'/>
<id>urn:sha1:d9dffd2a0bd84039f1b4f7e8835f1b0bbde0b3a7</id>
<content type='text'>
Under some circumstances, the IPMI state machine could return
a call without delay option but the driver would still do a long
delay because the result wasn't checked.  Instead of calling
the state machine after transaction done, just go back to the
top of the processing to start over.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi_si: Fix module parameter doc names</title>
<updated>2016-03-18T12:01:23Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2016-01-19T20:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f813655a36830c54111763ba1acdbb0fe35813d9'/>
<id>urn:sha1:f813655a36830c54111763ba1acdbb0fe35813d9</id>
<content type='text'>
Several were tryacpi instead of their actual values.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi_ssif: Fix logic around alert handling</title>
<updated>2016-03-18T12:01:23Z</updated>
<author>
<name>Corey Minyard</name>
<email>cminyard@mvista.com</email>
</author>
<published>2016-01-06T15:32:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21c8f9154d9b3d2d84b619c2afdb6965f9d57975'/>
<id>urn:sha1:21c8f9154d9b3d2d84b619c2afdb6965f9d57975</id>
<content type='text'>
There was a mistake in the logic, if an alert came in very quickly
it would hang the driver.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
<entry>
<title>ipmi: put acpi.h with the other headers</title>
<updated>2016-02-03T16:35:52Z</updated>
<author>
<name>Tony Camuso</name>
<email>tcamuso@redhat.com</email>
</author>
<published>2016-02-02T18:57:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=58c9d61f86e86ebe1e45ac7a0cd89a2c6299b034'/>
<id>urn:sha1:58c9d61f86e86ebe1e45ac7a0cd89a2c6299b034</id>
<content type='text'>
Enclosing '#include &lt;linux/acpi.h&gt;' within '#ifdef CONFIG_ACPI' is
unnecessary, since it has its own conditional compile for CONFIG_ACPI.

Commit 0fbcf4af7c83 ("ipmi: Convert the IPMI SI ACPI handling to a
platform device") exposed this as a problem for platforms that do not
support ACPI when it introduced a call to ACPI_PTR() macro outside of
the CONFIG_ACPI conditional compile. This would have been perfectly
acceptable if acpi.h were not conditionally excluded for the non-acpi
platform, because the conditional compile within acpi.h defines
ACPI_PTR() to return NULL when compiled for non acpi platforms.

Signed-off-by: Tony Camuso &lt;tcamuso@redhat.com&gt;

Fixed commit reference in header to conform to standard.

Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
</entry>
</feed>
