linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] riscv: ftrace: Fixup ftrace detour code
@ 2022-09-21  3:49 guoren
  2022-09-21  3:49 ` [PATCH V2 1/3] riscv: ftrace: Fixup panic by disabling preemption guoren
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: guoren @ 2022-09-21  3:49 UTC (permalink / raw)
  To: arnd, palmer, rostedt, andy.chiu, greentime.hu, zong.li, jrtc27,
	mingo, palmer
  Cc: linux-arch, linux-kernel, linux-riscv, guoren, Guo Ren

From: Guo Ren <guoren@linux.alibaba.com>

The previous ftrace detour implementation fc76b8b8011 ("riscv: Using
PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") contain three problems. The
most horrible bug is preemption panic which found by Andy [1]. Let's
disable preemption for ftrace first, and Andy could continue the
ftrace preemption work.

[1]: https://lpc.events/event/16/contributions/1171/

V2:
 - Add Signed-off for preemption fixup.

V1:
https://lore.kernel.org/linux-riscv/20220916103817.9490-1-guoren@kernel.org/

Andy Chiu (1):
  riscv: ftrace: Fixup panic by disabling preemption

Guo Ren (2):
  riscv: ftrace: Remove wasted nops for !RISCV_ISA_C
  riscv: ftrace: Reduce the detour code size to half

 arch/riscv/Kconfig              |  2 +-
 arch/riscv/Makefile             |  6 ++-
 arch/riscv/include/asm/ftrace.h | 46 ++++++++++++++++++-----
 arch/riscv/kernel/ftrace.c      | 65 ++++++++++-----------------------
 arch/riscv/kernel/mcount-dyn.S  | 43 +++++++++-------------
 5 files changed, 78 insertions(+), 84 deletions(-)

-- 
2.36.1


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

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

end of thread, other threads:[~2022-11-22  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-21  3:49 [PATCH V2 0/3] riscv: ftrace: Fixup ftrace detour code guoren
2022-09-21  3:49 ` [PATCH V2 1/3] riscv: ftrace: Fixup panic by disabling preemption guoren
2022-09-21  3:49 ` [PATCH V2 2/3] riscv: ftrace: Remove wasted nops for !RISCV_ISA_C guoren
2022-09-21  3:49 ` [PATCH V2 3/3] riscv: ftrace: Reduce the detour code size to half guoren
2022-11-22  8:56   ` Song Shuai

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).