linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Marco Elver <elver@google.com>
Cc: Kees Cook <keescook@chromium.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	linux-kernel@vger.kernel.org, ojeda@kernel.org,
	akpm@linux-foundation.org, joe@perches.com, johan@kernel.org,
	masahiroy@kernel.org, Nathan Chancellor <nathan@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	samitolvanen@google.com
Subject: Re: [PATCH] init: verify that function is initcall_t at compile-time
Date: Fri, 21 May 2021 10:59:51 -0700	[thread overview]
Message-ID: <162161998941.2029023.3745497110832316703.b4-ty@chromium.org> (raw)
In-Reply-To: <20210521072610.2880286-1-elver@google.com>

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


      parent reply	other threads:[~2021-05-21 18:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21  7:26 [PATCH] init: verify that function is initcall_t at compile-time Marco Elver
2021-05-21 16:36 ` Sami Tolvanen
2021-05-21 17:32 ` Paul E. McKenney
2021-05-21 17:59 ` Kees Cook [this message]

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=162161998941.2029023.3745497110832316703.b4-ty@chromium.org \
    --to=keescook@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=elver@google.com \
    --cc=joe@perches.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=samitolvanen@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).