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]
Message-ID: <20220930165713.GH10057@localhost.localdomain>
Date:   Fri, 30 Sep 2022 18:57:13 +0200
From:   Guillaume Nault <gnault@...hat.com>
To:     Hangbin Liu <liuhangbin@...il.com>
Cc:     netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Ido Schimmel <idosch@...dia.com>,
        Petr Machata <petrm@...dia.com>,
        Florent Fourcot <florent.fourcot@...irst.fr>,
        Nikolay Aleksandrov <razor@...ckwall.org>,
        Nicolas Dichtel <nicolas.dichtel@...nd.com>,
        David Ahern <dsahern@...nel.org>
Subject: Re: [PATCHv5 net-next 4/4] rtnetlink: Honour NLM_F_ECHO flag in
 rtnl_delete_link

On Fri, Sep 30, 2022 at 05:45:06PM +0800, Hangbin Liu wrote:
> This patch use the new helper unregister_netdevice_many_notify() for
> rtnl_delete_link(), so that the kernel could reply unicast when userspace
>  set NLM_F_ECHO flag to request the new created interface info.
> 
> At the same time, the parameters of rtnl_delete_link() need to be updated
> since we need nlmsghdr and pid info.
> 
> Suggested-by: Guillaume Nault <gnault@...hat.com>
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> ---
>  include/net/rtnetlink.h        | 2 +-
>  net/core/rtnetlink.c           | 7 ++++---
>  net/openvswitch/vport-geneve.c | 2 +-
>  net/openvswitch/vport-gre.c    | 2 +-
>  net/openvswitch/vport-netdev.c | 2 +-
>  net/openvswitch/vport-vxlan.c  | 2 +-
>  6 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
> index bf8bb3357825..1a152993caef 100644
> --- a/include/net/rtnetlink.h
> +++ b/include/net/rtnetlink.h
> @@ -186,7 +186,7 @@ struct net_device *rtnl_create_link(struct net *net, const char *ifname,
>  				    const struct rtnl_link_ops *ops,
>  				    struct nlattr *tb[],
>  				    struct netlink_ext_ack *extack);
> -int rtnl_delete_link(struct net_device *dev);
> +int rtnl_delete_link(struct net_device *dev, struct nlmsghdr *nlh, u32 pid);
>  int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm);

You didn't add a wrapper for rtnl_delete_link() here and modified the
callers instead, which makes me think you could just also have modified
rtnl_configure_link() directly and avoided the creation of
rtnl_configure_link_notify() in patch 1.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ