Thread (8 messages) 8 messages, 2 authors, 2012-10-20

Re: [PATCH net-next] packet mmap : allow the user to choose tx data offset.

flat view

From: Paul Chavent <hidden>
Date: 2012-10-19 13:53:12

There is a point where I'm wrong in my last reply :

On 10/19/2012 01:36 PM, Daniel Borkmann wrote:
quoted
+               int off;
For offsets, better use off_t, or here u32. Also, add a newline after
variable declaration.
i use int because of arithmetics :
off_max = po->tx_ring.frame_size - tp_len;

If the user give a bad tp_len (> po->tx_ring.frame_size), with unsigned we will probably miss the check that follow :
		
if (unlikely((off < off_min) || (off_max < off)))
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help