Thread (18 messages) 18 messages, 10 authors, 2021-06-24

Re: [PATCH v2 3/3] Kconfig: add ARCH_WANTS_NO_INSTR+CC_HAS_NO_PROFILE_FN_ATTR, depend on for GCOV and PGO

flat view

From: Heiko Carstens <hca@linux.ibm.com>
Date: 2021-06-22 09:34:02
Also in: linux-arm-kernel, linux-doc, linux-kbuild, linux-s390, lkml

On Mon, Jun 21, 2021 at 04:18:22PM -0700, Nick Desaulniers wrote:
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 PGO and GCOV depend on
it.

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.

Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Peter Oberparleiter <oberpar@linux.ibm.com>
Link: https://lore.kernel.org/lkml/YMTn9yjuemKFLbws@hirez.programming.kicks-ass.net/ (local)
Link: https://lore.kernel.org/lkml/YMcssV%2Fn5IBGv4f0@hirez.programming.kicks-ass.net/ (local)
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
Changes V1 -> V2:
* Add ARCH_WANTS_NO_INSTR
* Change depdendencies to be !ARCH_WANTS_NO_INSTR || CC_HAS_NO_PROFILE_FN_ATTR
  rather than list architectures explicitly, as per Nathan.
* s/no_profile/no_profile_instrument_function/

 arch/Kconfig        | 7 +++++++
 arch/arm64/Kconfig  | 1 +
 arch/s390/Kconfig   | 1 +
 arch/x86/Kconfig    | 1 +
 init/Kconfig        | 3 +++
 kernel/gcov/Kconfig | 1 +
 kernel/pgo/Kconfig  | 3 ++-
 7 files changed, 16 insertions(+), 1 deletion(-)
For s390:
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help