From: kbuild test robot <lkp@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: kbuild-all@01.org, Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>,
Daniel Micay <danielmicay@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Dan Williams <dan.j.williams@intel.com>,
David Howells <dhowells@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] string.h: work around __builtin_constant_p quirk
Date: Wed, 9 Aug 2017 14:09:10 +0800 [thread overview]
Message-ID: <201708091458.ckKf1Eli%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170807111615.4187078-1-arnd@arndb.de>
[-- Attachment #1: Type: text/plain, Size: 6220 bytes --]
Hi Arnd,
[auto build test ERROR on next-20170808]
[also build test ERROR on v4.13-rc4]
[cannot apply to linus/master kees/for-next/pstore arm-soc/for-next v4.13-rc4 v4.13-rc3 v4.13-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/string-h-work-around-__builtin_constant_p-quirk/20170809-073927
config: i386-randconfig-i1-08071909 (attached as .config)
compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
In file included from arch/x86/include/asm/page_32.h:34:0,
from arch/x86/include/asm/page.h:13,
from arch/x86/include/asm/thread_info.h:11,
from include/linux/thread_info.h:37,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:80,
from include/linux/spinlock.h:50,
from include/linux/mmzone.h:7,
from include/linux/gfp.h:5,
from include/linux/slab.h:14,
from include/linux/crypto.h:24,
from arch/x86/kernel/asm-offsets.c:8:
include/linux/string.h: In function 'strncpy':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
>> include/linux/string.h:217:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'strlcpy':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:269:21: note: in expansion of macro '__constant_argument'
size_t constlen = __constant_argument(len);
^
include/linux/string.h: In function 'memset':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:300:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'memcpy':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:312:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'memmove':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:326:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'memscan':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:340:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'memcmp':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:352:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'memchr':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:365:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'memchr_inv':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:377:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
include/linux/string.h: In function 'kmemdup':
>> include/linux/string.h:212:2: error: first argument to '__builtin_choose_expr' not a constant
__builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
^
include/linux/string.h:389:21: note: in expansion of macro '__constant_argument'
size_t constsize = __constant_argument(size);
^
make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2
vim +/__builtin_choose_expr +212 include/linux/string.h
206
207 /*
208 * a more reliable check for constant arguments, see
209 * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785
210 */
211 #define __constant_argument(arg) \
> 212 __builtin_choose_expr(__builtin_constant_p(arg), (arg), 0)
213
214 __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
215 {
216 size_t p_size = __builtin_object_size(p, 0);
> 217 size_t constsize = __constant_argument(size);
218 if (p_size < constsize)
219 __write_overflow();
220 if (p_size < size)
221 fortify_overflow(__func__);
222 return __builtin_strncpy(p, q, size);
223 }
224
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29945 bytes --]
prev parent reply other threads:[~2017-08-09 6:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 11:15 Arnd Bergmann
2017-08-07 22:29 ` Arnd Bergmann
2017-08-15 19:07 ` Kees Cook
2017-08-09 6:09 ` kbuild test robot [this message]
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=201708091458.ckKf1Eli%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=danielmicay@gmail.com \
--cc=dhowells@redhat.com \
--cc=kbuild-all@01.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®