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] [day] [month] [year] [list]
Date:	Mon, 22 Oct 2007 21:31:40 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Denis Cheng <crquan@...il.com>
CC:	"David S. Miller" <davem@...emloft.net>,
	Jeff Garzik <jgarzik@...ox.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [net/ipv4]: fib_seq_show function adjustment to get a
 more sensable output of /proc/net/route

Denis Cheng a écrit :
> the temporary bf[127] char array is redundant, and the specified width 127 make the output of /proc/net/route include many trailing spaces;
> since most terminal's cols are less than 127, this made every fib entry occupy two lines,
> 
> after applied this patch, the output of /proc/net/route is more sensable like this:
> 
> Iface	Destination	Gateway 	Flags	RefCnt	Use	Metric	Mask		MTU	Window	IRTT
> eth0	0001A8C0	00000000	0001	0	0	0	00FFFFFF	0	0	0
> lo	0000007F	00000000	0001	0	0	0	000000FF	0	0	0
> eth0	00000000	0101A8C0	0003	0	0	0	00000000	0	0	0
> 
> Signed-off-by: Denis Cheng <crquan@...il.com>

Hum... did you test your patch with many routes declared ? (more than 32 on 
i386/x86_64)

127 is not a random value, but chosen as a power of two minus 1.
PAGE_SIZE is garanted to be a multiple of 128 (127 chars + line_feed) on all 
arches.

So each read() on /proc/net/route delivers PAGE_SIZE/128 lines.

With your patch, some lines might be truncated (one every 32 on i386)


-
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