• Martin Schwidefsky's avatar
    s390: fix test_fp_ctl inline assembly contraints · bcf4dd5f
    Martin Schwidefsky authored
    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 4725c860
    "s390: fix save and restore of the floating-point-control register"
    
    Cc: stable@vger.kernel.org # v3.13+
    Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    bcf4dd5f
api.h 505 Bytes