Message ID | 20200903203053.3411268-23-samitolvanen@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add support for Clang LTO | expand |
On Thu, Sep 03, 2020 at 01:30:47PM -0700, Sami Tolvanen wrote: > Since arm64 does not use -pg in CC_FLAGS_FTRACE with > DYNAMIC_FTRACE_WITH_REGS, skip running recordmcount by > exporting CC_USING_PATCHABLE_FUNCTION_ENTRY. > > Signed-off-by: Sami Tolvanen <samitolvanen@google.com> How stand-alone is this? Does it depend on the earlier mcount fixes? Reviewed-by: Kees Cook <keescook@chromium.org>
On Thu, Sep 03, 2020 at 03:44:18PM -0700, Kees Cook wrote: > On Thu, Sep 03, 2020 at 01:30:47PM -0700, Sami Tolvanen wrote: > > Since arm64 does not use -pg in CC_FLAGS_FTRACE with > > DYNAMIC_FTRACE_WITH_REGS, skip running recordmcount by > > exporting CC_USING_PATCHABLE_FUNCTION_ENTRY. > > > > Signed-off-by: Sami Tolvanen <samitolvanen@google.com> > > How stand-alone is this? Does it depend on the earlier mcount fixes? It does, because exporting CC_USING_PATCHABLE_FUNCTION_ENTRY doesn't change anything without the earlier mcount changes. Sami
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 130569f90c54..eeaf3c2e0971 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -127,6 +127,7 @@ endif ifeq ($(CONFIG_DYNAMIC_FTRACE_WITH_REGS),y) KBUILD_CPPFLAGS += -DCC_USING_PATCHABLE_FUNCTION_ENTRY CC_FLAGS_FTRACE := -fpatchable-function-entry=2 + export CC_USING_PATCHABLE_FUNCTION_ENTRY := 1 endif # Default value
Since arm64 does not use -pg in CC_FLAGS_FTRACE with DYNAMIC_FTRACE_WITH_REGS, skip running recordmcount by exporting CC_USING_PATCHABLE_FUNCTION_ENTRY. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> --- arch/arm64/Makefile | 1 + 1 file changed, 1 insertion(+)