Re: [PATCH] ubsan: add prototypes for internal functions

From: Kees Cook
Date: Tue May 30 2023 - 18:49:11 EST


On Wed, 17 May 2023 14:50:34 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Most of the functions in ubsan that are only called from generated
> code don't have a prototype, which W=1 builds warn about:
>
> lib/ubsan.c:226:6: error: no previous prototype for '__ubsan_handle_divrem_overflow' [-Werror=missing-prototypes]
> lib/ubsan.c:307:6: error: no previous prototype for '__ubsan_handle_type_mismatch' [-Werror=missing-prototypes]
> lib/ubsan.c:321:6: error: no previous prototype for '__ubsan_handle_type_mismatch_v1' [-Werror=missing-prototypes]
> lib/ubsan.c:335:6: error: no previous prototype for '__ubsan_handle_out_of_bounds' [-Werror=missing-prototypes]
> lib/ubsan.c:352:6: error: no previous prototype for '__ubsan_handle_shift_out_of_bounds' [-Werror=missing-prototypes]
> lib/ubsan.c:394:6: error: no previous prototype for '__ubsan_handle_builtin_unreachable' [-Werror=missing-prototypes]
> lib/ubsan.c:404:6: error: no previous prototype for '__ubsan_handle_load_invalid_value' [-Werror=missing-prototypes]
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] ubsan: add prototypes for internal functions
https://git.kernel.org/kees/c/d25ad53db59e

--
Kees Cook