android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Vernon Lovejoy 0099a29bc5 x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
commit 2e4be0d011f21593c6b316806779ba1eba2cd7e0 upstream.

The commit e335bb51cc ("x86/unwind: Ensure stack pointer is aligned")
tried to align the stack pointer in show_trace_log_lvl(), otherwise the
"stack < stack_info.end" check can't guarantee that the last read does
not go past the end of the stack.

However, we have the same problem with the initial value of the stack
pointer, it can also be unaligned. So without this patch this trivial
kernel module

	#include <linux/module.h>

	static int init(void)
	{
		asm volatile("sub    $0x4,%rsp");
		dump_stack();
		asm volatile("add    $0x4,%rsp");

		return -EAGAIN;
	}

	module_init(init);
	MODULE_LICENSE("GPL");

crashes the kernel.

Fixes: e335bb51cc ("x86/unwind: Ensure stack pointer is aligned")
Signed-off-by: Vernon Lovejoy <vlovejoy@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20230512104232.GA10227@redhat.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 12:44:10 +01:00
..
alpha alpha: fix R_ALPHA_LITERAL reloc for large modules 2023-03-17 08:32:52 +01:00
arc dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
arm ARM: 9296/1: HP Jornada 7XX: fix kernel-doc warnings 2023-05-30 12:44:01 +01:00
arm64 arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step 2023-05-17 11:35:39 +02:00
c6x dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
csky dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-06 07:52:49 +01:00
hexagon dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
ia64 ia64: salinfo: placate defined-but-not-used warning 2023-05-17 11:35:47 +02:00
m68k m68k: Move signal frame following exception on 68020/030 2023-05-30 12:44:09 +01:00
microblaze dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
mips MIPS: fw: Allow firmware to pass a empty env 2023-05-17 11:35:32 +02:00
nds32 dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
nios2 dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
openrisc openrisc: Properly store r31 to pt_regs on unhandled exceptions 2023-05-17 11:35:53 +02:00
parisc parisc: Fix flush_dcache_page() for usage from irq context 2023-05-30 12:44:09 +01:00
powerpc powerpc/64s/radix: Fix soft dirty tracking 2023-05-30 12:44:07 +01:00
riscv riscv: Bump COMMAND_LINE_SIZE value to 1024 2023-04-05 11:16:39 +02:00
s390 s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling 2023-04-26 11:24:03 +02:00
sh sh: nmi_debug: fix return value of __setup handler 2023-05-17 11:36:01 +02:00
sparc dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
um UML: define RUNTIME_DISCARD_EXIT 2023-03-17 08:32:54 +01:00
unicore32
x86 x86/show_trace_log_lvl: Ensure stack pointer is aligned, again 2023-05-30 12:44:10 +01:00
xtensa dma-mapping: drop the dev argument to arch_sync_dma_for_* 2023-04-05 11:16:43 +02:00
.gitignore
Kconfig