1
0
Fork 0
alistair23-linux/arch
Ard Biesheuvel 4c7924060f arm64/alternatives: don't patch up internal branches
[ Upstream commit 5679b28142 ]

Commit f7b93d4294 ("arm64/alternatives: use subsections for replacement
sequences") moved the alternatives replacement sequences into subsections,
in order to keep the as close as possible to the code that they replace.

Unfortunately, this broke the logic in branch_insn_requires_update,
which assumed that any branch into kernel executable code was a branch
that required updating, which is no longer the case now that the code
sequences that are patched in are in the same section as the patch site
itself.

So the only way to discriminate branches that require updating and ones
that don't is to check whether the branch targets the replacement sequence
itself, and so we can drop the call to kernel_text_address() entirely.

Fixes: f7b93d4294 ("arm64/alternatives: use subsections for replacement sequences")
Reported-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Alexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20200709125953.30918-1-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:32:53 +02:00
..
alpha alpha: fix memory barriers so that they conform to the specification 2020-06-22 09:31:21 +02:00
arc ARC: elf: use right ELF_ARCH 2020-07-16 08:16:46 +02:00
arm arm64: Introduce a way to disable the 32bit vdso 2020-07-22 09:32:50 +02:00
arm64 arm64/alternatives: don't patch up internal branches 2020-07-22 09:32:53 +02:00
c6x mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -07:00
csky csky: Fixup abiv2 syscall_trace break a4 & a5 2020-06-17 16:40:21 +02:00
h8300 mm: consolidate pgtable_cache_init() and pgd_cache_init() 2019-09-24 15:54:09 -07:00
hexagon hexagon: define ioremap_uc 2020-05-10 10:31:31 +02:00
ia64 mm/memory_hotplug: shrink zones when offlining memory 2020-01-09 10:19:56 +01:00
m68k m68k: mm: fix node memblock init 2020-07-22 09:32:52 +02:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:37:02 +01:00
mips MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen 2020-07-09 09:37:56 +02:00
nds32 asm-generic/nds32: don't redefine cacheflush primitives 2020-01-17 19:48:43 +01:00
nios2 nios2 update for v5.4-rc1 2019-09-27 13:02:19 -07:00
openrisc openrisc: Fix issue with argument clobbering for clone/fork 2020-06-24 17:50:37 +02:00
parisc parisc: Fix kernel panic in mem_init() 2020-06-03 08:21:28 +02:00
powerpc powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL 2020-07-16 08:16:35 +02:00
riscv RISC-V: Don't allow write+exec only page mapping request in mmap 2020-06-30 15:37:06 -04:00
s390 s390/maccess: add no DAT mode to kernel_write 2020-07-16 08:16:48 +02:00
sh pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs 2020-02-24 08:36:41 +01:00
sparc fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()" 2020-06-30 15:36:47 -04:00
um um: ensure `make ARCH=um mrproper` removes arch/$(SUBARCH)/include/generated/ 2020-05-02 08:48:53 +02:00
unicore32 mm: treewide: clarify pgtable_page_{ctor,dtor}() naming 2019-09-26 10:10:44 -07:00
x86 x86/fpu: Reset MXCSR to default in kernel_fpu_begin() 2020-07-22 09:32:51 +02:00
xtensa xtensa: Implement copy_thread_tls 2020-01-14 20:08:35 +01:00
.gitignore
Kconfig asm-generic/tlb: add missing CONFIG symbol 2020-02-24 08:37:02 +01:00