linux_dsm_epyc7002/arch/arm64/kernel
James Morse bfe298745a arm64: entry-common: don't touch daif before bp-hardening
The previous patches mechanically transformed the assembly version of
entry.S to entry-common.c for synchronous exceptions.

The C version of local_daif_restore() doesn't quite do the same thing
as the assembly versions if pseudo-NMI is in use. In particular,
| local_daif_restore(DAIF_PROCCTX_NOIRQ)
will still allow pNMI to be delivered. This is not the behaviour
do_el0_ia_bp_hardening() and do_sp_pc_abort() want as it should not
be possible for the PMU handler to run as an NMI until the bp-hardening
sequence has run.

The bp-hardening calls were placed where they are because this was the
first C code to run after the relevant exceptions. As we've now moved
that point earlier, move the checks and calls earlier too.

This makes it clearer that this stuff runs before any kind of exception,
and saves modifying PSTATE twice.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2019-10-28 11:22:54 +00:00
..
probes arm64: remove __exception annotations 2019-10-28 11:22:38 +00:00
vdso arm64: vdso: Remove stale files from old assembly implementation 2019-10-07 11:07:16 +01:00
vdso32 arm64: vdso32: Rename COMPATCC to CC_COMPAT 2019-10-07 13:32:13 +01:00
.gitignore
acpi_numa.c
acpi_parking_protocol.c
acpi.c
alternative.c
armv8_deprecated.c arm64: armv8_deprecated: Checking return value for memory allocation 2019-10-08 13:34:04 +01:00
asm-offsets.c
cacheinfo.c
cpu_errata.c arm64: errata: Update stale comment 2019-10-01 13:30:17 +01:00
cpu_ops.c
cpu-reset.h
cpu-reset.S
cpufeature.c arm64: cpufeature: Effectively expose FRINT capability to userspace 2019-10-04 11:43:43 +01:00
cpuidle.c PSCI: cpuidle: Refactor CPU suspend power_state parameter handling 2019-08-09 17:51:39 +01:00
cpuinfo.c arm64: constify icache_policy_str[] 2019-08-13 18:32:17 +01:00
crash_core.c
crash_dump.c
debug-monitors.c
efi-entry.S
efi-header.S
efi-rt-wrapper.S
efi.c
entry-common.c arm64: entry-common: don't touch daif before bp-hardening 2019-10-28 11:22:54 +00:00
entry-fpsimd.S
entry-ftrace.S
entry.S arm64: entry: convert el0_sync to C 2019-10-28 11:22:49 +00:00
fpsimd.c arm64: Remove asmlinkage from updated functions 2019-10-28 11:22:51 +00:00
ftrace.c arm64: ftrace: Ensure synchronisation in PLT setup for Neoverse-N1 #1542419 2019-10-04 11:44:05 +01:00
head.S Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
hibernate-asm.S arm64: mm: Logic to make offset_ttbr1 conditional 2019-08-09 11:17:24 +01:00
hibernate.c arm64: memory: rename VA_START to PAGE_END 2019-08-14 17:06:58 +01:00
hw_breakpoint.c
hyp-stub.S
image-vars.h arm64/efi: Move variable assignments after SECTIONS 2019-08-14 17:18:15 +01:00
image.h arm64/efi: Move variable assignments after SECTIONS 2019-08-14 17:18:15 +01:00
insn.c arm64: constify aarch64_insn_encoding_class[] 2019-08-13 18:32:17 +01:00
io.c
irq.c
jump_label.c
kaslr.c Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
kexec_image.c
kgdb.c
kuser32.S
machine_kexec_file.c Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
machine_kexec.c
Makefile arm64: entry: convert el1_sync to C 2019-10-28 11:22:47 +00:00
module-plts.c
module.c
module.lds
paravirt.c
pci.c
perf_callchain.c
perf_event.c arm64: perf_event: Add missing header needed for smp_processor_id() 2019-08-20 17:10:05 +01:00
perf_regs.c
pointer_auth.c
process.c arm64/sve: Fix wrong free for task->thread.sve_state 2019-10-01 13:30:52 +01:00
psci.c arm64: smp: disable hotplug on trusted OS resident CPU 2019-08-15 11:12:03 +01:00
ptrace.c arm64/ptrace: Fix typoes in sve_set() comment 2019-08-07 16:20:57 +01:00
reloc_test_core.c
reloc_test_syms.S
relocate_kernel.S
return_address.c
sdei.c
setup.c Merge branches 'for-next/52-bit-kva', 'for-next/cpu-topology', 'for-next/error-injection', 'for-next/perf', 'for-next/psci-cpuidle', 'for-next/rng', 'for-next/smpboot', 'for-next/tbi' and 'for-next/tlbi' into for-next/core 2019-08-30 12:46:12 +01:00
signal32.c
signal.c
sigreturn32.S
sleep.S
smccc-call.S
smp_spin_table.c arm64: prefer __section from compiler_attributes.h 2019-08-13 18:32:15 +01:00
smp.c arm64: smp: Treat unknown boot failures as being 'stuck in kernel' 2019-08-27 17:37:05 +01:00
ssbd.c
stacktrace.c
suspend.c
sys32.c
sys_compat.c
sys.c
syscall.c arm64: Remove asmlinkage from updated functions 2019-10-28 11:22:51 +00:00
time.c
topology.c Merge tag 'common/for-v5.4-rc1/cpu-topology' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux into for-next/cpu-topology 2019-08-14 10:07:00 +01:00
trace-events-emulation.h
traps.c arm64: Remove asmlinkage from updated functions 2019-10-28 11:22:51 +00:00
vdso.c
vmlinux.lds.S arm64: remove __exception annotations 2019-10-28 11:22:38 +00:00