<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/net/mctp, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/net/mctp?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/net/mctp?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-08-16T10:46:26Z</updated>
<entry>
<title>i2c: Make remove callback return void</title>
<updated>2022-08-16T10:46:26Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2022-08-15T08:02:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ed5c2f5fd10dda07263f79f338a512c0f49f76f5'/>
<id>urn:sha1:ed5c2f5fd10dda07263f79f338a512c0f49f76f5</id>
<content type='text'>
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Reviewed-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Reviewed-by: Benjamin Mugnier &lt;benjamin.mugnier@foss.st.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Crt Mori &lt;cmo@melexis.com&gt;
Reviewed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Marek Behún &lt;kabel@kernel.org&gt; # for leds-turris-omnia
Acked-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Reviewed-by: Petr Machata &lt;petrm@nvidia.com&gt; # for mlxsw
Reviewed-by: Maximilian Luz &lt;luzmaximilian@gmail.com&gt; # for surface3_power
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt; # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt; # for media/* + staging/media/*
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt; # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt; # for versaclock5
Reviewed-by: Ajay Gupta &lt;ajayg@nvidia.com&gt; # for ucsi_ccg
Acked-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt; # for iio
Acked-by: Peter Rosin &lt;peda@axentia.se&gt; # for i2c-mux-*, max9860
Acked-by: Adrien Grassein &lt;adrien.grassein@gmail.com&gt; # for lontium-lt8912b
Reviewed-by: Jean Delvare &lt;jdelvare@suse.de&gt; # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt; # for IPMI
Reviewed-by: Vladimir Oltean &lt;olteanv@gmail.com&gt;
Acked-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Acked-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt; # for drivers/power
Acked-by: Krzysztof Hałasa &lt;khalasa@piap.pl&gt;
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Wolfram Sang &lt;wsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp i2c: correct mctp_i2c_header_create result</title>
<updated>2022-04-01T11:04:15Z</updated>
<author>
<name>Matt Johnston</name>
<email>matt@codeconstruct.com.au</email>
</author>
<published>2022-04-01T02:48:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8ce40a2fd350769e94877b53d353a3b11d85f43b'/>
<id>urn:sha1:8ce40a2fd350769e94877b53d353a3b11d85f43b</id>
<content type='text'>
header_ops.create should return the length of the header,
instead mctp_i2c_head_create() returned 0.
This didn't cause any problem because the MCTP stack accepted
0 as success.

Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver")
Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mctp: serial: Use netif_rx().</title>
<updated>2022-03-06T11:05:31Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2022-03-05T22:12:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b903117b48681e12fae38e09c874f38c45186dc6'/>
<id>urn:sha1:b903117b48681e12fae38e09c874f38c45186dc6</id>
<content type='text'>
Since commit
   baebdf48c3600 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Cc: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Cc: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mctp i2c: Fix hard head TX bounds length check</title>
<updated>2022-02-26T06:23:33Z</updated>
<author>
<name>Matt Johnston</name>
<email>matt@codeconstruct.com.au</email>
</author>
<published>2022-02-25T05:39:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=33f5d1a9d9707d1c9ab227aadd9498664e0442e4'/>
<id>urn:sha1:33f5d1a9d9707d1c9ab227aadd9498664e0442e4</id>
<content type='text'>
We should be testing the length before fitting into the u8 byte_count.
This is just a sanity check, the MCTP stack should have limited to MTU
which is checked, and we check consistency later in mctp_i2c_xmit().

Found by Smatch
mctp_i2c_header_create() warn: impossible condition
    '(hdr-&gt;byte_count &gt; 255) =&gt; (0-255 &gt; 255)'

Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp i2c: Fix potential use-after-free</title>
<updated>2022-02-26T06:23:29Z</updated>
<author>
<name>Matt Johnston</name>
<email>matt@codeconstruct.com.au</email>
</author>
<published>2022-02-25T05:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=06bf1ce69d55729dc132d423d626398254fedc58'/>
<id>urn:sha1:06bf1ce69d55729dc132d423d626398254fedc58</id>
<content type='text'>
The skb is handed off to netif_rx() which may free it.
Found by Smatch.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp i2c: MCTP I2C binding driver</title>
<updated>2022-02-19T16:18:49Z</updated>
<author>
<name>Matt Johnston</name>
<email>matt@codeconstruct.com.au</email>
</author>
<published>2022-02-18T05:51:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f5b8abf9fc3dacd7529d363e26fe8230935d65f8'/>
<id>urn:sha1:f5b8abf9fc3dacd7529d363e26fe8230935d65f8</id>
<content type='text'>
Provides MCTP network transport over an I2C bus, as specified in
DMTF DSP0237. All messages between nodes are sent as SMBus Block Writes.

Each I2C bus to be used for MCTP is flagged in devicetree by a
'mctp-controller' property on the bus node. Each flagged bus gets a
mctpi2cX net device created based on the bus number. A
'mctp-i2c-controller' I2C client needs to be added under the adapter. In
an I2C mux situation the mctp-i2c-controller node must be attached only
to the root I2C bus. The I2C client will handle incoming I2C slave block
write data for subordinate busses as well as its own bus.

In configurations without devicetree a driver instance can be attached
to a bus using the I2C slave new_device mechanism.

The MCTP core will hold/release the MCTP I2C device while responses
are pending (a 6 second timeout or once a socket is closed, response
received etc). While held the MCTP I2C driver will lock the I2C bus so
that the correct I2C mux remains selected while responses are received.

(Ideally we would just lock the mux to keep the current bus selected for
the response rather than a full I2C bus lock, but that isn't exposed in
the I2C mux API)

Signed-off-by: Matt Johnston &lt;matt@codeconstruct.com.au&gt;
Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Reviewed-by: Wolfram Sang &lt;wsa@kernel.org&gt; # I2C transport parts
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mctp: serial: Cancel pending work from ndo_uninit handler</title>
<updated>2022-02-11T22:39:54Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@codeconstruct.com.au</email>
</author>
<published>2022-02-11T01:15:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6c342ce2239c182c2428ce5a44cb32330434ae6e'/>
<id>urn:sha1:6c342ce2239c182c2428ce5a44cb32330434ae6e</id>
<content type='text'>
We cannot do the cancel_work_sync from after the unregister_netdev, as
the dev pointer is no longer valid, causing a uaf on ldisc unregister
(or device close).

Instead, do the cancel_work_sync from the ndo_uninit op, where the dev
still exists, but the queue has stopped.

Fixes: 7bd9890f3d74 ("mctp: serial: cancel tx work on ldisc close")
Reported-by: Luo Likang &lt;luolikang@nsfocus.com&gt;
Tested-by: Luo Likang &lt;luolikang@nsfocus.com&gt;
Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Link: https://lore.kernel.org/r/20220211011552.1861886-1-jk@codeconstruct.com.au
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp: serial: remove unnecessary ldisc data check</title>
<updated>2021-11-26T03:40:39Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@codeconstruct.com.au</email>
</author>
<published>2021-11-25T06:07:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d1c99f365a1f51f9c7e76ea3c52605cf740b3251'/>
<id>urn:sha1:d1c99f365a1f51f9c7e76ea3c52605cf740b3251</id>
<content type='text'>
Jiri assures me that a ldisc-&gt;open with tty-&gt;disc_data set should never
happen, so this check doesn't do anything.

Reported-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp: serial: enforce fixed MTU</title>
<updated>2021-11-26T03:40:39Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@codeconstruct.com.au</email>
</author>
<published>2021-11-25T06:07:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d154cd078ac2d24374e872f3224bf44894867b0a'/>
<id>urn:sha1:d154cd078ac2d24374e872f3224bf44894867b0a</id>
<content type='text'>
The current serial driver requires a maximum MTU of 68, and it doesn't
make sense to set a MTU below the MCTP-required baseline (of 68) either.

This change sets the min_mtu &amp; max_mtu of the mctp netdev, essentially
disallowing changes. By using these instead of a ndo_change_mtu op, we
get the netlink extacks reported too.

Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>mctp: serial: cancel tx work on ldisc close</title>
<updated>2021-11-26T03:40:39Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@codeconstruct.com.au</email>
</author>
<published>2021-11-25T06:07:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7bd9890f3d74e96f0e1a898f68decfc711de3001'/>
<id>urn:sha1:7bd9890f3d74e96f0e1a898f68decfc711de3001</id>
<content type='text'>
We want to ensure that the tx work has finished before returning from
the ldisc close op, so do a synchronous cancel.

Reported-by: Jiri Slaby &lt;jirislaby@kernel.org&gt;
Signed-off-by: Jeremy Kerr &lt;jk@codeconstruct.com.au&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
