All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH] err.h: add type checking to IS_ERR_VALUE macro
Date: Fri, 18 Dec 2015 15:02:43 +0100	[thread overview]
Message-ID: <56741203.8000404@samsung.com> (raw)
In-Reply-To: <201512181904.10FwDTvV%fengguang.wu@intel.com>

Hi kbuild test robot,

Thanks for tests :)

Log below shows there are IS_ERR_VALUE usage bugs present in the kernel,
which SmPL patch did not detected.
These bugs should be fixed before accepting current version of my patch.
If alternative version will be chosen, 'bugs' should become valid code.

Regards
Andrzej

On 12/18/2015 12:22 PM, kbuild test robot wrote:
> Hi Andrzej,
>
> [auto build test WARNING on v4.4-rc5]
> [also build test WARNING on next-20151217]
>
> url:    https://github.com/0day-ci/linux/commits/Andrzej-Hajda/err-h-add-type-checking-to-IS_ERR_VALUE-macro/20151218-185839
> config: m68k-sun3_defconfig (attached as .config)
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=m68k 
>
> All warnings (new ones prefixed by >>):
>
>    In file included from include/uapi/linux/stddef.h:1:0,
>                     from include/linux/stddef.h:4,
>                     from include/uapi/linux/posix_types.h:4,
>                     from include/uapi/linux/types.h:13,
>                     from include/linux/types.h:5,
>                     from include/uapi/linux/sysinfo.h:4,
>                     from include/uapi/linux/kernel.h:4,
>                     from include/linux/cache.h:4,
>                     from net/ipv4/netfilter/ip_tables.c:13:
>    In function 'find_check_entry.isra.12',
>        inlined from 'translate_table' at net/ipv4/netfilter/ip_tables.c:868:7:
>    include/linux/compiler.h:484:38: error: call to '__compiletime_assert_674' declared with attribute error: Invalid IS_ERR_VALUE argument type
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>                                          ^
>    include/linux/compiler.h:467:4: note: in definition of macro '__compiletime_assert'
>        prefix ## suffix();    \
>        ^
>    include/linux/compiler.h:484:2: note: in expansion of macro '_compiletime_assert'
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>      ^
>    include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_assert'
>     #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                         ^
>    include/linux/err.h:24:5: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>         BUILD_BUG_ON_MSG((typeof(x))(-MAX_ERRNO) != (unsigned long)-MAX_ERRNO, "Invalid IS_ERR_VALUE argument type");\
>         ^
>>> net/ipv4/netfilter/ip_tables.c:674:6: note: in expansion of macro 'IS_ERR_VALUE'
>      if (IS_ERR_VALUE(e->counters.pcnt))
>          ^
> --
>    In file included from include/linux/linkage.h:4:0,
>                     from include/linux/kernel.h:6,
>                     from net/ipv4/netfilter/arp_tables.c:13:
>    In function 'find_check_entry.isra.14',
>        inlined from 'translate_table' at net/ipv4/netfilter/arp_tables.c:702:7:
>    include/linux/compiler.h:484:38: error: call to '__compiletime_assert_530' declared with attribute error: Invalid IS_ERR_VALUE argument type
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>                                          ^
>    include/linux/compiler.h:467:4: note: in definition of macro '__compiletime_assert'
>        prefix ## suffix();    \
>        ^
>    include/linux/compiler.h:484:2: note: in expansion of macro '_compiletime_assert'
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>      ^
>    include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_assert'
>     #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                         ^
>    include/linux/err.h:24:5: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>         BUILD_BUG_ON_MSG((typeof(x))(-MAX_ERRNO) != (unsigned long)-MAX_ERRNO, "Invalid IS_ERR_VALUE argument type");\
>         ^
>>> net/ipv4/netfilter/arp_tables.c:530:6: note: in expansion of macro 'IS_ERR_VALUE'
>      if (IS_ERR_VALUE(e->counters.pcnt))
>          ^
> --
>    In file included from include/linux/linkage.h:4:0,
>                     from include/linux/kernel.h:6,
>                     from net/ipv6/netfilter/ip6_tables.c:15:
>    In function 'find_check_entry.isra.12',
>        inlined from 'translate_table' at net/ipv6/netfilter/ip6_tables.c:880:7:
>    include/linux/compiler.h:484:38: error: call to '__compiletime_assert_687' declared with attribute error: Invalid IS_ERR_VALUE argument type
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>                                          ^
>    include/linux/compiler.h:467:4: note: in definition of macro '__compiletime_assert'
>        prefix ## suffix();    \
>        ^
>    include/linux/compiler.h:484:2: note: in expansion of macro '_compiletime_assert'
>      _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
>      ^
>    include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_assert'
>     #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
>                                         ^
>    include/linux/err.h:24:5: note: in expansion of macro 'BUILD_BUG_ON_MSG'
>         BUILD_BUG_ON_MSG((typeof(x))(-MAX_ERRNO) != (unsigned long)-MAX_ERRNO, "Invalid IS_ERR_VALUE argument type");\
>         ^
>>> net/ipv6/netfilter/ip6_tables.c:687:6: note: in expansion of macro 'IS_ERR_VALUE'
>      if (IS_ERR_VALUE(e->counters.pcnt))
>          ^
>
> vim +/IS_ERR_VALUE +674 net/ipv4/netfilter/ip_tables.c
>
> 022748a9 Denys Vlasenko   2008-01-14  658  static int
> a83d8e8d Alexey Dobriyan  2010-01-18  659  find_check_entry(struct ipt_entry *e, struct net *net, const char *name,
> 0559518b Jan Engelhardt   2010-02-24  660  		 unsigned int size)
> ^1da177e Linus Torvalds   2005-04-16  661  {
> 87a2e70d Jan Engelhardt   2010-10-13  662  	struct xt_entry_target *t;
> 6709dbbb Jan Engelhardt   2007-02-07  663  	struct xt_target *target;
> ^1da177e Linus Torvalds   2005-04-16  664  	int ret;
> ^1da177e Linus Torvalds   2005-04-16  665  	unsigned int j;
> 9b4fce7a Jan Engelhardt   2008-10-08  666  	struct xt_mtchk_param mtpar;
> dcea992a Jan Engelhardt   2010-02-24  667  	struct xt_entry_match *ematch;
> ^1da177e Linus Torvalds   2005-04-16  668  
> a96be246 Dmitry Mishin    2006-12-12  669  	ret = check_entry(e, name);
> a96be246 Dmitry Mishin    2006-12-12  670  	if (ret)
> a96be246 Dmitry Mishin    2006-12-12  671  		return ret;
> 590bdf7f Dmitry Mishin    2006-10-30  672  
> 71ae0dff Florian Westphal 2015-06-11  673  	e->counters.pcnt = xt_percpu_counter_alloc();
> 71ae0dff Florian Westphal 2015-06-11 @674  	if (IS_ERR_VALUE(e->counters.pcnt))
> 71ae0dff Florian Westphal 2015-06-11  675  		return -ENOMEM;
> 71ae0dff Florian Westphal 2015-06-11  676  
> ^1da177e Linus Torvalds   2005-04-16  677  	j = 0;
> a83d8e8d Alexey Dobriyan  2010-01-18  678  	mtpar.net	= net;
> 9b4fce7a Jan Engelhardt   2008-10-08  679  	mtpar.table     = name;
> 9b4fce7a Jan Engelhardt   2008-10-08  680  	mtpar.entryinfo = &e->ip;
> 9b4fce7a Jan Engelhardt   2008-10-08  681  	mtpar.hook_mask = e->comefrom;
> 916a917d Jan Engelhardt   2008-10-08  682  	mtpar.family    = NFPROTO_IPV4;
>
> :::::: The code at line 674 was first introduced by commit
> :::::: 71ae0dff02d756e4d2ca710b79f2ff5390029a5f netfilter: xtables: use percpu rule counters
>
> :::::: TO: Florian Westphal <fw@strlen.de>
> :::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


  reply	other threads:[~2015-12-18 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 10:55 [PATCH] err.h: add type checking to IS_ERR_VALUE macro Andrzej Hajda
2015-12-18 11:08 ` kbuild test robot
2015-12-18 11:22 ` kbuild test robot
2015-12-18 14:02   ` Andrzej Hajda [this message]
2015-12-18 11:28 ` kbuild 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=56741203.8000404@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=m.szyprowski@samsung.com \
    --cc=viresh.kumar@linaro.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.