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, clang-built-linux@googlegroups.com
Subject: Re: [PATCH nf 2/2] netfilter: nft_osf: check for TCP packet before further processing
Date: Wed, 16 Jun 2021 22:42:00 +0800	[thread overview]
Message-ID: <202106162231.NeDc2TLw-lkp@intel.com> (raw)
In-Reply-To: <20210610182032.28096-2-pablo@netfilter.org>

[-- Attachment #1: Type: text/plain, Size: 3044 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: arm-randconfig-r001-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/f572a05becf9cc86053b01e0f0f898334583692a
        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 f572a05becf9cc86053b01e0f0f898334583692a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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_osf.c:33:3: error: 'break' statement not in loop or switch statement
                   break;
                   ^
   1 error generated.


vim +/break +33 net/netfilter/nft_osf.c

    19	
    20	static void nft_osf_eval(const struct nft_expr *expr, struct nft_regs *regs,
    21				 const struct nft_pktinfo *pkt)
    22	{
    23		struct nft_osf *priv = nft_expr_priv(expr);
    24		u32 *dest = &regs->data[priv->dreg];
    25		struct sk_buff *skb = pkt->skb;
    26		char os_match[NFT_OSF_MAXGENRELEN + 1];
    27		const struct tcphdr *tcp;
    28		struct nf_osf_data data;
    29		struct tcphdr _tcph;
    30	
    31		if (pkt->tprot != IPPROTO_TCP) {
    32			regs->verdict.code = NFT_BREAK;
  > 33			break;
    34		}
    35	
    36		tcp = skb_header_pointer(skb, ip_hdrlen(skb),
    37					 sizeof(struct tcphdr), &_tcph);
    38		if (!tcp) {
    39			regs->verdict.code = NFT_BREAK;
    40			return;
    41		}
    42		if (!tcp->syn) {
    43			regs->verdict.code = NFT_BREAK;
    44			return;
    45		}
    46	
    47		if (!nf_osf_find(skb, nf_osf_fingers, priv->ttl, &data)) {
    48			strncpy((char *)dest, "unknown", NFT_OSF_MAXGENRELEN);
    49		} else {
    50			if (priv->flags & NFT_OSF_F_VERSION)
    51				snprintf(os_match, NFT_OSF_MAXGENRELEN, "%s:%s",
    52					 data.genre, data.version);
    53			else
    54				strlcpy(os_match, data.genre, NFT_OSF_MAXGENRELEN);
    55	
    56			strncpy((char *)dest, os_match, NFT_OSF_MAXGENRELEN);
    57		}
    58	}
    59	

---
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: 28746 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 2/2] netfilter: nft_osf: check for TCP packet before further processing
Date: Wed, 16 Jun 2021 22:42:00 +0800	[thread overview]
Message-ID: <202106162231.NeDc2TLw-lkp@intel.com> (raw)
In-Reply-To: <20210610182032.28096-2-pablo@netfilter.org>

[-- Attachment #1: Type: text/plain, Size: 3126 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: arm-randconfig-r001-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/f572a05becf9cc86053b01e0f0f898334583692a
        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 f572a05becf9cc86053b01e0f0f898334583692a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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_osf.c:33:3: error: 'break' statement not in loop or switch statement
                   break;
                   ^
   1 error generated.


vim +/break +33 net/netfilter/nft_osf.c

    19	
    20	static void nft_osf_eval(const struct nft_expr *expr, struct nft_regs *regs,
    21				 const struct nft_pktinfo *pkt)
    22	{
    23		struct nft_osf *priv = nft_expr_priv(expr);
    24		u32 *dest = &regs->data[priv->dreg];
    25		struct sk_buff *skb = pkt->skb;
    26		char os_match[NFT_OSF_MAXGENRELEN + 1];
    27		const struct tcphdr *tcp;
    28		struct nf_osf_data data;
    29		struct tcphdr _tcph;
    30	
    31		if (pkt->tprot != IPPROTO_TCP) {
    32			regs->verdict.code = NFT_BREAK;
  > 33			break;
    34		}
    35	
    36		tcp = skb_header_pointer(skb, ip_hdrlen(skb),
    37					 sizeof(struct tcphdr), &_tcph);
    38		if (!tcp) {
    39			regs->verdict.code = NFT_BREAK;
    40			return;
    41		}
    42		if (!tcp->syn) {
    43			regs->verdict.code = NFT_BREAK;
    44			return;
    45		}
    46	
    47		if (!nf_osf_find(skb, nf_osf_fingers, priv->ttl, &data)) {
    48			strncpy((char *)dest, "unknown", NFT_OSF_MAXGENRELEN);
    49		} else {
    50			if (priv->flags & NFT_OSF_F_VERSION)
    51				snprintf(os_match, NFT_OSF_MAXGENRELEN, "%s:%s",
    52					 data.genre, data.version);
    53			else
    54				strlcpy(os_match, data.genre, NFT_OSF_MAXGENRELEN);
    55	
    56			strncpy((char *)dest, os_match, NFT_OSF_MAXGENRELEN);
    57		}
    58	}
    59	

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

  reply	other threads:[~2021-06-16 14:42 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 [this message]
2021-06-16 14:42     ` kernel test robot
2021-06-16 12:48 ` [PATCH nf 1/2] netfilter: nft_exthdr: check for IPv6 " kernel test robot
2021-06-16 12:48   ` 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=202106162231.NeDc2TLw-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.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.