Skip to content

Commit c72f76d

Browse files
apply changes from rpi-6.12.y-coreforge-amdgpu to rpi-6.14.y
1 parent d25181f commit c72f76d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1264
-262
lines changed

arch/arm64/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,6 +1709,14 @@ config ARM64_TAGGED_ADDR_ABI
17091709
to system calls as pointer arguments. For details, see
17101710
Documentation/arch/arm64/tagged-address-abi.rst.
17111711

1712+
config ARM64_ALIGNMENT_FIXUPS
1713+
bool "Fix up misaligned loads and stores from userspace for 64bit code"
1714+
default n
1715+
help
1716+
Userspace may incorrectly assume that certain memory does not need
1717+
any special alignment considerations, which may result in Bus Erros.
1718+
Enable to handle these faults in the kernel.
1719+
17121720
menuconfig COMPAT
17131721
bool "Kernel support for 32-bit EL0"
17141722
depends on ARM64_4K_PAGES || EXPERT

arch/arm64/include/asm/exception.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ void do_sp_pc_abort(unsigned long addr, unsigned long esr, struct pt_regs *regs)
7070
void bad_el0_sync(struct pt_regs *regs, int reason, unsigned long esr);
7171
void do_el0_cp15(unsigned long esr, struct pt_regs *regs);
7272
int do_compat_alignment_fixup(unsigned long addr, struct pt_regs *regs);
73+
int do_alignment_fixup(unsigned long addr, struct pt_regs *regs);
7374
void do_el0_svc(struct pt_regs *regs);
7475
void do_el0_svc_compat(struct pt_regs *regs);
7576
void do_el0_fpac(struct pt_regs *regs, unsigned long esr);

arch/arm64/kernel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ obj-$(CONFIG_COMPAT) += sys32.o signal32.o \
4040
sys_compat.o
4141
obj-$(CONFIG_COMPAT) += sigreturn32.o
4242
obj-$(CONFIG_COMPAT_ALIGNMENT_FIXUPS) += compat_alignment.o
43+
obj-$(CONFIG_ARM64_ALIGNMENT_FIXUPS) += compat_alignment_64.o
4344
obj-$(CONFIG_KUSER_HELPERS) += kuser32.o
4445
obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o
4546
obj-$(CONFIG_MODULES) += module.o module-plts.o

arch/arm64/kernel/compat_alignment.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ int do_compat_alignment_fixup(unsigned long addr, struct pt_regs *regs)
318318
int thumb2_32b = 0;
319319

320320
instrptr = instruction_pointer(regs);
321-
322321
if (compat_thumb_mode(regs)) {
323322
__le16 __user *ptr = (__le16 __user *)(instrptr & ~1);
324323
u16 tinstr, tinst2;

0 commit comments

Comments
 (0)