]> git.itanic.dy.fi Git - linux-stable/commit
s390/alternatives: remove padding generation code
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 11 May 2022 12:05:26 +0000 (14:05 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 17 May 2022 13:16:28 +0000 (15:16 +0200)
commite6ed91fd0768b914558dad5eeda2407a7d871f52
tree38ec239f54437eac27fa7190994f8cfce84d0dce
parentfad442d3abde47aef97d0d822807ab6e2555784a
s390/alternatives: remove padding generation code

clang fails to handle ".if" statements in inline assembly which are heavily
used in the alternatives code.

To work around this remove this code, and enforce that users of
alternatives must specify original and alternative instruction sequences
which have identical sizes. Add a compile time check with two ".org"
statements similar to arm64.

In result not only clang can handle this, but also quite a lot of code can
be removed.

Acked-by: Vasily Gorbik <gor@linux.ibm.com>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/1356
Link: https://lore.kernel.org/r/20220511120532.2228616-3-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/alternative-asm.h
arch/s390/include/asm/alternative.h
arch/s390/kernel/alternative.c