All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Florian Westphal <fw@strlen.de>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [nf-next:master 14/14] net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true'
Date: Sat, 29 May 2021 13:28:54 +0800	[thread overview]
Message-ID: <202105291346.21C6sEeW-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2666 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
head:   62cd0c1853667efb2b929682dcefe4cbf00502a4
commit: 62cd0c1853667efb2b929682dcefe4cbf00502a4 [14/14] netfilter: nf_tables: remove xt_action_param from nft_pktinfo
config: x86_64-randconfig-a003-20210529 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bc6799f2f79f0ae87e9f1ebf9d25ba799fbd25a9)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=62cd0c1853667efb2b929682dcefe4cbf00502a4
        git remote add nf-next https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
        git fetch --no-tags nf-next master
        git checkout 62cd0c1853667efb2b929682dcefe4cbf00502a4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true' [-Wpointer-bool-conversion]
           if (&xt.hotdrop)
           ~~   ~~~^~~~~~~
   1 warning generated.


vim +113 net/netfilter/nft_compat.c

    98	
    99	static void nft_target_eval_bridge(const struct nft_expr *expr,
   100					   struct nft_regs *regs,
   101					   const struct nft_pktinfo *pkt)
   102	{
   103		void *info = nft_expr_priv(expr);
   104		struct xt_target *target = expr->ops->data;
   105		struct sk_buff *skb = pkt->skb;
   106		struct xt_action_param xt;
   107		int ret;
   108	
   109		nft_compat_set_par(&xt, pkt, target, info);
   110	
   111		ret = target->target(skb, &xt);
   112	
 > 113		if (&xt.hotdrop)
   114			ret = NF_DROP;
   115	
   116		switch (ret) {
   117		case EBT_ACCEPT:
   118			regs->verdict.code = NF_ACCEPT;
   119			break;
   120		case EBT_DROP:
   121			regs->verdict.code = NF_DROP;
   122			break;
   123		case EBT_CONTINUE:
   124			regs->verdict.code = NFT_CONTINUE;
   125			break;
   126		case EBT_RETURN:
   127			regs->verdict.code = NFT_RETURN;
   128			break;
   129		default:
   130			regs->verdict.code = ret;
   131			break;
   132		}
   133	}
   134	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 39180 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [nf-next:master 14/14] net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true'
Date: Sat, 29 May 2021 13:28:54 +0800	[thread overview]
Message-ID: <202105291346.21C6sEeW-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2739 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
head:   62cd0c1853667efb2b929682dcefe4cbf00502a4
commit: 62cd0c1853667efb2b929682dcefe4cbf00502a4 [14/14] netfilter: nf_tables: remove xt_action_param from nft_pktinfo
config: x86_64-randconfig-a003-20210529 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bc6799f2f79f0ae87e9f1ebf9d25ba799fbd25a9)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/?id=62cd0c1853667efb2b929682dcefe4cbf00502a4
        git remote add nf-next https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git
        git fetch --no-tags nf-next master
        git checkout 62cd0c1853667efb2b929682dcefe4cbf00502a4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true' [-Wpointer-bool-conversion]
           if (&xt.hotdrop)
           ~~   ~~~^~~~~~~
   1 warning generated.


vim +113 net/netfilter/nft_compat.c

    98	
    99	static void nft_target_eval_bridge(const struct nft_expr *expr,
   100					   struct nft_regs *regs,
   101					   const struct nft_pktinfo *pkt)
   102	{
   103		void *info = nft_expr_priv(expr);
   104		struct xt_target *target = expr->ops->data;
   105		struct sk_buff *skb = pkt->skb;
   106		struct xt_action_param xt;
   107		int ret;
   108	
   109		nft_compat_set_par(&xt, pkt, target, info);
   110	
   111		ret = target->target(skb, &xt);
   112	
 > 113		if (&xt.hotdrop)
   114			ret = NF_DROP;
   115	
   116		switch (ret) {
   117		case EBT_ACCEPT:
   118			regs->verdict.code = NF_ACCEPT;
   119			break;
   120		case EBT_DROP:
   121			regs->verdict.code = NF_DROP;
   122			break;
   123		case EBT_CONTINUE:
   124			regs->verdict.code = NFT_CONTINUE;
   125			break;
   126		case EBT_RETURN:
   127			regs->verdict.code = NFT_RETURN;
   128			break;
   129		default:
   130			regs->verdict.code = ret;
   131			break;
   132		}
   133	}
   134	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 39180 bytes --]

             reply	other threads:[~2021-05-29  5:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29  5:28 kernel test robot [this message]
2021-05-29  5:28 ` [nf-next:master 14/14] net/netfilter/nft_compat.c:113:10: warning: address of 'xt.hotdrop' will always evaluate to 'true' kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202105291346.21C6sEeW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=coreteam@netfilter.org \
    --cc=fw@strlen.de \
    --cc=kbuild-all@lists.01.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.