From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v5] kallsyms: strip LTO suffixes from static functions
Date: Sat, 02 Oct 2021 05:47:26 +0800 [thread overview]
Message-ID: <202110020501.RKX4zca7-lkp@intel.com> (raw)
In-Reply-To: <20211001195823.581937-1-ndesaulniers@google.com>
[-- Attachment #1: Type: text/plain, Size: 3062 bytes --]
Hi Nick,
I love your patch! Yet something to improve:
[auto build test ERROR on 4de593fb965fc2bd11a0b767e0c65ff43540a6e4]
url: https://github.com/0day-ci/linux/commits/Nick-Desaulniers/kallsyms-strip-LTO-suffixes-from-static-functions/20211002-035956
base: 4de593fb965fc2bd11a0b767e0c65ff43540a6e4
config: i386-randconfig-m021-20211002 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/b73f738c48b304c633f9ff079fd8de572ffc6eb0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nick-Desaulniers/kallsyms-strip-LTO-suffixes-from-static-functions/20211002-035956
git checkout b73f738c48b304c633f9ff079fd8de572ffc6eb0
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
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 >>):
kernel/kallsyms.c: In function 'cleanup_symbol_name':
>> kernel/kallsyms.c:190:6: error: '__clang_major__' undeclared (first use in this function)
190 | __clang_major__ >= 13)
| ^~~~~~~~~~~~~~~
kernel/kallsyms.c:190:6: note: each undeclared identifier is reported only once for each function it appears in
kernel/kallsyms.c: At top level:
kernel/kallsyms.c:585:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes]
585 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
| ^~~~~~~~~~~~~~~~
vim +/__clang_major__ +190 kernel/kallsyms.c
166
167 static bool cleanup_symbol_name(char *s)
168 {
169 char *res;
170
171 if (!IS_ENABLED(CONFIG_LTO_CLANG))
172 return false;
173
174 /*
175 * LLVM appends various suffixes for local functions and variables that must
176 * be promoted to global scope as part of LTO. This can break hooking of
177 * static functions with kprobes. '.' is not a valid character in an
178 * identifier in C. Suffixes observed:
179 * - foo.llvm.[0-9a-f]+
180 * - foo.[0-9a-f]+
181 * - foo.[0-9a-f]+.cfi_jt
182 */
183 res = strchr(s, '.');
184 if (res) {
185 *res = '\0';
186 return true;
187 }
188
189 if (!IS_ENABLED(CONFIG_CFI_CLANG) || !IS_ENABLED(CONFIG_LTO_CLANG_THIN) ||
> 190 __clang_major__ >= 13)
191 return false;
192
193 /*
194 * Prior to LLVM 13, the following suffixes were observed when thinLTO
195 * and CFI are both enabled:
196 * - foo$[0-9]+
197 */
198 res = strrchr(s, '$');
199 if (res) {
200 *res = '\0';
201 return true;
202 }
203
204 return false;
205 }
206
---
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: 33323 bytes --]
next prev parent reply other threads:[~2021-10-01 21:47 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 18:38 [PATCH] kallsyms: strip LTO suffixes from static functions Nick Desaulniers
2021-06-22 20:18 ` Fangrui Song
2021-06-28 17:54 ` Nick Desaulniers
2021-06-28 18:20 ` Nick Desaulniers
2021-06-28 19:05 ` [PATCH v2] " Nick Desaulniers
2021-06-28 19:45 ` Nathan Chancellor
2021-06-28 20:31 ` [PATCH v3] " Nick Desaulniers
2021-06-28 21:19 ` Nathan Chancellor
2021-06-28 22:01 ` Nick Desaulniers
2021-06-28 22:16 ` Nathan Chancellor
2021-07-07 18:18 ` [PATCH v4] " Nick Desaulniers
2021-07-07 18:34 ` Nathan Chancellor
2021-07-07 18:59 ` Fāng-ruì Sòng
2021-08-06 16:20 ` Sami Tolvanen
2021-10-01 19:58 ` [PATCH v5] " Nick Desaulniers
2021-10-01 20:05 ` Sami Tolvanen
2021-10-04 10:46 ` Padmanabha Srinivasaiah
2021-10-01 21:47 ` kernel test robot [this message]
2021-10-04 16:29 ` [PATCH v6] " Nick Desaulniers
2021-10-04 18:00 ` Kees Cook
2021-10-04 18:32 ` Nick Desaulniers
2021-10-04 18:38 ` Konstantin Ryabitsev
2021-10-04 18:41 ` Nick Desaulniers
2021-10-04 18:47 ` Konstantin Ryabitsev
2021-10-04 18:52 ` Nick Desaulniers
2021-10-04 19:45 ` Konstantin Ryabitsev
2021-10-04 20:37 ` Konstantin Ryabitsev
2021-10-04 23:22 ` Nick Desaulniers
2021-10-05 13:02 ` Konstantin Ryabitsev
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=202110020501.RKX4zca7-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@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.