* [PATCH net] net: fix IFF_TX_SKB_NO_LINEAR definition
@ 2022-06-23 13:32 Dan Carpenter
2022-06-24 2:40 ` Xuan Zhuo
2022-06-25 5:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-06-23 13:32 UTC (permalink / raw)
To: David S. Miller, Xuan Zhuo
Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Daniel Borkmann,
John Fastabend, Alexander Lobakin, netdev, kernel-janitors
The "1<<31" shift has a sign extension bug so IFF_TX_SKB_NO_LINEAR is
0xffffffff80000000 instead of 0x0000000080000000.
Fixes: c2ff53d8049f ("net: Add priv_flags for allow tx skb without linear")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Before IFF_CHANGE_PROTO_DOWN was added then this issue was not so bad.
include/linux/netdevice.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 89afa4f7747d..1a3cb93c3dcc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1671,7 +1671,7 @@ enum netdev_priv_flags {
IFF_FAILOVER_SLAVE = 1<<28,
IFF_L3MDEV_RX_HANDLER = 1<<29,
IFF_LIVE_RENAME_OK = 1<<30,
- IFF_TX_SKB_NO_LINEAR = 1<<31,
+ IFF_TX_SKB_NO_LINEAR = BIT_ULL(31),
IFF_CHANGE_PROTO_DOWN = BIT_ULL(32),
};
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: fix IFF_TX_SKB_NO_LINEAR definition
2022-06-23 13:32 [PATCH net] net: fix IFF_TX_SKB_NO_LINEAR definition Dan Carpenter
@ 2022-06-24 2:40 ` Xuan Zhuo
2022-06-25 5:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Xuan Zhuo @ 2022-06-24 2:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Daniel Borkmann,
John Fastabend, Alexander Lobakin, netdev, kernel-janitors,
David S. Miller
On Thu, 23 Jun 2022 16:32:32 +0300, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The "1<<31" shift has a sign extension bug so IFF_TX_SKB_NO_LINEAR is
> 0xffffffff80000000 instead of 0x0000000080000000.
>
> Fixes: c2ff53d8049f ("net: Add priv_flags for allow tx skb without linear")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Thanks.
> ---
> Before IFF_CHANGE_PROTO_DOWN was added then this issue was not so bad.
>
> include/linux/netdevice.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 89afa4f7747d..1a3cb93c3dcc 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1671,7 +1671,7 @@ enum netdev_priv_flags {
> IFF_FAILOVER_SLAVE = 1<<28,
> IFF_L3MDEV_RX_HANDLER = 1<<29,
> IFF_LIVE_RENAME_OK = 1<<30,
> - IFF_TX_SKB_NO_LINEAR = 1<<31,
> + IFF_TX_SKB_NO_LINEAR = BIT_ULL(31),
> IFF_CHANGE_PROTO_DOWN = BIT_ULL(32),
> };
>
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: fix IFF_TX_SKB_NO_LINEAR definition
2022-06-23 13:32 [PATCH net] net: fix IFF_TX_SKB_NO_LINEAR definition Dan Carpenter
2022-06-24 2:40 ` Xuan Zhuo
@ 2022-06-25 5:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-25 5:30 UTC (permalink / raw)
To: Dan Carpenter
Cc: davem, xuanzhuo, edumazet, kuba, pabeni, daniel, john.fastabend,
alobakin, netdev, kernel-janitors
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 23 Jun 2022 16:32:32 +0300 you wrote:
> The "1<<31" shift has a sign extension bug so IFF_TX_SKB_NO_LINEAR is
> 0xffffffff80000000 instead of 0x0000000080000000.
>
> Fixes: c2ff53d8049f ("net: Add priv_flags for allow tx skb without linear")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> Before IFF_CHANGE_PROTO_DOWN was added then this issue was not so bad.
>
> [...]
Here is the summary with links:
- [net] net: fix IFF_TX_SKB_NO_LINEAR definition
https://git.kernel.org/netdev/net/c/3b89b511ea0c
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] 3+ messages in thread
end of thread, other threads:[~2022-06-25 5:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-23 13:32 [PATCH net] net: fix IFF_TX_SKB_NO_LINEAR definition Dan Carpenter
2022-06-24 2:40 ` Xuan Zhuo
2022-06-25 5:30 ` 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).