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]
Date:	Mon, 8 Aug 2016 20:23:55 -0700
From:	Benjamin Poirier <benjamin.poirier@...il.com>
To:	Andreas Werner <andreas.werner@....de>
Cc:	wg@...ndegger.com, mkl@...gutronix.de, linux-can@...r.kernel.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	davem@...emloft.net, jthumshirn@...e.de, andy@...nerandy.de
Subject: Re: [PATCH RESEND] net: can: Introduce MEN 16Z192-00 CAN controller
 driver

On 2016/08/08 09:26, Andreas Werner wrote:
[...]
> > > +
> > > +	if (cf->can_dlc > 0)
> > > +		data[0] = be32_to_cpup((__be32 *)(cf->data));
> > > +	if (cf->can_dlc > 3)
> > > +		data[1] = be32_to_cpup((__be32 *)(cf->data + 4));
> > > +
> > > +	writel(id, &cf_buf->can_id);
> > > +	writel(cf->can_dlc, &cf_buf->length);
> > > +
> > > +	if (!(cf->can_id & CAN_RTR_FLAG)) {
> > > +		writel(data[0], &cf_buf->data[0]);
> > > +		writel(data[1], &cf_buf->data[1]);
> > > +
> > > +		stats->tx_bytes += cf->can_dlc;
> > > +	}
> > > +
> > > +	/* be sure everything is written to the
> > > +	 * device before acknowledge the data.
> > > +	 */
> > > +	mmiowb();
> > > +
> > > +	/* trigger the transmission */
> > > +	men_z192_ack_tx_pkg(priv, 1);
> > > +
> > > +	stats->tx_packets++;
> > > +
> > > +	kfree_skb(skb);
> > 
> > What prevents the skb data to be freed/reused before the device has
> > accessed it?

I'm sorry, I hadn't realized that all of the data (all 8 bytes of it!)
is written directly to the device. I was thinking about ethernet devices
that dma packet data.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ