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
| ||
|
Message-ID: <YzvZEDTM1FVOX9BC@nanopsycho> Date: Tue, 4 Oct 2022 08:56:16 +0200 From: Jiri Pirko <jiri@...nulli.us> To: Jakub Kicinski <kuba@...nel.org> Cc: netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com, edumazet@...gle.com, tariqt@...dia.com, moshe@...dia.com, saeedm@...dia.com, linux-rdma@...r.kernel.org Subject: Re: [patch net-next v2 00/13] net: fix netdev to devlink_port linkage and expose to user Mon, Oct 03, 2022 at 06:45:56PM CEST, kuba@...nel.org wrote: >On Mon, 3 Oct 2022 12:51:51 +0200 Jiri Pirko wrote: >> Currently, the info about linkage from netdev to the related >> devlink_port instance is done using ndo_get_devlink_port(). >> This is not sufficient, as it is up to the driver to implement it and >> some of them don't do that. Also it leads to a lot of unnecessary >> boilerplate code in all the drivers. >> >> Instead of that, introduce a possibility for driver to expose this >> relationship by new SET_NETDEV_DEVLINK_PORT macro which stores it into >> dev->devlink_port. It is ensured by the driver init/fini flows that >> the devlink_port pointer does not change during the netdev lifetime. >> Devlink port is always registered before netdev register and >> unregistered after netdev unregister. >> >> Benefit from this linkage setup and remove explicit calls from driver >> to devlink_port_type_eth_set() and clear(). Many of the driver >> didn't use it correctly anyway. Let the devlink.c to track associated >> netdev events and adjust type and type pointer accordingly. Also >> use this events to to keep track on ifname change and remove RTNL lock >> taking from devlink_nl_port_fill(). >> >> Finally, remove the ndo_get_devlink_port() ndo which is no longer used >> and expose devlink_port handle as a new netdev netlink attribute to the >> user. That way, during the ifname->devlink_port lookup, userspace app >> does not have to dump whole devlink port list and instead it can just >> do a simple RTM_GETLINK query. > >Would you be okay if we deferred until 6.2? > >It's technically past the deadline and some odd driver could regress. Sure.
Powered by blists - more mailing lists