All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH nf 1/2] netfilter: nft_exthdr: check for IPv6 packet before further processing
Date: Wed, 16 Jun 2021 20:48:16 +0800	[thread overview]
Message-ID: <202106162051.s2HgMJeh-lkp@intel.com> (raw)
In-Reply-To: <20210610182032.28096-1-pablo@netfilter.org>

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

Hi Pablo,

I love your patch! Yet something to improve:

[auto build test ERROR on nf/master]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nft_exthdr-check-for-IPv6-packet-before-further-processing/20210616-144640
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: i386-randconfig-s001-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/3e2206f7e73972c0cb8a3b6b8a8e0b636a959c96
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pablo-Neira-Ayuso/netfilter-nft_exthdr-check-for-IPv6-packet-before-further-processing/20210616-144640
        git checkout 3e2206f7e73972c0cb8a3b6b8a8e0b636a959c96
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

   net/netfilter/nft_exthdr.c: In function 'nft_exthdr_ipv6_eval':
>> net/netfilter/nft_exthdr.c:45:6: error: 'skb' undeclared (first use in this function)
      45 |  if (skb->protocol != htons(ETH_P_IPV6))
         |      ^~~
   net/netfilter/nft_exthdr.c:45:6: note: each undeclared identifier is reported only once for each function it appears in


vim +/skb +45 net/netfilter/nft_exthdr.c

    35	
    36	static void nft_exthdr_ipv6_eval(const struct nft_expr *expr,
    37					 struct nft_regs *regs,
    38					 const struct nft_pktinfo *pkt)
    39	{
    40		struct nft_exthdr *priv = nft_expr_priv(expr);
    41		u32 *dest = &regs->data[priv->dreg];
    42		unsigned int offset = 0;
    43		int err;
    44	
  > 45		if (skb->protocol != htons(ETH_P_IPV6))
    46			goto err;
    47	
    48		err = ipv6_find_hdr(pkt->skb, &offset, priv->type, NULL, NULL);
    49		if (priv->flags & NFT_EXTHDR_F_PRESENT) {
    50			nft_reg_store8(dest, err >= 0);
    51			return;
    52		} else if (err < 0) {
    53			goto err;
    54		}
    55		offset += priv->offset;
    56	
    57		dest[priv->len / NFT_REG32_SIZE] = 0;
    58		if (skb_copy_bits(pkt->skb, offset, dest, priv->len) < 0)
    59			goto err;
    60		return;
    61	err:
    62		regs->verdict.code = NFT_BREAK;
    63	}
    64	

---
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: 42304 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH nf 1/2] netfilter: nft_exthdr: check for IPv6 packet before further processing
Date: Wed, 16 Jun 2021 20:48:16 +0800	[thread overview]
Message-ID: <202106162051.s2HgMJeh-lkp@intel.com> (raw)
In-Reply-To: <20210610182032.28096-1-pablo@netfilter.org>

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

Hi Pablo,

I love your patch! Yet something to improve:

[auto build test ERROR on nf/master]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nft_exthdr-check-for-IPv6-packet-before-further-processing/20210616-144640
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: i386-randconfig-s001-20210615 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/3e2206f7e73972c0cb8a3b6b8a8e0b636a959c96
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Pablo-Neira-Ayuso/netfilter-nft_exthdr-check-for-IPv6-packet-before-further-processing/20210616-144640
        git checkout 3e2206f7e73972c0cb8a3b6b8a8e0b636a959c96
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386 

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

All errors (new ones prefixed by >>):

   net/netfilter/nft_exthdr.c: In function 'nft_exthdr_ipv6_eval':
>> net/netfilter/nft_exthdr.c:45:6: error: 'skb' undeclared (first use in this function)
      45 |  if (skb->protocol != htons(ETH_P_IPV6))
         |      ^~~
   net/netfilter/nft_exthdr.c:45:6: note: each undeclared identifier is reported only once for each function it appears in


vim +/skb +45 net/netfilter/nft_exthdr.c

    35	
    36	static void nft_exthdr_ipv6_eval(const struct nft_expr *expr,
    37					 struct nft_regs *regs,
    38					 const struct nft_pktinfo *pkt)
    39	{
    40		struct nft_exthdr *priv = nft_expr_priv(expr);
    41		u32 *dest = &regs->data[priv->dreg];
    42		unsigned int offset = 0;
    43		int err;
    44	
  > 45		if (skb->protocol != htons(ETH_P_IPV6))
    46			goto err;
    47	
    48		err = ipv6_find_hdr(pkt->skb, &offset, priv->type, NULL, NULL);
    49		if (priv->flags & NFT_EXTHDR_F_PRESENT) {
    50			nft_reg_store8(dest, err >= 0);
    51			return;
    52		} else if (err < 0) {
    53			goto err;
    54		}
    55		offset += priv->offset;
    56	
    57		dest[priv->len / NFT_REG32_SIZE] = 0;
    58		if (skb_copy_bits(pkt->skb, offset, dest, priv->len) < 0)
    59			goto err;
    60		return;
    61	err:
    62		regs->verdict.code = NFT_BREAK;
    63	}
    64	

---
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: 42304 bytes --]

  parent reply	other threads:[~2021-06-16 12:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-10 18:20 [PATCH nf 1/2] netfilter: nft_exthdr: check for IPv6 packet before further processing Pablo Neira Ayuso
2021-06-10 18:20 ` [PATCH nf 2/2] netfilter: nft_osf: check for TCP " Pablo Neira Ayuso
2021-06-16 14:42   ` kernel test robot
2021-06-16 14:42     ` kernel test robot
2021-06-16 12:48 ` kernel test robot [this message]
2021-06-16 12:48   ` [PATCH nf 1/2] netfilter: nft_exthdr: check for IPv6 " kernel test robot
2021-06-16 13:48 ` kernel test robot
2021-06-16 13:48   ` kernel test robot
2021-06-16 14:14 ` kernel test robot
2021-06-16 14:14   ` 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=202106162051.s2HgMJeh-lkp@intel.com \
    --to=lkp@intel.com \
    --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.