]> git.baikalelectronics.ru Git - kernel.git/commit
s390/vdso: fix stack corruption
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 27 Oct 2014 07:28:08 +0000 (08:28 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 27 Oct 2014 12:27:02 +0000 (13:27 +0100)
commita8059237c9e3774101aaf9b8c7b709dfea9bce15
tree37f0a0c357aaf7305ca9acf2850c78da576c4f93
parent4bf9ec28c4f3beac70d788fb5ceedfcf754d25fe
s390/vdso: fix stack corruption

The kernel provided vdso functions do not get a stack frame from the
calling function and therefore may not change the stack contents, unless
they allocate space on their own.

This problem was exposed with f0f3ac730616 "s390/vdso: replace stck with
stcke" which writes 16 bytes instead of 8 bytes into the stack frame. These
additional 8 bytes however were indeed used by the caller (glibc) to save
data and therefore this data was corrupted by the vdso code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/vdso32/clock_gettime.S
arch/s390/kernel/vdso32/gettimeofday.S
arch/s390/kernel/vdso64/clock_gettime.S
arch/s390/kernel/vdso64/gettimeofday.S