s390/stackleak: provide fast __stackleak_poison() implementation
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 5 Apr 2023 13:08:41 +0000 (15:08 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Thu, 20 Apr 2023 09:36:35 +0000 (11:36 +0200)
commit2a405f6bb3a5b2baaa74dfc5aaa0e1b99145bd1b
tree6481ca657215160fa0914083d4c81ce40caf854d
parent491a78663e039fabc58c892ca8f2c2e08caaf4f8
s390/stackleak: provide fast __stackleak_poison() implementation

Provide an s390 specific __stackleak_poison() implementation which is
faster than the generic variant.

For the original implementation with an enforced 4kb stackframe for the
getpid() system call the system call overhead increases by a factor of 3 if
the stackleak feature is enabled. Using the s390 mvc based variant this is
reduced to an increase of 25% instead.

This is within the expected area, since the mvc based implementation is
more or less a memset64() variant which comes with similar results. See
commit 0b77d6701cf8 ("s390: implement memset16, memset32 & memset64").

Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20230405130841.1350565-3-hca@linux.ibm.com
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/processor.h