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 Feb 2024 11:09:52 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Joe Damato <jdamato@...tly.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, Alexei Starovoitov
 <ast@...nel.org>, Amritha Nambiar <amritha.nambiar@...el.com>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jesper
 Dangaard Brouer <hawk@...nel.org>, Larysa Zaremba
 <larysa.zaremba@...el.com>, Maciej Fijalkowski
 <maciej.fijalkowski@...el.com>, Paolo Abeni <pabeni@...hat.com>, Sridhar
 Samudrala <sridhar.samudrala@...el.com>, Stanislav Fomichev
 <sdf@...gle.com>, Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH net-next 0/2] Expose netdev name in netdev netlink APIs

On Wed, 21 Feb 2024 07:57:28 -0800 Joe Damato wrote:
> Greetings:
> 
> The netdev netlink APIs currently provide the ifindex of a device
> associated with the NIC queue or NAPI when the netlink API is used. In
> order for user applications to map this back to a human readable device
> name, user applications must issue a subsequent ioctl (SIOCGIFNAME) in
> order to map an ifindex back to a device name.

To be clear, if_indextoname() is doing it, right? I wanted to be sure
the concern is really number of syscalls, not the difficulty in getting
the name.

> This patch set adds ifname to the API so that when queue or NAPI
> information is retrieved, the human readable string is included. The netdev
> netlink YAML spec has been updated to include this field, as well.
> 
> This saves the subsequent call to ioctl and makes the netlink information
> more user friendly. Applications might use this information in conjunction
> with SO_INCOMING_NAPI_ID to map NAPI IDs to specific NICs with application
> specific configuration (e.g. NUMA zone and CPU layout information).

For context, the reason why I left the names out is that they can change
at any moment, but primarily because there are also altnames now:

2: eth0:
[...]
    altname enp2s0np0

Most of the APIs try to accept altnames as well as the "main" name.
If we propagate the name we'll step back into the rtnetlink naming
mess :(

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ