From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH 1/3] [v3] Kbuild: move to -std=gnu11
Date: Thu, 10 Mar 2022 09:27:52 +0800 [thread overview]
Message-ID: <202203100924.EykibAkU-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 21587 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220301145233.3689119-1-arnd@kernel.org>
References: <20220301145233.3689119-1-arnd@kernel.org>
TO: Arnd Bergmann <arnd@kernel.org>
Hi Arnd,
I love your patch! Perhaps something to improve:
[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on masahiroy-kbuild/for-next drm-intel/for-linux-next staging/staging-testing kdave/for-next soc/for-next linus/master v5.17-rc7 next-20220308]
[cannot apply to srcres258-doc/doc-zh-tw]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/Kbuild-move-to-std-gnu11/20220301-225348
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
:::::: branch date: 8 days ago
:::::: commit date: 8 days ago
config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220310/202203100924.EykibAkU-lkp(a)intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
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
# https://github.com/0day-ci/linux/commit/afebabb39f6a871f6e6d69f601738fbce1c1b37c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arnd-Bergmann/Kbuild-move-to-std-gnu11/20220301-225348
git checkout afebabb39f6a871f6e6d69f601738fbce1c1b37c
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^
include/linux/list.h:75:2: note: Left side of '||' is false
WRITE_ONCE(prev->next, new);
^
include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:313:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/list.h:75:2: note: Left side of '||' is false
WRITE_ONCE(prev->next, new);
^
include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:313:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/list.h:75:2: note: Left side of '||' is false
WRITE_ONCE(prev->next, new);
^
include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:21: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:313:3: note: expanded from macro '__native_word'
(sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
^
include/linux/list.h:75:2: note: Left side of '||' is true
WRITE_ONCE(prev->next, new);
^
include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:38: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/list.h:75:2: note: Taking false branch
WRITE_ONCE(prev->next, new);
^
include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:326:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/list.h:75:2: note: Loop condition is false. Exiting loop
WRITE_ONCE(prev->next, new);
^
include/asm-generic/rwonce.h:60:2: note: expanded from macro 'WRITE_ONCE'
compiletime_assert_rwonce_type(x); \
^
include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type'
compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
^
include/linux/compiler_types.h:346:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:334:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:318:2: note: expanded from macro '__compiletime_assert'
do { \
^
include/linux/list.h:75:2: note: Dereference of null pointer
WRITE_ONCE(prev->next, new);
^
include/asm-generic/rwonce.h:61:2: note: expanded from macro 'WRITE_ONCE'
__WRITE_ONCE(x, val); \
^~~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:55:30: note: expanded from macro '__WRITE_ONCE'
*(volatile typeof(x) *)&(x) = (val); \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Suppressed 20 warnings (20 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
31 warnings generated.
arch/x86/kernel/unwind_orc.c:38:7: warning: Value stored to 'mid' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
int *mid = first, *found = first;
^~~ ~~~~~
arch/x86/kernel/unwind_orc.c:38:7: note: Value stored to 'mid' during its initialization is never read
int *mid = first, *found = first;
^~~ ~~~~~
>> arch/x86/kernel/unwind_orc.c:640:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(state, 0, sizeof(*state));
^~~~~~
arch/x86/kernel/unwind_orc.c:640:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(state, 0, sizeof(*state));
^~~~~~
Suppressed 29 warnings (29 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
29 warnings generated.
Suppressed 29 warnings (29 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
9 warnings generated.
Suppressed 9 warnings (9 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
Suppressed 6 warnings (6 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
38 warnings generated.
Suppressed 38 warnings (38 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
53 warnings generated.
arch/x86/events/core.c:812:2: warning: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memset(sched, 0, sizeof(*sched));
^~~~~~
arch/x86/events/core.c:812:2: note: Call to function 'memset' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memset_s' in case of C11
memset(sched, 0, sizeof(*sched));
^~~~~~
arch/x86/events/core.c:1482:2: warning: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
memcpy(cpuc->assign, assign, n*sizeof(int));
^~~~~~
arch/x86/events/core.c:1482:2: note: Call to function 'memcpy' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memcpy_s' in case of C11
memcpy(cpuc->assign, assign, n*sizeof(int));
^~~~~~
arch/x86/events/core.c:1840:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(page, "%s", pmu_attr->event_str);
^~~~~~~
arch/x86/events/core.c:1840:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(page, "%s", pmu_attr->event_str);
^~~~~~~
arch/x86/events/core.c:1863:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(page, "%s",
^~~~~~~
arch/x86/events/core.c:1863:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(page, "%s",
^~~~~~~
arch/x86/events/core.c:1880:10: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(page, "%s", pmu_attr->event_str);
^~~~~~~
arch/x86/events/core.c:1880:10: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(page, "%s", pmu_attr->event_str);
^~~~~~~
arch/x86/events/core.c:1900:12: warning: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return snprintf(page, next_str - str + 1, "%s", str);
^~~~~~~~
arch/x86/events/core.c:1900:12: note: Call to function 'snprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'snprintf_s' in case of C11
return snprintf(page, next_str - str + 1, "%s", str);
^~~~~~~~
arch/x86/events/core.c:1902:12: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
return sprintf(page, "%s", str);
^~~~~~~
arch/x86/events/core.c:1902:12: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
return sprintf(page, "%s", str);
^~~~~~~
arch/x86/events/core.c:1976:8: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret = sprintf(page, "event=0x%02llx", event);
^~~~~~~
arch/x86/events/core.c:1976:8: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret = sprintf(page, "event=0x%02llx", event);
^~~~~~~
arch/x86/events/core.c:1979:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret += sprintf(page + ret, ",umask=0x%02llx", umask);
^~~~~~~
arch/x86/events/core.c:1979:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret += sprintf(page + ret, ",umask=0x%02llx", umask);
^~~~~~~
arch/x86/events/core.c:1982:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret += sprintf(page + ret, ",edge");
^~~~~~~
arch/x86/events/core.c:1982:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret += sprintf(page + ret, ",edge");
^~~~~~~
arch/x86/events/core.c:1985:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret += sprintf(page + ret, ",pc");
^~~~~~~
arch/x86/events/core.c:1985:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret += sprintf(page + ret, ",pc");
^~~~~~~
arch/x86/events/core.c:1988:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret += sprintf(page + ret, ",any");
^~~~~~~
arch/x86/events/core.c:1988:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret += sprintf(page + ret, ",any");
^~~~~~~
arch/x86/events/core.c:1991:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret += sprintf(page + ret, ",inv");
^~~~~~~
arch/x86/events/core.c:1991:10: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
ret += sprintf(page + ret, ",inv");
^~~~~~~
arch/x86/events/core.c:1994:10: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
ret += sprintf(page + ret, ",cmask=0x%02llx", cmask);
vim +640 arch/x86/kernel/unwind_orc.c
ee9f8fce996408 Josh Poimboeuf 2017-07-24 636
ee9f8fce996408 Josh Poimboeuf 2017-07-24 637 void __unwind_start(struct unwind_state *state, struct task_struct *task,
ee9f8fce996408 Josh Poimboeuf 2017-07-24 638 struct pt_regs *regs, unsigned long *first_frame)
ee9f8fce996408 Josh Poimboeuf 2017-07-24 639 {
ee9f8fce996408 Josh Poimboeuf 2017-07-24 @640 memset(state, 0, sizeof(*state));
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2022-03-10 1:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 1:27 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-03-14 12:00 [PATCH 1/3] [v3] Kbuild: move to -std=gnu11 kernel test robot
2022-03-12 19:44 kernel test robot
2022-03-10 10:17 kernel test robot
2022-03-04 8:24 kernel test robot
2022-03-04 2:47 kernel test robot
2022-03-01 14:52 Arnd Bergmann
2022-03-01 16:53 ` Nathan Chancellor
2022-03-04 5:03 ` Masahiro Yamada
2022-03-04 11:24 ` Sedat Dilek
2022-03-06 10:01 ` Sedat Dilek
2022-03-04 11:37 ` Sedat Dilek
2022-03-04 16:25 ` Sedat Dilek
2022-03-06 15:31 ` Sedat Dilek
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=202203100924.EykibAkU-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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.