All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: entry: fix KCOV suppression
@ 2021-07-15 12:30 Mark Rutland
  2021-07-15 17:39 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Rutland @ 2021-07-15 12:30 UTC (permalink / raw)
  To: linux-arm-kernel, will
  Cc: Mark Rutland, Catalin Marinas, James Morse, Marc Zyngier

We suppress KCOV for entry.o rather than entry-common.o. As entry.o is
built from entry.S, this is pointless, and permits instrumentation of
entry-common.o, which is built from entry-common.c.

Fix the Makefile to suppress KCOV for entry-common.o, as we had intended
to begin with. I've verified with objdump that this is working as
expected.

Fixes: bf6fa2c0dda75186 ("arm64: entry: don't instrument entry code with KCOV")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/kernel/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile
index cce308586fcc..3f1490bfb938 100644
--- a/arch/arm64/kernel/Makefile
+++ b/arch/arm64/kernel/Makefile
@@ -17,7 +17,7 @@ CFLAGS_syscall.o	+= -fno-stack-protector
 # It's not safe to invoke KCOV when portions of the kernel environment aren't
 # available or are out-of-sync with HW state. Since `noinstr` doesn't always
 # inhibit KCOV instrumentation, disable it for the entire compilation unit.
-KCOV_INSTRUMENT_entry.o := n
+KCOV_INSTRUMENT_entry-common.o := n
 KCOV_INSTRUMENT_idle.o := n
 
 # Object file lists.
-- 
2.11.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] arm64: entry: fix KCOV suppression
  2021-07-15 12:30 [PATCH] arm64: entry: fix KCOV suppression Mark Rutland
@ 2021-07-15 17:39 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2021-07-15 17:39 UTC (permalink / raw)
  To: Mark Rutland, linux-arm-kernel
  Cc: catalin.marinas, kernel-team, Will Deacon, James Morse, Marc Zyngier

On Thu, 15 Jul 2021 13:30:49 +0100, Mark Rutland wrote:
> We suppress KCOV for entry.o rather than entry-common.o. As entry.o is
> built from entry.S, this is pointless, and permits instrumentation of
> entry-common.o, which is built from entry-common.c.
> 
> Fix the Makefile to suppress KCOV for entry-common.o, as we had intended
> to begin with. I've verified with objdump that this is working as
> expected.

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: entry: fix KCOV suppression
      https://git.kernel.org/arm64/c/e6f85cbeb23b

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-15 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 12:30 [PATCH] arm64: entry: fix KCOV suppression Mark Rutland
2021-07-15 17:39 ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.