linux-stable/arch/arm64/kernel
Mark Rutland 14743f8591 arm64: ftrace: don't adjust the LR value
[ Upstream commit 6e803e2e6e ]

The core ftrace code requires that when it is handed the PC of an
instrumented function, this PC is the address of the instrumented
instruction. This is necessary so that the core ftrace code can identify
the specific instrumentation site. Since the instrumented function will
be a BL, the address of the instrumented function is LR - 4 at entry to
the ftrace code.

This fixup is applied in the mcount_get_pc and mcount_get_pc0 helpers,
which acquire the PC of the instrumented function.

The mcount_get_lr helper is used to acquire the LR of the instrumented
function, whose value does not require this adjustment, and cannot be
adjusted to anything meaningful. No adjustment of this value is made on
other architectures, including arm. However, arm64 adjusts this value by
4.

This patch brings arm64 in line with other architectures and removes the
adjustment of the LR value.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Torsten Duwe <duwe@suse.de>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-12 19:47:04 +01:00
..
probes arm64: kprobe: make page to RO mode when allocate it 2018-11-27 16:12:58 +01:00
vdso arm64: Add build salt to the vDSO 2018-07-18 01:18:05 +09:00
.gitignore
acpi.c arm64: acpi: fix alignment fault in accessing ACPI 2018-07-23 15:34:12 +01:00
acpi_numa.c arm64: numa: rework ACPI NUMA initialization 2018-07-09 18:21:40 +01:00
acpi_parking_protocol.c arm64: fix endianness annotation in acpi_parking_protocol.c 2017-06-29 11:33:15 +01:00
alternative.c arm64: alternative: Use true and false for boolean values 2018-08-08 11:20:54 +01:00
arm64ksyms.c arm64: export tishift functions to modules 2018-05-21 19:00:48 +01:00
armv8_deprecated.c arm64: kill config_sctlr_el1() 2018-07-12 14:40:38 +01:00
asm-offsets.c arm64: KVM: Handle guest's ARCH_WORKAROUND_2 requests 2018-05-31 18:00:57 +01:00
cacheinfo.c arm64: Add support for ACPI based firmware tables 2018-05-17 17:28:09 +01:00
cpu-reset.h arm64: kexec: always reset to EL2 if present 2018-07-04 18:34:24 +01:00
cpu-reset.S arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives 2018-02-06 22:53:27 +00:00
cpu_errata.c arm64: kill config_sctlr_el1() 2018-07-12 14:40:38 +01:00
cpu_ops.c arm64: cpu_ops: Add missing 'const' qualifiers 2017-12-01 13:05:08 +00:00
cpufeature.c arm64: cpufeature: ctr: Fix cpu capability check for late CPUs 2018-11-13 11:08:21 -08:00
cpuidle.c ARM64 / cpuidle: Use new cpuidle macro for entering retention state 2018-01-02 13:50:34 +00:00
cpuinfo.c arm64: Expose Arm v8.4 features 2018-03-19 18:14:27 +00:00
crash_core.c arm64: kernel: arch_crash_save_vmcoreinfo() should depend on CONFIG_CRASH_CORE 2018-09-11 11:08:49 +01:00
crash_dump.c arm64: kdump: provide /proc/vmcore file 2017-04-05 18:31:38 +01:00
debug-monitors.c arm64: Use arm64_force_sig_info instead of force_sig_info 2018-03-06 18:52:32 +00:00
efi-entry.S arm64: Add software workaround for Falkor erratum 1041 2018-02-06 22:53:13 +00:00
efi-header.S arm64: efi: split Image code and data into separate PE/COFF sections 2017-04-04 17:50:59 +01:00
efi-rt-wrapper.S efi/arm64: Check whether x18 is preserved by runtime services calls 2018-03-09 08:58:22 +01:00
efi.c efi/arm64: Check whether x18 is preserved by runtime services calls 2018-03-09 08:58:22 +01:00
entry-fpsimd.S arm64/sve: Write ZCR_EL1 on context switch only if changed 2018-05-17 18:19:53 +01:00
entry-ftrace.S arm64: ftrace: don't adjust the LR value 2019-02-12 19:47:04 +01:00
entry.S arm64: entry: Allow handling of undefined instructions from EL1 2018-11-13 11:08:28 -08:00
fpsimd.c arm64: move sve_user_{enable,disable} to <asm/fpsimd.h> 2018-07-12 14:40:39 +01:00
ftrace.c arm64: function_graph: Simplify with function_graph_enter() 2018-12-05 19:32:10 +01:00
head.S arm64/kvm: consistently handle host HCR_EL2 flags 2019-01-22 21:40:30 +01:00
hibernate-asm.S arm64: assembler: Change order of macro arguments in phys_to_ttbr 2018-02-06 22:53:21 +00:00
hibernate.c arm64: hibernate: Clean the __hyp_text to PoC after resume 2019-02-06 17:30:12 +01:00
hw_breakpoint.c perf/arch/arm64: Implement hw_breakpoint_arch_parse() 2018-06-26 09:07:56 +02:00
hyp-stub.S arm64: hyp-stub: Forbid kprobing of the hyp-stub 2019-02-06 17:30:12 +01:00
image.h arm64: drop linker script hack to hide __efistub_ symbols 2019-01-13 09:51:08 +01:00
insn.c arm64: insn: Don't fallback on nosync path for general insn patching 2018-07-05 17:24:48 +01:00
io.c arm64: Avoid aligning normal memory pointers in __memcpy_{to,from}io 2017-10-24 16:23:07 +01:00
irq.c arm64: Use the new GENERIC_IRQ_MULTI_HANDLER 2018-08-03 12:14:09 +02:00
jump_label.c arm64: Avoid calling stop_machine() when patching jump labels 2018-08-17 10:26:44 +01:00
kaslr.c arm64: kaslr: ensure randomized quantities are clean also when kaslr is off 2019-02-06 17:30:12 +01:00
kgdb.c arm64/debug: Fix registers on sleeping tasks 2018-03-06 18:52:34 +00:00
kuser32.S
machine_kexec.c arm64: kernel: arch_crash_save_vmcoreinfo() should depend on CONFIG_CRASH_CORE 2018-09-11 11:08:49 +01:00
Makefile arm64: kernel: arch_crash_save_vmcoreinfo() should depend on CONFIG_CRASH_CORE 2018-09-11 11:08:49 +01:00
module-plts.c arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp 2018-04-24 19:07:35 +01:00
module.c arm64: Avoid flush_icache_range() in alternatives patching code 2018-06-27 18:21:53 +01:00
module.lds arm64: ftrace: emit ftrace-mod.o contents through code 2017-12-01 13:04:59 +00:00
paravirt.c
pci.c PCI: Add a generic weak pcibios_align_resource() 2017-08-02 14:53:16 -05:00
perf_callchain.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
perf_event.c arm64: perf: set suppress_bind_attrs flag to true 2019-01-26 09:32:35 +01:00
perf_regs.c compat: Move compat_timespec/ timeval to compat_time.h 2018-04-19 13:29:54 +02:00
process.c arm64: Add support for STACKLEAK gcc plugin 2018-07-26 11:36:34 +01:00
psci.c arm64: Use __pa_symbol for kernel symbols 2017-01-12 15:05:39 +00:00
ptrace.c arm64: Add stack information to on_accessible_stack 2018-07-26 11:36:07 +01:00
reloc_test_core.c arm64: fix undefined reference to 'printk' 2018-03-19 18:14:25 +00:00
reloc_test_syms.S arm64: fix undefined reference to 'printk' 2018-03-19 18:14:25 +00:00
relocate_kernel.S arm64: Add software workaround for Falkor erratum 1041 2018-02-06 22:53:13 +00:00
return_address.c arm64: unwind: remove sp from struct stackframe 2017-08-09 14:10:29 +01:00
sdei.c arm64: sdei: Mark sdei stack helper functions as static 2018-07-31 12:08:22 +01:00
setup.c arm64: Fix /proc/iomem for reserved but not memory regions 2018-10-12 15:25:16 +01:00
signal.c arm64: use {COMPAT,}SYSCALL_DEFINE0 for sigreturn 2018-07-12 14:49:48 +01:00
signal32.c arm64: use {COMPAT,}SYSCALL_DEFINE0 for sigreturn 2018-07-12 14:49:48 +01:00
sleep.S arm64: idmap: Use "awx" flags for .idmap.text .pushsection directives 2018-02-06 22:53:27 +00:00
smccc-call.S firmware: qcom: scm: Fix interrupted SCM calls 2017-02-03 18:46:33 +00:00
smp.c arm64: numa: rework ACPI NUMA initialization 2018-07-09 18:21:40 +01:00
smp_spin_table.c arm64: Use __pa_symbol for kernel symbols 2017-01-12 15:05:39 +00:00
ssbd.c arm64: ssbd: Add prctl interface for per-thread mitigation 2018-05-31 18:00:52 +01:00
stacktrace.c arm64: Add stack information to on_accessible_stack 2018-07-26 11:36:07 +01:00
suspend.c arm64: ssbd: Restore mitigation status on CPU resume 2018-05-31 17:35:19 +01:00
sys.c arm64: implement syscall wrappers 2018-07-12 14:49:48 +01:00
sys32.c arm64: implement syscall wrappers 2018-07-12 14:49:48 +01:00
sys_compat.c arm64: compat: Don't pull syscall number from regs in arm_compat_syscall 2019-01-16 22:04:37 +01:00
syscall.c arm64: compat: Don't pull syscall number from regs in arm_compat_syscall 2019-01-16 22:04:37 +01:00
time.c arm64: fix unwind_frame() for filtered out fn for function graph tracing 2018-02-23 13:46:38 +00:00
topology.c arm64: topology: re-introduce numa mask check for scheduler MC selection 2018-07-06 13:18:18 +01:00
trace-events-emulation.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
traps.c arm64: entry: Allow handling of undefined instructions from EL1 2018-11-13 11:08:28 -08:00
vdso.c arm64/vdso: Support mremap() for vDSO 2017-08-09 12:16:28 +01:00
vmlinux.lds.S arm64: relocatable: fix inconsistencies in linker script and options 2019-01-13 09:51:08 +01:00