From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A2FAC43334 for ; Fri, 24 Jun 2022 02:41:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbiFXClO (ORCPT ); Thu, 23 Jun 2022 22:41:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiFXClM (ORCPT ); Thu, 23 Jun 2022 22:41:12 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE50F563AE; Thu, 23 Jun 2022 19:41:10 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=xuanzhuo@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0VHErnnD_1656038467; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0VHErnnD_1656038467) by smtp.aliyun-inc.com; Fri, 24 Jun 2022 10:41:07 +0800 Message-ID: <1656038444.6413577-1-xuanzhuo@linux.alibaba.com> Subject: Re: [PATCH net] net: fix IFF_TX_SKB_NO_LINEAR definition Date: Fri, 24 Jun 2022 10:40:44 +0800 From: Xuan Zhuo To: Dan Carpenter Cc: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Daniel Borkmann , John Fastabend , Alexander Lobakin , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, "David S. Miller" References: In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: kernel-janitors@vger.kernel.org On Thu, 23 Jun 2022 16:32:32 +0300, Dan Carpenter 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 Reviewed-by: Xuan Zhuo 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 >