* [kees:for-next/kspp 19/19] lib/ubsan.c:27:13: warning: no previous prototype for 'report_ubsan_failure'
@ 2023-02-04 8:45 kernel test robot
2023-02-04 19:04 ` Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-02-04 8:45 UTC (permalink / raw)
To: Kees Cook; +Cc: oe-kbuild-all, Ard Biesheuvel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [kees:for-next/kspp 19/19] lib/ubsan.c:27:13: warning: no previous prototype for 'report_ubsan_failure'
2023-02-04 8:45 [kees:for-next/kspp 19/19] lib/ubsan.c:27:13: warning: no previous prototype for 'report_ubsan_failure' kernel test robot
@ 2023-02-04 19:04 ` Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2023-02-04 19:04 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, Ard Biesheuvel
On Sat, Feb 04, 2023 at 04:45:49PM +0800, kernel test robot wrote:
> 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)
> | ^~~~~~~~~~~~~~~~~~~~
Thanks! I'll get this fixed.
--
Kees Cook
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-04 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-04 8:45 [kees:for-next/kspp 19/19] lib/ubsan.c:27:13: warning: no previous prototype for 'report_ubsan_failure' kernel test robot
2023-02-04 19:04 ` Kees Cook
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.