Re: [PATCH net-next] ethtool: tsconfig: reject zero-valued tx_type and rx_filter bitsets

[email protected]
Newsgroups gmane.linux.network
Message-ID <178667785489.3150297.2811414686055013056.git-patchwork-notify@kernel.org>
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <[email protected]>:

On Wed, 12 Aug 2026 09:22:30 -0700 you wrote:
> The ffs()/fls() guard in ethnl_set_tsconfig() was meant to enforce
> that the user selects exactly one tx_type (and one rx_filter)
> at a time (off / none are explicit types with non-zero values).
> However, both ffs(0) and fls(0) return 0, so the guard passes
> a zero-valued bitset through.
> 
> The subsequent ffs(req_tx_type) - 1 would produce -1, if user selected
> no bit. net_hwtstamp_validate() catches the invalid -1 downstream,
> but returns a generic error (-ERANGE) without telling the user
> what went wrong. Return -EINVAL + extack instead.
> 
> [...]

Here is the summary with links:
  - [net-next] ethtool: tsconfig: reject zero-valued tx_type and rx_filter bitsets
    https://git.kernel.org/netdev/net-next/c/77e80af7d2d4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.