From: kbuild test robot <fengguang.wu@intel.com>
To: Daniel Micay <danielmicay@gmail.com>
Cc: kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [mmotm:master 216/292] include/linux/string.h:199:24: error: redefinition of 'strcpy'
Date: Sat, 3 Jun 2017 10:49:56 +0800 [thread overview]
Message-ID: <201706031054.IlWFlOqY%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4751 bytes --]
tree: git://git.cmpxchg.org/linux-mmotm.git master
head: 5c84fce56580d5297cd473b57f893e362b332109
commit: abb4387dc4c5898e87a93f152d3ad4b991397f22 [216/292] include/linux/string.h: add the option of fortified string.h functions
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout abb4387dc4c5898e87a93f152d3ad4b991397f22
# save the attached .config to linux build tree
make.cross ARCH=xtensa
All errors (new ones prefixed by >>):
In file included from include/linux/bitmap.h:8:0,
from include/linux/cpumask.h:11,
from include/linux/rcupdate.h:40,
from include/linux/rculist.h:10,
from include/linux/pid.h:4,
from include/linux/sched.h:13,
from include/linux/ptrace.h:5,
from arch/xtensa/kernel/asm-offsets.c:21:
>> include/linux/string.h:199:24: error: redefinition of 'strcpy'
__FORTIFY_INLINE char *strcpy(char *p, const char *q)
^
In file included from include/linux/string.h:18:0,
from include/linux/bitmap.h:8,
from include/linux/cpumask.h:11,
from include/linux/rcupdate.h:40,
from include/linux/rculist.h:10,
from include/linux/pid.h:4,
from include/linux/sched.h:13,
from include/linux/ptrace.h:5,
from arch/xtensa/kernel/asm-offsets.c:21:
arch/xtensa/include/asm/string.h:19:21: note: previous definition of 'strcpy' was here
static inline char *strcpy(char *__dest, const char *__src)
^
In file included from include/linux/bitmap.h:8:0,
from include/linux/cpumask.h:11,
from include/linux/rcupdate.h:40,
from include/linux/rculist.h:10,
from include/linux/pid.h:4,
from include/linux/sched.h:13,
from include/linux/ptrace.h:5,
from arch/xtensa/kernel/asm-offsets.c:21:
>> include/linux/string.h:210:24: error: redefinition of 'strncpy'
__FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
^
In file included from include/linux/string.h:18:0,
from include/linux/bitmap.h:8,
from include/linux/cpumask.h:11,
from include/linux/rcupdate.h:40,
from include/linux/rculist.h:10,
from include/linux/pid.h:4,
from include/linux/sched.h:13,
from include/linux/ptrace.h:5,
from arch/xtensa/kernel/asm-offsets.c:21:
arch/xtensa/include/asm/string.h:38:21: note: previous definition of 'strncpy' was here
static inline char *strncpy(char *__dest, const char *__src, size_t __n)
^
make[2]: *** [arch/xtensa/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 +/strcpy +199 include/linux/string.h
193 void fortify_panic(const char *name) __noreturn __cold;
194 void __read_overflow(void) __compiletime_error("detected read beyond size of object passed as 1st parameter");
195 void __read_overflow2(void) __compiletime_error("detected read beyond size of object passed as 2nd parameter");
196 void __write_overflow(void) __compiletime_error("detected write beyond size of object passed as 1st parameter");
197
198 #if !defined(__NO_FORTIFY) && defined(__OPTIMIZE__) && defined(CONFIG_FORTIFY_SOURCE)
> 199 __FORTIFY_INLINE char *strcpy(char *p, const char *q)
200 {
201 size_t p_size = __builtin_object_size(p, 0);
202 size_t q_size = __builtin_object_size(q, 0);
203 if (p_size == (size_t)-1 && q_size == (size_t)-1)
204 return __builtin_strcpy(p, q);
205 if (strscpy(p, q, p_size < q_size ? p_size : q_size) < 0)
206 fortify_panic(__func__);
207 return p;
208 }
209
> 210 __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
211 {
212 size_t p_size = __builtin_object_size(p, 0);
213 if (__builtin_constant_p(size) && p_size < size)
---
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: 50173 bytes --]
reply other threads:[~2017-06-03 2:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201706031054.IlWFlOqY%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=danielmicay@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.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