<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/can/dev.h, branch v4.9.293</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.293</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.293'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-01-14T19:04:28Z</updated>
<entry>
<title>can: can_dropped_invalid_skb(): ensure an initialized headroom in outgoing CAN sk_buffs</title>
<updated>2020-01-14T19:04:28Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2019-12-07T18:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b6b09649213b7ee081a08166128bc41204c5b441'/>
<id>urn:sha1:b6b09649213b7ee081a08166128bc41204c5b441</id>
<content type='text'>
commit e7153bf70c3496bac00e7e4f395bb8d8394ac0ea upstream.

KMSAN sysbot detected a read access to an untinitialized value in the
headroom of an outgoing CAN related sk_buff. When using CAN sockets this
area is filled appropriately - but when using a packet socket this
initialization is missing.

The problematic read access occurs in the CAN receive path which can
only be triggered when the sk_buff is sent through a (virtual) CAN
interface. So we check in the sending path whether we need to perform
the missing initializations.

Fixes: d3b58c47d330d ("can: replace timestamp as unique skb attribute")
Reported-by: syzbot+b02ff0707a97e4e79ebb@syzkaller.appspotmail.com
Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Cc: linux-stable &lt;stable@vger.kernel.org&gt; # &gt;= v4.1
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()</title>
<updated>2018-12-01T08:44:19Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2018-10-31T09:37:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8bcd10db1c4f8ee531407ad8b200fc9a79b49e3b'/>
<id>urn:sha1:8bcd10db1c4f8ee531407ad8b200fc9a79b49e3b</id>
<content type='text'>
commit a4310fa2f24687888ce80fdb0e88583561a23700 upstream.

This patch factors out all non sending parts of can_get_echo_skb() into
a seperate function __can_get_echo_skb(), so that it can be re-used in
an upcoming patch.

Cc: linux-stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>can: dev: fix deadlock reported after bus-off</title>
<updated>2016-09-22T08:01:21Z</updated>
<author>
<name>Sergei Miroshnichenko</name>
<email>sergeimir@emcraft.com</email>
</author>
<published>2016-09-07T13:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9abefcb1aaa58b9d5aa40a8bb12c87d02415e4c8'/>
<id>urn:sha1:9abefcb1aaa58b9d5aa40a8bb12c87d02415e4c8</id>
<content type='text'>
A timer was used to restart after the bus-off state, leading to a
relatively large can_restart() executed in an interrupt context,
which in turn sets up pinctrl. When this happens during system boot,
there is a high probability of grabbing the pinctrl_list_mutex,
which is locked already by the probe() of other device, making the
kernel suspect a deadlock condition [1].

To resolve this issue, the restart_timer is replaced by a delayed
work.

[1] https://github.com/victronenergy/venus/issues/24

Signed-off-by: Sergei Miroshnichenko &lt;sergeimir@emcraft.com&gt;
Cc: linux-stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: fix handling of unmodifiable configuration options</title>
<updated>2016-05-09T09:07:28Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2016-03-21T19:18:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bb208f144cf3f59d8f89a09a80efd04389718907'/>
<id>urn:sha1:bb208f144cf3f59d8f89a09a80efd04389718907</id>
<content type='text'>
As described in 'can: m_can: tag current CAN FD controllers as non-ISO'
(6cfda7fbebe) it is possible to define fixed configuration options by
setting the according bit in 'ctrlmode' and clear it in 'ctrlmode_supported'.
This leads to the incovenience that the fixed configuration bits can not be
passed by netlink even when they have the correct values (e.g. non-ISO, FD).

This patch fixes that issue and not only allows fixed set bit values to be set
again but now requires(!) to provide these fixed values at configuration time.
A valid CAN FD configuration consists of a nominal/arbitration bittiming, a
data bittiming and a control mode with CAN_CTRLMODE_FD set - which is now
enforced by a new can_validate() function. This fix additionally removed the
inconsistency that was prohibiting the support of 'CANFD-only' controller
drivers, like the RCar CAN FD.

For this reason a new helper can_set_static_ctrlmode() has been introduced to
provide a proper interface to handle static enabled CAN controller options.

Reported-by: Ramesh Shanmugasundaram &lt;ramesh.shanmugasundaram@bp.renesas.com&gt;
Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Reviewed-by: Ramesh Shanmugasundaram  &lt;ramesh.shanmugasundaram@bp.renesas.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # &gt;= 3.18
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>net/can: can_dropped_invalid_skb can be boolean</title>
<updated>2015-10-09T14:49:01Z</updated>
<author>
<name>Yaowei Bai</name>
<email>bywxiaobai@163.com</email>
</author>
<published>2015-10-08T13:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6fbaea5f635216c9861587c4e658086cf3b1b6b'/>
<id>urn:sha1:d6fbaea5f635216c9861587c4e658086cf3b1b6b</id>
<content type='text'>
This patch makes can_dropped_invalid_skb return bool due to this
particular function only using either one or zero as its return
value.

No functional change.

Signed-off-by: Yaowei Bai &lt;bywxiaobai@163.com&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>can: headers: make header files self contained</title>
<updated>2015-09-21T06:38:22Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2015-05-09T15:47:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2785968cd122b22b289db565b7438f2200984044'/>
<id>urn:sha1:2785968cd122b22b289db565b7438f2200984044</id>
<content type='text'>
This patch adds the missing #include-s to the dev.h and led.h, so that they can
be used without including further header files.

Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: add combined rx/tx LED trigger support</title>
<updated>2015-03-22T22:50:11Z</updated>
<author>
<name>Yegor Yefremov</name>
<email>yegorslists@googlemail.com</email>
</author>
<published>2015-03-16T08:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c54eb70e3bb8cd0d7b8564bedab63e834656c567'/>
<id>urn:sha1:c54eb70e3bb8cd0d7b8564bedab63e834656c567</id>
<content type='text'>
Add &lt;ifname&gt;-rxtx trigger, that will be activated both for tx
as rx events. This trigger mimics "activity" LED for Ethernet
devices.

Signed-off-by: Yegor Yefremov &lt;yegorslists@googlemail.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: dev: Consolidate and unify state change handling</title>
<updated>2014-12-07T20:22:09Z</updated>
<author>
<name>Andri Yngvason</name>
<email>andri.yngvason@marel.com</email>
</author>
<published>2014-12-03T17:54:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bac78aabcfece0c493b2ad824c68fbdc20448cbc'/>
<id>urn:sha1:bac78aabcfece0c493b2ad824c68fbdc20448cbc</id>
<content type='text'>
The handling of can error states is different between platforms.
This is an attempt to correct that problem.

I've moved this handling into a generic function for changing the
error state. This ensures that error state changes are handled
the same way everywhere (where this function is used).

This new mechanism also adds reverse state transitioning in error
frames, i.e. the user will be notified through the socket interface
when the state goes down.

Signed-off-by: Andri Yngvason &lt;andri.yngvason@marel.com&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: dev: add can_is_canfd_skb() API</title>
<updated>2014-11-18T12:23:31Z</updated>
<author>
<name>Dong Aisheng</name>
<email>b29396@freescale.com</email>
</author>
<published>2014-11-07T08:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=98e69016a11b2b9398bea668442193b3b362cd43'/>
<id>urn:sha1:98e69016a11b2b9398bea668442193b3b362cd43</id>
<content type='text'>
The CAN device drivers can use can_is_canfd_skb() to check if the frame to send
is on CAN FD mode or normal CAN mode.

Acked-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Dong Aisheng &lt;b29396@freescale.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: unify identifiers to ensure unique include processing</title>
<updated>2014-05-19T07:38:24Z</updated>
<author>
<name>Oliver Hartkopp</name>
<email>socketcan@hartkopp.net</email>
</author>
<published>2014-05-15T18:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=42193e3efb632c84d686acacd7b2327f2b1f8c63'/>
<id>urn:sha1:42193e3efb632c84d686acacd7b2327f2b1f8c63</id>
<content type='text'>
Armin pointed me to the fact that the identifier which is used to ensure the
unique include processing in lunux/include/uapi/linux/can.h is CAN_H.
This clashed with his own source as includes from libraries and APIs should
use an underscore '_' at the identifier start.

This patch fixes the protection identifiers in all CAN relavant includes.

Reported-by: Armin Burchardt &lt;armin@uni-bremen.de&gt;
Signed-off-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
