From: kernel test robot <lkp@intel.com>
To: Kees Cook <keescook@chromium.org>
Cc: oe-kbuild-all@lists.linux.dev, Ard Biesheuvel <ardb@kernel.org>
Subject: [kees:for-next/kspp 19/19] lib/ubsan.c:27:13: warning: no previous prototype for 'report_ubsan_failure'
Date: Sat, 4 Feb 2023 16:45:49 +0800 [thread overview]
Message-ID: <202302041600.oGDByVG5-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/kspp
head: eeea3ad2aae00767549e2e5c50ad5f2dcfb353cd
commit: eeea3ad2aae00767549e2e5c50ad5f2dcfb353cd [19/19] arm64: Support Clang UBSAN trap codes for better reporting
config: s390-randconfig-r044-20230204 (https://download.01.org/0day-ci/archive/20230204/202302041600.oGDByVG5-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 12.1.0
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://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=eeea3ad2aae00767549e2e5c50ad5f2dcfb353cd
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees for-next/kspp
git checkout eeea3ad2aae00767549e2e5c50ad5f2dcfb353cd
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> lib/ubsan.c:27:13: warning: no previous prototype for 'report_ubsan_failure' [-Wmissing-prototypes]
27 | const char *report_ubsan_failure(struct pt_regs *regs, u32 check_type)
| ^~~~~~~~~~~~~~~~~~~~
vim +/report_ubsan_failure +27 lib/ubsan.c
20
21 #ifdef CONFIG_UBSAN_TRAP
22 /*
23 * Only include matches for UBSAN checks that are actually compiled in.
24 * The mappings of struct SanitizerKind (the -fsanitize=xxx args) to
25 * SanitizerHandler (the traps) in Clang is in clang/lib/CodeGen/.
26 */
> 27 const char *report_ubsan_failure(struct pt_regs *regs, u32 check_type)
28 {
29 switch (check_type) {
30 #ifdef CONFIG_UBSAN_BOUNDS
31 /*
32 * SanitizerKind::ArrayBounds and SanitizerKind::LocalBounds
33 * emit SanitizerHandler::OutOfBounds.
34 */
35 case ubsan_out_of_bounds:
36 return "UBSAN: array index out of bounds";
37 #endif
38 #ifdef CONFIG_UBSAN_SHIFT
39 /*
40 * SanitizerKind::ShiftBase and SanitizerKind::ShiftExponent
41 * emit SanitizerHandler::ShiftOutOfBounds.
42 */
43 case ubsan_shift_out_of_bounds:
44 return "UBSAN: shift out of bounds";
45 #endif
46 #ifdef CONFIG_UBSAN_DIV_ZERO
47 /*
48 * SanitizerKind::IntegerDivideByZero emits
49 * SanitizerHandler::DivremOverflow.
50 */
51 case ubsan_divrem_overflow:
52 return "UBSAN: divide/remainder overflow";
53 #endif
54 #ifdef CONFIG_UBSAN_UNREACHABLE
55 /*
56 * SanitizerKind::Unreachable emits
57 * SanitizerHandler::BuiltinUnreachable.
58 */
59 case ubsan_builtin_unreachable:
60 return "UBSAN: unreachable code";
61 #endif
62 #if defined(CONFIG_UBSAN_BOOL) || defined(CONFIG_UBSAN_ENUM)
63 /*
64 * SanitizerKind::Bool and SanitizerKind::Enum emit
65 * SanitizerHandler::LoadInvalidValue.
66 */
67 case ubsan_load_invalid_value:
68 return "UBSAN: loading invalid value";
69 #endif
70 #ifdef CONFIG_UBSAN_ALIGNMENT
71 /*
72 * SanitizerKind::Alignment emits SanitizerHandler::TypeMismatch
73 * or SanitizerHandler::AlignmentAssumption.
74 */
75 case ubsan_alignment_assumption:
76 return "UBSAN: alignment assumption";
77 case ubsan_type_mismatch:
78 return "UBSAN: type mismatch";
79 #endif
80 default:
81 return "UBSAN: unrecognized failure code";
82 }
83 }
84
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next reply other threads:[~2023-02-04 8:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-04 8:45 kernel test robot [this message]
2023-02-04 19:04 ` [kees:for-next/kspp 19/19] lib/ubsan.c:27:13: warning: no previous prototype for 'report_ubsan_failure' Kees Cook
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=202302041600.oGDByVG5-lkp@intel.com \
--to=lkp@intel.com \
--cc=ardb@kernel.org \
--cc=keescook@chromium.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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.