linux/arch/arm64/kernel
James Morse 6e48449c91 UPSTREAM: arm64: entry: Move the trampoline data page before the text page
commit c091fb6ae0 upstream.

The trampoline code has a data page that holds the address of the vectors,
which is unmapped when running in user-space. This ensures that with
CONFIG_RANDOMIZE_BASE, the randomised address of the kernel can't be
discovered until after the kernel has been mapped.

If the trampoline text page is extended to include multiple sets of
vectors, it will be larger than a single page, making it tricky to
find the data page without knowing the size of the trampoline text
pages, which will vary with PAGE_SIZE.

Move the data page to appear before the text page. This allows the
data page to be found without knowing the size of the trampoline text
pages. 'tramp_vectors' is used to refer to the beginning of the
.entry.tramp.text section, do that explicitly.

Bug: 215557547
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia72d8b1946c6c63226be2f43c75f1924d027946e
2022-03-16 13:41:40 +01:00
..
probes arm64: kprobes: Restore local irqflag if kprobes is cancelled 2021-04-28 13:40:02 +02:00
vdso Merge 5.10.36 into android12-5.10 2021-05-13 14:22:11 +02:00
vdso32 UPSTREAM: arm64: vdso32: drop -no-integrated-as flag 2021-05-13 09:14:25 -07:00
.gitignore
acpi_numa.c
acpi_parking_protocol.c ANDROID: arm64: kernel: use __pa_function for secondary_entry 2021-02-05 02:28:53 +00:00
acpi.c arm64: permit ACPI core to map kernel memory used for table overrides 2020-09-30 22:27:51 +01:00
alternative.c UPSTREAM: arm64: alternatives: Remove READ_ONCE() usage during patch operation 2021-01-29 08:41:03 +00:00
armv8_deprecated.c BACKPORT: arm64: uaccess: rename privileged uaccess routines 2021-04-23 17:52:37 +02:00
asm-offsets.c FROMLIST: arm64: mte: rename gcr_user_excl to mte_ctrl 2021-07-14 20:52:05 -07:00
cacheinfo.c drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() 2021-09-26 14:08:59 +02:00
cpu_errata.c BACKPORT: arm64: errata: Add workaround for TSB flush failures 2022-01-24 20:34:21 +00:00
cpu_ops.c
cpu-reset.h ANDROID: arm64: add __va_function and __pa_function 2021-01-14 16:33:37 +00:00
cpu-reset.S FROMGIT: arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart 2021-03-19 08:22:53 +00:00
cpufeature.c UPSTREAM: arm64: cpufeature: add HWCAP for FEAT_RPRES 2022-03-16 13:39:21 +01:00
cpuidle.c
cpuinfo.c UPSTREAM: arm64: cpufeature: add HWCAP for FEAT_RPRES 2022-03-16 13:39:21 +01:00
crash_core.c arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo 2020-07-02 17:56:49 +01:00
crash_dump.c arm64: kdump: update ppos when reading elfcorehdr 2021-03-30 14:32:03 +02:00
debug-monitors.c BACKPORT: arm64: expose FAR_EL1 tag bits in siginfo 2021-01-22 10:09:05 -08:00
efi-entry.S
efi-header.S arm64: efi: increase EFI PE/COFF header padding to 64 KB 2020-10-28 14:02:03 +00:00
efi-rt-wrapper.S Revert "FROMLIST: arm64: efi: restore x18 if it was corrupted" 2020-06-09 12:52:35 +01:00
efi.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
entry-common.c Merge 5.10.38 into android12-5.10 2021-05-20 15:35:25 +02:00
entry-fpsimd.S arm64/sve: Implement a helper to load SVE registers from FPSIMD state 2020-09-21 18:06:33 +01:00
entry-ftrace.S
entry.S UPSTREAM: arm64: entry: Move the trampoline data page before the text page 2022-03-16 13:41:40 +01:00
fpsimd.c This is the 5.10.68 stable release 2021-09-30 18:35:35 +02:00
ftrace.c
head.S Merge 5.10.67 into android12-5.10-lts 2021-09-30 12:21:03 +02:00
hibernate-asm.S
hibernate.c UPSTREAM: arm64: mte: reset the page tag in page->flags 2021-01-19 21:47:29 -08:00
hw_breakpoint.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hyp-stub.S UPSTREAM: arm64: Add missing ISB after invalidating TLB in enter_vhe 2021-06-10 20:26:07 -07:00
idreg-override.c FROMGIT: arm64/cpufeature: Optionally disable MTE via command-line 2021-08-05 07:21:22 +00:00
image-vars.h FROMGIT: KVM: arm64: Generate final CTR_EL0 value when running in Protected mode 2021-03-31 08:23:20 +00:00
image.h arm64: get rid of TEXT_OFFSET 2020-09-07 15:00:52 +01:00
insn.c arm64: kprobe: disable probe of fault prone ptrauth instruction 2020-09-14 12:07:02 +01:00
io.c
irq.c UPSTREAM: arm64: scs: use vmapped IRQ and SDEI shadow stacks 2021-01-07 17:56:54 -08:00
jump_label.c
kaslr.c UPSTREAM: arm64: kaslr: support randomized module area with KASAN_VMALLOC 2021-10-04 15:44:35 +00:00
kexec_image.c arm64: kexec_file: Fix sparse warning 2020-11-10 13:11:44 +00:00
kgdb.c arm64: kgdb: Fix single-step exception handling oops 2020-07-08 22:18:54 +01:00
kuser32.S
machine_kexec_file.c arm64: kexec_file: fix memory leakage in create_dtb() when fdt_open_into() fails 2021-03-04 11:38:36 +01:00
machine_kexec.c
Makefile ANDROID: tracing: fix register tracing spam on memcpy 2021-10-07 16:33:41 +00:00
module-plts.c ANDROID: arm64: module: preserve RELA sections for FIPS140 integrity selfcheck 2021-06-11 07:49:58 +00:00
module.c UPSTREAM: arm64: kaslr: support randomized module area with KASAN_VMALLOC 2021-10-04 15:44:35 +00:00
mte.c FROMGIT: arm64: kasan: mte: move GCR_EL1 switch to task switch when KASAN disabled 2021-10-01 09:39:36 -07:00
paravirt.c arm64: paravirt: Initialize steal time when cpu is online 2020-09-17 18:12:18 +01:00
pci.c
perf_callchain.c arm64: stacktrace: Make stack walk callback consistent with generic code 2020-09-18 14:24:16 +01:00
perf_event.c arm64: perf: Convert snprintf to sysfs_emit 2021-07-14 16:55:52 +02:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
pointer_auth.c FROMLIST: arm64: move preemption disablement to prctl handlers 2021-07-14 20:52:05 -07:00
process.c Merge branch 'android12-5.10' into android12-5.10-lts 2021-11-19 09:15:03 +01:00
proton-pack.c UPSTREAM: arm64: spectre: Rename spectre_v4_patch_fw_mitigation_conduit 2022-03-16 13:40:23 +01:00
psci.c ANDROID: arm64: add __va_function and __pa_function 2021-01-14 16:33:37 +00:00
ptrace.c This is the 5.10.58 stable release 2021-08-12 14:58:34 +02:00
reloc_test_core.c
reloc_test_syms.S
relocate_kernel.S arm64/relocate_kernel: remove redundant code 2020-09-11 19:06:25 +01:00
return_address.c arm64: stacktrace: Make stack walk callback consistent with generic code 2020-09-18 14:24:16 +01:00
sdei.c UPSTREAM: arm64: sdei: Push IS_ENABLED() checks down to callee functions 2021-01-07 17:56:54 -08:00
setup.c This is the 5.10.50 stable release 2021-07-14 17:35:23 +02:00
signal.c arm64: fix compat syscall return truncation 2021-08-12 13:22:20 +02:00
signal32.c arm64: compat: Always use sigpage for sigreturn trampoline 2020-06-23 14:56:24 +01:00
sigreturn32.S
sleep.S BACKPORT: kasan: remove redundant config option 2021-03-24 15:09:15 -07:00
smccc-call.S arm64/kernel: Remove needless Call Frame Information annotations 2020-09-01 09:50:36 +02:00
smp_spin_table.c ANDROID: arm64: add __va_function and __pa_function 2021-01-14 16:33:37 +00:00
smp.c This is the 5.10.50 stable release 2021-07-14 17:35:23 +02:00
stacktrace.c This is the 5.10.58 stable release 2021-08-12 14:58:34 +02:00
suspend.c UPSTREAM: arm64: kasan: mte: use a constant kernel GCR_EL1 value 2021-10-01 09:39:35 -07:00
sys_compat.c BACKPORT: arm64: expose FAR_EL1 tag bits in siginfo 2021-01-22 10:09:05 -08:00
sys.c
sys32.c
syscall.c This is the 5.10.58 stable release 2021-08-12 14:58:34 +02:00
time.c
topology.c Power management updates for 5.10-rc1 2020-10-14 10:45:41 -07:00
trace-events-emulation.h
traps.c Revert half of "ANDROID: arm64: add vendor hooks for bti and pauth fault" 2022-01-21 13:13:16 +01:00
vdso.c arm64: vdso: Fix unusual formatting in *setup_additional_pages() 2020-09-01 13:37:57 +01:00
vmlinux.lds.S Merge branch 'android12-5.10' into android12-5.10-lts 2021-08-08 09:35:52 +02:00