linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Axtens <dja@axtens.net>
To: keescook@chromium.org
Cc: catalin.marinas@arm.com, clang-built-linux@googlegroups.com,
	hca@linux.ibm.com, jarmo.tiitto@gmail.com,
	linux-kernel@vger.kernel.org, lukas.bulwahn@gmail.com,
	mark.rutland@arm.com, masahiroy@kernel.org, maskray@google.com,
	morbo@google.com, nathan@kernel.org, ndesaulniers@google.com,
	oberpar@linux.ibm.com, ojeda@kernel.org, peterz@infradead.org,
	samitolvanen@google.com, torvalds@linux-foundation.org,
	wcw@google.com, will@kernel.org
Subject: Re: ARCH_WANTS_NO_INSTR (Re: [GIT PULL] Clang feature updates for v5.14-rc1)
Date: Wed, 06 Oct 2021 00:45:45 +1100	[thread overview]
Message-ID: <874k9v60vq.fsf@dja-thinkpad.axtens.net> (raw)
In-Reply-To: <20211005131015.3153458-1-dja@axtens.net>

>     Kconfig: Introduce ARCH_WANTS_NO_INSTR and CC_HAS_NO_PROFILE_FN_ATTR
>     
>     We don't want compiler instrumentation to touch noinstr functions,
>     which are annotated with the no_profile_instrument_function function
>     attribute. Add a Kconfig test for this and make GCOV depend on it, and
>     in the future, PGO.
>     
>     If an architecture is using noinstr, it should denote that via this
>     Kconfig value. That makes Kconfigs that depend on noinstr able to express
>     dependencies in an architecturally agnostic way.
>
> However, things in generic code (such as rcu_nmi_enter) are tagged with
> `noinstr`, so I'm worried that this commit subtly breaks things like KASAN on
> platforms that haven't opted in yet. (I stumbled across this while developing
> KASAN on ppc64, but at least riscv and ppc32 have KASAN but not
> ARCH_WANTS_NO_INSTR already.)

Hmm, so it looks like the commit doesn't affect how noinstr is compiled
(which means I have another different issue to contend with!), but...

> As I said, I haven't been able to find the original thread - is there any reason
> this shouldn't be always on? Why would an arch not opt in? What's the motivation
> for ignoring the noinstr markings?
>
> Should generic KASAN/KCSAN/anything else marked in noinstr also have markings
> requring ARCH_WANTS_NO_INSTR? AFAICT they should, right?

I'm still curious about all of these questions. I get
CC_HAS_NO_PROFILE_FN_ATTR, but I don't get ARCH_WANTS_NO_INSTR.

Kind regards,
Daniel

>
> Kind regards,
> Daniel

  reply	other threads:[~2021-10-05 13:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 19:32 [GIT PULL] Clang feature updates for v5.14-rc1 Kees Cook
2021-06-29  2:49 ` Linus Torvalds
2021-06-29 20:44   ` Kees Cook
2021-06-29 21:03     ` Linus Torvalds
2021-06-29 21:27       ` Nick Desaulniers
2021-06-29 21:57         ` Linus Torvalds
2021-07-07  8:10         ` Ingo Molnar
2021-07-02 12:46       ` Bill Wendling
2021-07-02 12:56         ` Peter Zijlstra
2021-07-02 17:26           ` Nick Desaulniers
2021-07-02 18:57             ` Peter Zijlstra
2021-07-02 19:53               ` Nick Desaulniers
2022-10-31 23:55           ` Bill Wendling
2021-06-29 13:14 ` Mark Rutland
2021-06-29 20:11   ` Kees Cook
2021-06-29 21:05   ` Nick Desaulniers
2021-10-05 13:10 ` ARCH_WANTS_NO_INSTR (Re: [GIT PULL] Clang feature updates for v5.14-rc1) Daniel Axtens
2021-10-05 13:45   ` Daniel Axtens [this message]
2021-10-05 14:30   ` Mark Rutland
2021-10-07  6:19     ` Jarmo Tiitto

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=874k9v60vq.fsf@dja-thinkpad.axtens.net \
    --to=dja@axtens.net \
    --cc=catalin.marinas@arm.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hca@linux.ibm.com \
    --cc=jarmo.tiitto@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=maskray@google.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=oberpar@linux.ibm.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=samitolvanen@google.com \
    --cc=torvalds@linux-foundation.org \
    --cc=wcw@google.com \
    --cc=will@kernel.org \
    /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).