* [PATCH net-next 1/1] net: ethtool: reject unsupported RSS input xfrm values
@ 2024-01-04 21:26 Ahmed Zaki
2024-01-06 3:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Ahmed Zaki @ 2024-01-04 21:26 UTC (permalink / raw)
To: netdev
Cc: corbet, jesse.brandeburg, anthony.l.nguyen, davem, edumazet, kuba,
pabeni, vladimir.oltean, andrew, horms, mkubecek, Ahmed Zaki
RXFH input_xfrm currently has three supported values: 0 (clear all),
symmetric_xor and NO_CHANGE.
Reject any other value sent from user-space.
Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
---
net/ethtool/ioctl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 4bc9a2a07bbb..7519b0818b91 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1302,6 +1302,9 @@ static noinline_for_stack int ethtool_set_rxfh(struct net_device *dev,
if (rxfh.rss_context && !ops->cap_rss_ctx_supported)
return -EOPNOTSUPP;
/* Check input data transformation capabilities */
+ if (rxfh.input_xfrm && rxfh.input_xfrm != RXH_XFRM_SYM_XOR &&
+ rxfh.input_xfrm != RXH_XFRM_NO_CHANGE)
+ return -EINVAL;
if ((rxfh.input_xfrm & RXH_XFRM_SYM_XOR) &&
!ops->cap_rss_sym_xor_supported)
return -EOPNOTSUPP;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next 1/1] net: ethtool: reject unsupported RSS input xfrm values
2024-01-04 21:26 [PATCH net-next 1/1] net: ethtool: reject unsupported RSS input xfrm values Ahmed Zaki
@ 2024-01-06 3:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-01-06 3:40 UTC (permalink / raw)
To: Ahmed Zaki
Cc: netdev, corbet, jesse.brandeburg, anthony.l.nguyen, davem,
edumazet, kuba, pabeni, vladimir.oltean, andrew, horms, mkubecek
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 4 Jan 2024 14:26:53 -0700 you wrote:
> RXFH input_xfrm currently has three supported values: 0 (clear all),
> symmetric_xor and NO_CHANGE.
>
> Reject any other value sent from user-space.
>
> Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash")
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
>
> [...]
Here is the summary with links:
- [net-next,1/1] net: ethtool: reject unsupported RSS input xfrm values
https://git.kernel.org/netdev/net-next/c/948f97f9d8d2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-06 3:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 21:26 [PATCH net-next 1/1] net: ethtool: reject unsupported RSS input xfrm values Ahmed Zaki
2024-01-06 3:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).