[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <162161998941.2029023.3745497110832316703.b4-ty@chromium.org>
Date: Fri, 21 May 2021 10:59:51 -0700
From: Kees Cook <keescook@...omium.org>
To: Marco Elver <elver@...gle.com>
Cc: Kees Cook <keescook@...omium.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
linux-kernel@...r.kernel.org, ojeda@...nel.org,
akpm@...ux-foundation.org, joe@...ches.com, johan@...nel.org,
masahiroy@...nel.org, Nathan Chancellor <nathan@...nel.org>,
Arnd Bergmann <arnd@...db.de>, samitolvanen@...gle.com
Subject: Re: [PATCH] init: verify that function is initcall_t at compile-time
On Fri, 21 May 2021 09:26:10 +0200, Marco Elver wrote:
> In the spirit of making it hard to misuse an interface, add a
> compile-time assertion in the CONFIG_HAVE_ARCH_PREL32_RELOCATIONS case
> to verify the initcall function matches initcall_t, because the inline
> asm bypasses any type-checking the compiler would otherwise do. This
> will help developers catch incorrect API use in all configurations.
>
> A recent example of this is:
> https://lkml.kernel.org/r/20210514140015.2944744-1-arnd@kernel.org
Since this touches on CFI, I've taken this patch.
Applied to for-next/clang/features, thanks!
[1/1] init: verify that function is initcall_t at compile-time
https://git.kernel.org/kees/c/72a12a91a634
--
Kees Cook
Powered by blists - more mailing lists