mbox series

[0/3] powerpc/module_64: Fix _mcount() stub

Message ID cover.1587488954.git.naveen.n.rao@linux.vnet.ibm.com (mailing list archive)
Headers show
Series powerpc/module_64: Fix _mcount() stub | expand

Message

Naveen N. Rao April 21, 2020, 5:35 p.m. UTC
This series addresses the crash reported by Qian Cai on ppc64le with 
-mprofile-kernel here:
https://lore.kernel.org/r/15AC5B0E-A221-4B8C-9039-FA96B8EF7C88@lca.pw

While fixing patch_instruction() should address the crash, we should 
still change the default stub we setup for _mcount() for cases where a 
kernel is built without ftrace.

- Naveen


Naveen N. Rao (3):
  powerpc/module_64: Consolidate ftrace code
  powerpc/module_64: Simplify check for -mprofile-kernel ftrace
    relocations
  powerpc/module_64: Use special stub for _mcount() with
    -mprofile-kernel

 arch/powerpc/include/asm/module.h |   3 -
 arch/powerpc/kernel/module_64.c   | 281 ++++++++++++++----------------
 2 files changed, 127 insertions(+), 157 deletions(-)


base-commit: a9aa21d05c33c556e48c5062b6632a9b94906570

Comments

Naveen N. Rao April 22, 2020, 7:47 a.m. UTC | #1
Naveen N. Rao wrote:
> This series addresses the crash reported by Qian Cai on ppc64le with 
> -mprofile-kernel here:
> https://lore.kernel.org/r/15AC5B0E-A221-4B8C-9039-FA96B8EF7C88@lca.pw
> 
> While fixing patch_instruction() should address the crash, we should 
> still change the default stub we setup for _mcount() for cases where a 
> kernel is built without ftrace.

I notice that I didn't write that properly yesterday. I meant that this 
is required for cases where ftrace gets disabled for any reason, 
resulting in the default calls to _mcount() remaining in the kernel 
modules.

- Naveen
Michael Ellerman June 9, 2020, 5:29 a.m. UTC | #2
On Tue, 21 Apr 2020 23:05:42 +0530, Naveen N. Rao wrote:
> This series addresses the crash reported by Qian Cai on ppc64le with
> -mprofile-kernel here:
> https://lore.kernel.org/r/15AC5B0E-A221-4B8C-9039-FA96B8EF7C88@lca.pw
> 
> While fixing patch_instruction() should address the crash, we should
> still change the default stub we setup for _mcount() for cases where a
> kernel is built without ftrace.
> 
> [...]

Applied to powerpc/next.

[1/3] powerpc/module_64: Consolidate ftrace code
      https://git.kernel.org/powerpc/c/03b51416e876aea5e7638947e50831b6c988c246
[2/3] powerpc/module_64: Simplify check for -mprofile-kernel ftrace relocations
      https://git.kernel.org/powerpc/c/1f2aaed2db03150428dbcd2ddee02ae6cb4bac52
[3/3] powerpc/module_64: Use special stub for _mcount() with -mprofile-kernel
      https://git.kernel.org/powerpc/c/bd55e792de0844631d34487d43eaf3f13294ebfe

cheers