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  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, 01 Dec 2008 21:17:02 +0100
From:	"Benjamin Thery " <Benjamin.Thery@...l.net>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	Dave Miller <davem@...emloft.net>,
	netdev hem <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: fix /proc/net/ip_mr_cache display

Stephen Hemminger <shemminger@...tta.com> a écrit :

> On Mon, 01 Dec 2008 17:49:56 +0100
> Benjamin Thery <benjamin.thery@...l.net> wrote:
>
>> Argh, my patch breaks iproute2 command: ip mroute show
>>
>> iproute2 uses sscanf() to read /proc/net/ip_mr_cache and expects 6
>> fields to be read. For the unresolved entries my patch only displays
>> the first three fields. As a consequence, 'ip mroute show' skips the
>> unresolved entries. :(
>>
>> So we can
>> - either forget this patch and keep displaying garbage information
>>    in /proc/net/ip[6]_mr_cache for the unresolved entries. (No one
>>    complained before)
>> - or may be we can just print '-' or 0 for the fields that have no
>>    data associated in the unresolved case.
>>
>> Tell me what you prefer.
>>
>> Benjamin
>
> /proc file formats are part of the Linux ABI and can't change!

Yes, of course I know that. But as in this case part of the data
displayed in /proc/net/ip_mr_cache and /proc/net/ip6_mr_cache for
unresolved cache entries are complete rubbish (see the patch
description), I thought it can be improved.

The right way to fix it, IMHO, is to print 0 (zero) in the columns
that have no meaning for the unresolved entries. That way we don't
break the ABI: the userspace expects to get at least 6 numbers for
each entries, it gets 6 numbers. It's easy to figure what zeros
represent and this prevent people from wasting time trying to figure
what to do with these "random" numbers on the unresolved entries, no?


Regards,
Benjamin




>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

--
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