linux-stable/arch/s390/lib
Sven Schnelle 30de14b188 s390: current_stack_pointer shouldn't be a function
s390 defines current_stack_pointer as function while all other
architectures use 'register unsigned long asm("<stackptr reg>").

This make codes like the following from check_stack_object() fail:

	if (IS_ENABLED(CONFIG_STACK_GROWSUP)) {
		if ((void *)current_stack_pointer < obj + len)
			return BAD_STACK;
	} else {
		if (obj < (void *)current_stack_pointer)
			return BAD_STACK;
	}

because this would compare the address of current_stack_pointer() and
not the stackpointer value.

Reported-by: Karsten Graul <kgraul@linux.ibm.com>
Fixes: 2792d84e6d ("usercopy: Check valid lifetime via stack depth")
Cc: Kees Cook <keescook@chromium.org>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2022-04-12 11:56:08 +02:00
..
Makefile s390/nospec: add an option to use thunk-extern 2022-03-10 15:58:17 +01:00
delay.c s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
error-inject.c s390: enable HAVE_FUNCTION_ERROR_INJECTION 2020-07-27 10:33:28 +02:00
expoline.S s390/nospec: add an option to use thunk-extern 2022-03-10 15:58:17 +01:00
find.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mem.S s390: add missing ENDPROC statements to assembler functions 2019-05-02 13:54:11 +02:00
probes.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spinlock.c s390/alternatives: use insn format for new instructions 2022-03-27 22:18:39 +02:00
string.c s390 updates for the 5.16 merge window 2021-11-06 14:48:06 -07:00
test_kprobes.c kprobes: add testcases for s390 2021-10-04 09:49:37 +02:00
test_kprobes.h kprobes: add testcases for s390 2021-10-04 09:49:37 +02:00
test_kprobes_asm.S kprobes: add testcases for s390 2021-10-04 09:49:37 +02:00
test_modules.c s390/module: fix building test_modules_helpers.o with clang 2022-02-06 23:30:37 +01:00
test_modules.h s390/module: fix building test_modules_helpers.o with clang 2022-02-06 23:30:37 +01:00
test_modules_helpers.c s390/module: test loading modules with a lot of relocations 2022-01-24 09:10:59 +01:00
test_unwind.c s390: current_stack_pointer shouldn't be a function 2022-04-12 11:56:08 +02:00
uaccess.c s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01:00
xor.c lib/xor: make xor prototypes more friendly to compiler vectorization 2022-02-11 20:39:39 +11:00