Home | History | Annotate | Download | only in netcan
History log of /src/sys/netcan/can_pcb.c
RevisionDateAuthorComments
 1.8  20-Jul-2019  bouyer Don't kmem_alloc()/kmem_free() with spin lock held: call can_pcbsetfilter()
without canp_mtx; take it here and check canp_state before updating the
canp_filters.
 1.7  25-Feb-2019  maxv RIP6, CAN, SCTP and SCTP6 lack a length check in their _send() functions.
Fix RIP6 and CAN, add a big XXX in the SCTP ones.

Found by KASAN, triggered by SyzKaller.

Reported-by: syzbot+0b9692ae0f49f93b7dc7@syzkaller.appspotmail.com
 1.6  09-Jun-2017  bouyer branches: 1.6.4; 1.6.6; 1.6.10;
Refuse to bind to a non-CAN interface.
Also release the lock in the error branch.
 1.5  01-Jun-2017  chs branches: 1.5.2;
remove checks for failure after memory allocation calls that cannot fail:

kmem_alloc() with KM_SLEEP
kmem_zalloc() with KM_SLEEP
percpu_alloc()
pserialize_create()
psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.
 1.4  30-May-2017  bouyer Forced commit for previous (1.2) rev commit message:
don't dereference a NULL pointer in can_setsockaddr() if we didn't bind
to an interface.
 1.3  30-May-2017  bouyer Needs <sys/types.h> not <machine/int_types.h>
 1.2  27-May-2017  bouyer merge the bouyer-socketcan branch to HEAD.

CAN stands for Controller Area Network, a broadcast network used
in automation and automotive fields. For example, the NMEA2000 standard
developped for marine devices uses a CAN network as the link layer.

This is an implementation of the linux socketcan API:
https://www.kernel.org/doc/Documentation/networking/can.txt
you can also see can(4).

This adds a new socket family (AF_CAN) and protocol (PF_CAN),
as well as the canconfig(8) utility, used to set timing parameter of
CAN hardware. Also inclued is a driver for the CAN controller
found in the allwinner A20 SoC (I tested it with an Olimex lime2 board,
connected with PIC18-based CAN devices).

There is also the canloop(4) pseudo-device, which allows to use
the socketcan API without CAN hardware.

At this time the CANFD part of the linux socketcan API is not implemented.
Error frames are not implemented either. But I could get the cansend and
canreceive utilities from the canutils package to build and run with minimal
changes. tcpudmp(8) can also be used to record frames, which can be
decoded with etherreal.
 1.1  15-Jan-2017  bouyer branches: 1.1.2;
file can_pcb.c was initially added on branch bouyer-socketcan.
 1.1.2.4  23-Apr-2017  bouyer Add locking and refcounting to canpcb.
Store the canpcb in the in the mbuf tag on send instead of the socket's address.
This should protect against a race where the socket cloud be closed before
we get back the mbuf from the adapter's driver.
 1.1.2.3  05-Feb-2017  bouyer more sanity checks on the mbuf we get.
 1.1.2.2  05-Feb-2017  bouyer Implement CAN_RAW_FILTER socket option, and add tests for it.
 1.1.2.1  15-Jan-2017  bouyer Initial commit of a CAN socket layer, compatible with linux SoccketCAN
(but incomplete). Based on work from Robert Swindells.
 1.5.2.1  15-Jun-2017  snj Pull up following revision(s) (requested by bouyer in ticket #34):
sys/netcan/can_pcb.c: revision 1.6
tests/net/can/t_can.c: revision 1.6
Refuse to bind to a non-CAN interface.
Also release the lock in the error branch.
--
Test bind()ing to a non-existent interface.
 1.6.10.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.10.1  10-Jun-2019  christos Sync with HEAD
 1.6.6.2  03-Dec-2017  jdolecek update from HEAD
 1.6.6.1  09-Jun-2017  jdolecek file can_pcb.c was added on branch tls-maxphys on 2017-12-03 11:39:03 +0000
 1.6.4.2  28-Aug-2017  skrll Sync with HEAD
 1.6.4.1  09-Jun-2017  skrll file can_pcb.c was added on branch nick-nhusb on 2017-08-28 17:53:12 +0000

RSS XML Feed