aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/stacktrace.h
diff options
context:
space:
mode:
authorSven Schnelle <[email protected]>2022-04-08 12:51:26 +0000
committerHeiko Carstens <[email protected]>2022-04-12 09:56:08 +0000
commit30de14b1884ba609fc1acfba5b40309e3a6ccefe (patch)
tree6196ce347eb977a4d787615260264a3255274d4d /arch/s390/include/asm/stacktrace.h
parents390: update defconfigs (diff)
downloadkernel-30de14b1884ba609fc1acfba5b40309e3a6ccefe.tar.gz
kernel-30de14b1884ba609fc1acfba5b40309e3a6ccefe.zip
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 <[email protected]> Fixes: 2792d84e6da5 ("usercopy: Check valid lifetime via stack depth") Cc: Kees Cook <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Alexander Gordeev <[email protected]> Signed-off-by: Sven Schnelle <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
Diffstat (limited to 'arch/s390/include/asm/stacktrace.h')
-rw-r--r--arch/s390/include/asm/stacktrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h
index 275f4258fbd5..f8500191993d 100644
--- a/arch/s390/include/asm/stacktrace.h
+++ b/arch/s390/include/asm/stacktrace.h
@@ -46,7 +46,7 @@ struct stack_frame {
};
/*
- * Unlike current_stack_pointer() which simply returns current value of %r15
+ * Unlike current_stack_pointer which simply contains the current value of %r15
* current_frame_address() returns function stack frame address, which matches
* %r15 upon function invocation. It may differ from %r15 later if function
* allocates stack for local variables or new stack frame to call other