Fix potential infoleak in older kernels
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 8 Nov 2016 10:17:00 +0000 (11:17 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:51:05 +0000 (03:51 +0000)
commit0c91f32dc1bd2db0e6eef8404811fdb4c78afd2d
tree0c7446cdba66b5ea192c07897d2d172a11e0ab46
parent1433b66208118028d7f1a5fc235f2660badb6c05
Fix potential infoleak in older kernels

Not upstream as it is not needed there.

So a patch something like this might be a safe way to fix the
potential infoleak in older kernels.

THIS IS UNTESTED. It's a very obvious patch, though, so if it compiles
it probably works. It just initializes the output variable with 0 in
the inline asm description, instead of doing it in the exception
handler.

It will generate slightly worse code (a few unnecessary ALU
operations), but it doesn't have any interactions with the exception
handler implementation.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/x86/include/asm/uaccess.h