<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/char/ipmi, branch v6.8</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=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-12-19T12:33:45Z</updated>
<entry>
<title>ipmi: Remove usage of the deprecated ida_simple_xx() API</title>
<updated>2023-12-19T12:33:45Z</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-12-19T05:00:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9bd9fbd9032a3b7e9ea916d6e58ba0116e0621be'/>
<id>urn:sha1:9bd9fbd9032a3b7e9ea916d6e58ba0116e0621be</id>
<content type='text'>
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().

This is less verbose.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Message-Id: &lt;b1a7a75263400742e5fda6bd7ba426772dc8ef11.1702961986.git.christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: Use regspacings passed as a module parameter</title>
<updated>2023-12-19T12:32:27Z</updated>
<author>
<name>Emilio Perez</name>
<email>emiliopeju@gmail.com</email>
</author>
<published>2023-11-22T20:34:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=242c6fd473a6a74eac4d4002be715a0d0dede036'/>
<id>urn:sha1:242c6fd473a6a74eac4d4002be715a0d0dede036</id>
<content type='text'>
regspacings parameter is currently ignored and the platform data uses a
default value of 0, this has been fixed by setting the appropriate field
in the platform data.

Fixes: 3cd83bac481d ("ipmi: Consolidate the adding of platform devices")
Signed-off-by: Emilio Perez &lt;emiliopeju@gmail.com&gt;
Message-Id: &lt;20231122203433.443098-1-emiliopeju@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: si: Use device_get_match_data()</title>
<updated>2023-12-19T12:32:27Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-11-15T21:02:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5be50eb5ae99d890cc22ab49753330cce8731599'/>
<id>urn:sha1:5be50eb5ae99d890cc22ab49753330cce8731599</id>
<content type='text'>
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Message-Id: &lt;20231115210230.3744198-1-robh@kernel.org&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-6.7-1' of https://github.com/cminyard/linux-ipmi</title>
<updated>2023-11-03T01:01:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-11-03T01:01:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e5760335882bd91137873b8f2230b6c1f91da52b'/>
<id>urn:sha1:e5760335882bd91137873b8f2230b6c1f91da52b</id>
<content type='text'>
Pull IPMI update from Corey Minyard:
 "Only one change, and I would normally just wait, but it will make the
  people trying to get rid of strncpy happy. Its a good change, anyway"

* tag 'for-linus-6.7-1' of https://github.com/cminyard/linux-ipmi:
  ipmi: refactor deprecated strncpy
</content>
</entry>
<entry>
<title>char-misc: Remove the now superfluous sentinel element from ctl_table array</title>
<updated>2023-10-11T19:16:13Z</updated>
<author>
<name>Joel Granados</name>
<email>j.granados@samsung.com</email>
</author>
<published>2023-10-02T08:55:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed1aa959b50854bddd7252d404aa6fdbcfa60b99'/>
<id>urn:sha1:ed1aa959b50854bddd7252d404aa6fdbcfa60b99</id>
<content type='text'>
This commit comes at the tail end of a greater effort to remove the
empty elements at the end of the ctl_table arrays (sentinels) which
will reduce the overall build time size of the kernel and run time
memory bloat by ~64 bytes per sentinel (further information Link :
https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)

Remove sentinel from impi_table and random_table

Signed-off-by: Joel Granados &lt;j.granados@samsung.com&gt;
Signed-off-by: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi: refactor deprecated strncpy</title>
<updated>2023-09-13T17:55:11Z</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-09-13T17:13:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b00839ca4cca8aa9641c121c848a553d6220ce70'/>
<id>urn:sha1:b00839ca4cca8aa9641c121c848a553d6220ce70</id>
<content type='text'>
`strncpy` is deprecated for use on NUL-terminated destination strings [1].

In this case, strncpy is being used specifically for its NUL-padding
behavior (and has been commented as such). Moreover, the destination
string is not required to be NUL-terminated [2].

We can use a more robust and less ambiguous interface in
`memcpy_and_pad` which makes the code more readable and even eliminates
the need for that comment.

Let's also use `strnlen` instead of `strlen()` with an upper-bounds
check as this is intrinsically a part of `strnlen`.

Also included in this patch is a simple 1:1 change of `strncpy` to
`strscpy` for ipmi_ssif.c. If NUL-padding is wanted here as well then we
should opt again for `strscpy_pad`.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://lore.kernel.org/all/ZQEADYBl0uZ1nX60@mail.minyard.net/ [2]
Link: https://github.com/KSPP/linux/issues/90
Cc: linux-hardening@vger.kernel.org
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Message-Id: &lt;20230913-strncpy-drivers-char-ipmi-ipmi-v2-1-e3bc0f6e599f@google.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-6.6-1' of https://github.com/cminyard/linux-ipmi</title>
<updated>2023-08-31T02:20:35Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-08-31T02:20:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a55b0a028877e9d7e7dacdbe363d39390554ba14'/>
<id>urn:sha1:a55b0a028877e9d7e7dacdbe363d39390554ba14</id>
<content type='text'>
Pull IPMI updates from Corey Minyard:
 "Minor fixes for IPMI

  Lots of small unconnected things, memory leaks on error, a possible
  (though unlikely) deadlock, changes for updates to other things that
  have changed. Nothing earth-shattering, but things that need update"

* tag 'for-linus-6.6-1' of https://github.com/cminyard/linux-ipmi:
  ipmi_si: fix -Wvoid-pointer-to-enum-cast warning
  ipmi: fix potential deadlock on &amp;kcs_bmc-&gt;lock
  ipmi_si: fix a memleak in try_smi_init()
  ipmi: Change request_module to request_module_nowait
  ipmi: make ipmi_class a static const structure
  ipmi:ssif: Fix a memory leak when scanning for an adapter
  ipmi:ssif: Add check for kstrdup
  dt-bindings: ipmi: aspeed,ast2400-kcs-bmc: drop unneeded quotes
  ipmi: Switch i2c drivers back to use .probe()
  ipmi_watchdog: Fix read syscall not responding to signals during sleep
</content>
</entry>
<entry>
<title>ipmi: Explicitly include correct DT includes</title>
<updated>2023-08-28T18:36:24Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-28T13:48:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86cdae14a58a877ee1ec79d39b1331bc98dace58'/>
<id>urn:sha1:86cdae14a58a877ee1ec79d39b1331bc98dace58</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Link: https://lore.kernel.org/r/20230728134819.3224045-1-robh@kernel.org
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
</content>
</entry>
<entry>
<title>ipmi_si: fix -Wvoid-pointer-to-enum-cast warning</title>
<updated>2023-08-15T20:46:06Z</updated>
<author>
<name>Justin Stitt</name>
<email>justinstitt@google.com</email>
</author>
<published>2023-08-09T21:05:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d40f09c1a23024f0e550d9423f4d389672e1dfaf'/>
<id>urn:sha1:d40f09c1a23024f0e550d9423f4d389672e1dfaf</id>
<content type='text'>
With W=1 we see the following warning:

|  drivers/char/ipmi/ipmi_si_platform.c:272:15: error: \
|       cast to smaller integer type 'enum si_type' from \
|       'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
|    272 |         io.si_type      = (enum si_type) match-&gt;data;
|        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~

This is due to the fact that the `si_type` enum members are int-width
and a cast from pointer-width down to int will cause truncation and
possible data loss. Although in this case `si_type` has only a few
enumerated fields and thus there is likely no data loss occurring.
Nonetheless, this patch is necessary to the goal of promoting this
warning out of W=1.

Link: https://github.com/ClangBuiltLinux/linux/issues/1902
Link: https://lore.kernel.org/llvm/202308081000.tTL1ElTr-lkp@intel.com/
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Justin Stitt &lt;justinstitt@google.com&gt;
Message-Id: &lt;20230809-cbl-1902-v1-1-92def12d1dea@google.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
<entry>
<title>ipmi: fix potential deadlock on &amp;kcs_bmc-&gt;lock</title>
<updated>2023-07-04T14:22:45Z</updated>
<author>
<name>Chengfeng Ye</name>
<email>dg573847474@gmail.com</email>
</author>
<published>2023-06-27T15:24:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b02bb79eee074f07acdfde540f2d4fe2a04471d8'/>
<id>urn:sha1:b02bb79eee074f07acdfde540f2d4fe2a04471d8</id>
<content type='text'>
As kcs_bmc_handle_event() is executed inside both a timer and a hardirq,
it should disable irq before lock acquisition otherwise deadlock could
happen if the timmer is preemtped by the irq.

Possible deadlock scenario:
aspeed_kcs_check_obe() (timer)
    -&gt; kcs_bmc_handle_event()
    -&gt; spin_lock(&amp;kcs_bmc-&gt;lock)
        &lt;irq interruption&gt;
        -&gt; aspeed_kcs_irq()
        -&gt; kcs_bmc_handle_event()
        -&gt; spin_lock(&amp;kcs_bmc-&gt;lock) (deadlock here)

This flaw was found using an experimental static analysis tool we are
developing for irq-related deadlock.

The tentative patch fix the potential deadlock by spin_lock_irqsave()

Signed-off-by: Chengfeng Ye &lt;dg573847474@gmail.com&gt;
Message-Id: &lt;20230627152449.36093-1-dg573847474@gmail.com&gt;
Signed-off-by: Corey Minyard &lt;minyard@acm.org&gt;
</content>
</entry>
</feed>
