Re: [PATCH v8 0/8] ftrace with regs + live patching for ppc64 LE (ABI v2)

From: Balbir Singh
Date: Thu Feb 11 2016 - 01:18:47 EST


On Wed, 2016-02-10 at 18:29 +0100, Torsten Duwe wrote:
> Changes since V7:
> Â * drop "notrace" attribute for MMU-aiding functions
> ÂÂÂÂand their callees.
> Â * merge "-mprofile-kernel"-stripping patches into one.
>
> Changes since v6:
> Â * include Petr's patch, on popular demand ;)
> Â * move #ifdefs out of functions for readability;
> ÂÂÂÂintroduce static helper functions instead.
> Â * No more literal binary instructions in hex,
> ÂÂÂÂat least not added by this patch set.
> Â * add compile time checker to detect the presence
> ÂÂÂÂof known-good -mprofile-kernel support.
> Â * limit Kconfig / compile to the configurations really supported:
> ÂÂÂÂ+ (static) FTRACE with -pg
> ÂÂÂÂ+ÂÂDYNAMIC_FTRACE with -pg with or without -mprofile-kernel
> ÂÂÂÂÂÂÂ(depending on the compiler)
> ÂÂÂÂ+ÂÂDYNAMIC_FTRACE_WITH_REGS only with -mprofile-kernel
> ÂÂÂÂÂÂÂ(will error out if the compiler is broken)
>
> Changes since v5:
> Â * extra "std r0,LRSAVE(r1)" for gcc-6
> ÂÂÂÂThis makes the code compiler-agnostic.
> Â * Follow Petr Mladek's suggestion to avoid
> ÂÂÂÂredefinition of HAVE_LIVEPATCH
>
> Changes since v4:
> Â * change comment style in entry_64.S to C89
> ÂÂÂÂ(nobody is using assembler syntax comments there).
> Â * the bool function restore_r2 shouldn't return 2,
> ÂÂÂÂthat's a little confusing.
> Â * Test whether the compiler supports -mprofile-kernel
> ÂÂÂÂand only then define CC_USING_MPROFILE_KERNEL
> Â * also make the return value of klp_check_compiler_support
> ÂÂÂÂdepend on that.
>
> Major changes since v3:
> Â * the graph tracer works now.
> ÂÂÂÂIt turned out the stack frame it tried to manipulate does not
> ÂÂÂÂexist at that point.
> Â * changes only needed in order to support -mprofile-kernel are now
> ÂÂÂÂin a separate patch, prepended.
> Â * Kconfig cleanup so this is only selectable on ppc64le.
>
> Petr Mladek (1):
> Â livepatch: Detect offset for the ftrace location during build
>
> Torsten Duwe (7):
> Â ppc64 (le): prepare for -mprofile-kernel
> Â ppc64le FTRACE_WITH_REGS implementation
> Â ppc use ftrace_modify_all_code default
> Â ppc64 ftrace_with_regs configuration variables
> Â ppc64 ftrace_with_regs: disable profiling for some files
> Â Implement kernel live patching for ppc64le (ABIv2)
> Â Enable LIVEPATCH to be configured on ppc64le and add livepatch.o if it
> ÂÂÂÂis selected
>
> Âarch/powerpc/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ6 +
> Âarch/powerpc/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ17 +++
> Âarch/powerpc/gcc-mprofile-kernel-notrace.sh |ÂÂ33 ++++++
> Âarch/powerpc/include/asm/code-patching.hÂÂÂÂ|ÂÂ24 ++++
> Âarch/powerpc/include/asm/ftrace.hÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ5 +
> Âarch/powerpc/include/asm/livepatch.hÂÂÂÂÂÂÂÂ|ÂÂ45 ++++++++
> Âarch/powerpc/kernel/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ13 ++-
> Âarch/powerpc/kernel/entry_64.SÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 169
> +++++++++++++++++++++++++++-
> Âarch/powerpc/kernel/ftrace.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ| 129 ++++++++++++++++-----
> Âarch/powerpc/kernel/livepatch.cÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ38 +++++++
> Âarch/powerpc/kernel/module_64.cÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ56 ++++++++-
> Âarch/powerpc/lib/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ4 +-
> Âarch/s390/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ1 +
> Âkernel/livepatch/MakefileÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ13 +++
> Âkernel/livepatch/core.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ12 +-
> Âkernel/livepatch/ftrace-test.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ6 +
> Âkernel/trace/KconfigÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ5 +
> Âscripts/recordmcount.cÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂÂ6 +-
> Âscripts/recordmcount.hÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ|ÂÂ17 ++-
> Â19 files changed, 552 insertions(+), 47 deletions(-)
> Âcreate mode 100755 arch/powerpc/gcc-mprofile-kernel-notrace.sh
> Âcreate mode 100644 arch/powerpc/include/asm/livepatch.h
> Âcreate mode 100644 arch/powerpc/kernel/livepatch.c
> Âcreate mode 100644 kernel/livepatch/ftrace-test.c
>

Quick question - I presume these apply on top of 4.5.0-rc2?

Balbir Singh.