Re: [PATCH net-next v2 5/5] ethtool: strset: check nla_len overflow
From: Jakub Kicinski
Date: Thu Apr 09 2026 - 22:15:18 EST
On Thu, 9 Apr 2026 18:12:36 +0200 Andrew Lunn wrote:
> > I guess... Should we update ethtool.yaml doc to tell the users to prefer
> > ioctl over netlink for strset-get and mention this new EMSGSIZE?
>
> No. The ioctl is deprecated. It can still be used for drivers which
> need it, but netlink is the preferred method.
Off the top of my head I think string sets are used in Netlink in
bitsets. These are the first class citizen string sets, maintained
in the core.
I'm not sure if there was any motivation for exposing other string
sets (like driver priv flags, legacy stats etc) via Netlink or it
was just a "why not cover the entire enum if it just works" thing.
There is no known real user space which runs into the Netlink + legacy
strings issue. Hangbin was doing exhaustive testing of the ethtool
YNL.
LMK if this makes sense or I'm missing a concern. If we need to make
larger string sets work we'll definitely have to revisit. But I'd like
to have that helper from patch 4 in tree sooner rather than later,
so I'd lean towards merging this series.