]> git.baikalelectronics.ru Git - kernel.git/commit
s390: fix test_fp_ctl inline assembly contraints
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 27 Jun 2016 15:06:45 +0000 (17:06 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 28 Jun 2016 07:24:28 +0000 (09:24 +0200)
commit323d40b9b08c9b0bd98bb32a9a580690b35304ea
tree8077b22cea87210acb52b09075a0ff43ddd2fd38
parent665ce6c7c4e63688f555b3e926a7d92f6d8a19c0
s390: fix test_fp_ctl inline assembly contraints

The test_fp_ctl function is used to test if a given value is a valid
floating-point control. The inline assembly in test_fp_ctl uses an
incorrect constraint for the 'orig_fpc' variable. If the compiler
chooses the same register for 'fpc' and 'orig_fpc' the test_fp_ctl()
function always returns true. This allows user space to trigger
kernel oopses with invalid floating-point control values on the
signal stack.

This problem has been introduced with git commit cd8adab6499559c0d6
"s390: fix save and restore of the floating-point-control register"

Cc: stable@vger.kernel.org # v3.13+
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/fpu/api.h