lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <70F6AAAFDC054F41B9994A9BCD3DF64E16FAA5D9@exch01-aklnz.MARINE.NET.INT>
Date:	Wed, 2 Nov 2011 13:25:07 +1300
From:	"Reuben Dowle" <Reuben.Dowle@...ico.com>
To:	"Marc Kleine-Budde" <mkl@...gutronix.de>
Cc:	<netdev@...r.kernel.org>, <linux-can@...r.kernel.org>
Subject: RE: [PATCH] flexcan: Fix CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK

> 
> Patch looks quite good. Can you please wrap the description to about 72
> chars?

Will do.

> >  	}
> >
> > @@ -670,6 +671,8 @@ static int flexcan_chip_start(struct net_device
> *dev)
> >  	int err;
> >  	u32 reg_mcr, reg_ctrl;
> >
> > +	can_free_echo_skb(dev, 0);
> 
> what about putting this to flexcan_chip_stop? Otherwise you risk a
> memleak if you do "ifconfig down; rmmod flexcan"

I originally thought this needs to be in flexcan_chip_start, so the bus off followed by restart sequence will drop the loopback packet. I investigated a bit deeper and can_flush_echo_skb is called in can_restart(). So my call of that function is not really needed. can_flush_echo_skb is also called in close_candev, which is called by the flexcan driver. So I actually think this function does not need to be called by the driver at all. What do you think?

> >
> >  	dev->netdev_ops = &flexcan_netdev_ops;
> >  	dev->irq = irq;
> > -	dev->flags |= IFF_ECHO; /* we support local echo in hardware */
> > +	
> > +	/* Driver supports local echo.
> > +	 * We support local echo in hardware, however this is not used
> because
> > +	 * hardware local echo loses the sending socket reference
> > +	 * (thus CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK socket
> options
> > +	 *  would not work)
> > +	 */
> 
> IMHO, you can skip this comment. The patch description is good enough.

Ok, I will drop the extra comments from the patch.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ