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:   Wed, 31 Oct 2018 20:48:05 -0600
From:   David Ahern <dsahern@...il.com>
To:     Stefano Brivio <sbrivio@...hat.com>
Cc:     "Yoann P." <yoann.p.public@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 net-next 0/3] ss: Allow selection of columns to
 be displayed


[ sorry, too many distractions and I forgot to respond ]

On 10/30/18 11:34 AM, Stefano Brivio wrote:
> On Tue, 30 Oct 2018 10:34:45 -0600
> David Ahern <dsahern@...il.com> wrote:
> 
>> A more flexible approach is to use format strings to allow users to
>> customize the output order and whitespace as well. So for ss and your
>> column list (winging it here):
>>
>>     netid          = %N
>>     state          = %S
>>     recv Q         = %Qr
>>     send Q         = %Qs
>>     local address  = %Al
>>     lport port     = %Pl
>>     remote address = %Ar
>>     remote port    = %Pr
>>     process data   = %p
>>     ...
>>
>> then a format string could be: "%S  %Qr %Qs  %Al:%Pl %Ar:%Pr  %p\n"
> 
> I like the idea indeed, but I see two issues with ss:
> 
> - the current column abstraction is rather lightweight, things are
>   already buffered in the defined column order so we don't have to jump
>   back and forth in the buffer while rendering. Doing that needs some
>   extra care to avoid a performance hit, but it's probably doable, I
>   can put that on my to-do list

The ss command is always a pain; it's much better in newer releases but
I am always having to adjust terminal width.

> 
> - how would you model automatic spacing in a format string? Should we
>   support width specifiers? Disable automatic spacing if a format
>   string is given? It might even make sense to allow partial automatic

Follow the format string for whitespace and order, and
yes, on the width specifiers if possible.

>   spacing with a special character in the format string, that is:
> 
> 	"%S.%Qr.%Qs  %Al:%Pl %Ar:%Pr  %p\n"
> 
>   would mean "align everything to the right, distribute remaining
>   whitespace between %S, %Qr and %Qs". But it looks rather complicated
>   at a glance.
> 

My concern here is that once this goes in for 1 command, the others in
iproute2 need to follow suit - meaning same syntax style for all
commands. Given that I'd prefer we get a reasonable consensus on syntax
that will work across commands -- ss, ip, tc. If it is as simple as
column names with a fixed order, that is fine but just give proper
consideration given the impact.

The 'ip' syntax for example gets ugly quick with the various link types
and their options. We don't need to allow every detail of each link type
to be customized, but there are common attributes for links (e.g., mtu,
ifindex, link flags, lladdr), addresses, and link types such as bridges
and bonds where we can improve the amount of data thrown at a user -- a
better, more customizable version of what the brief option targeted.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ