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, 21 Sep 2022 16:13:37 +0300
From:   Nikolay Aleksandrov <razor@...ckwall.org>
To:     Jakub Kicinski <kuba@...nel.org>,
        Hangbin Liu <liuhangbin@...il.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Ido Schimmel <idosch@...dia.com>,
        Petr Machata <petrm@...dia.com>,
        Florent Fourcot <florent.fourcot@...irst.fr>,
        Guillaume Nault <gnault@...hat.com>
Subject: Re: [PATCH net-next] rtnetlink: Honour NLM_F_ECHO flag in rtnl_{new,
 set}link

On 21/09/2022 16:01, Jakub Kicinski wrote:
> On Wed, 21 Sep 2022 11:07:21 +0800 Hangbin Liu wrote:
>> Netlink messages are used for communicating between user and kernel space.
>> When user space configures the kernel with netlink messages, it can set the
>> NLM_F_ECHO flag to request the kernel to send the applied configuration back
>> to the caller. This allows user space to retrieve configuration information
>> that are filled by the kernel (either because these parameters can only be
>> set by the kernel or because user space let the kernel choose a default
>> value).
>>
>> This patch handles NLM_F_ECHO flag and send link info back after
>> rtnl_{new, set}link.
>>
>> Suggested-by: Guillaume Nault <gnault@...hat.com>
>> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
>> ---
>>
>> In this patch I use rtnl_unicast to send the nlmsg directly. But we can
>> also pass "struct nlmsghdr *nlh" to rtnl_newlink_create() and
>> do_setlink(), then call rtnl_notify to send the nlmsg. I'm not sure
>> which way is better, any comments?
>>
>> For iproute2 patch, please see
>> https://patchwork.kernel.org/project/netdevbpf/patch/20220916033428.400131-2-liuhangbin@gmail.com/
> 
> I feel like the justification for the change is lacking.
> 
> I'm biased [and frankly it takes a lot of self-restraint for me not
> to say how I _really_ feel about netlink msg flags ;)] but IMO the
> message flags fall squarely into the "this is magic which was never
> properly implemented" bucket.
> 
> What makes this flag better than just issuing a GET command form user
> space?
> 
> The flag was never checked on input and is not implemented by 99% of
> netlink families and commands.
> > I'd love to hear what others think. IMO we should declare a moratorium
> on any use of netlink flags and fixed fields, push netlink towards
> being a simple conduit for TLVs.
> 

+1
Just issue a "get" after the change.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ