x86/fpu: Add debugging checks to all copy_kernel_to_*() functions
authorIngo Molnar <mingo@kernel.org>
Mon, 25 May 2015 08:59:31 +0000 (10:59 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 12:11:28 +0000 (14:11 +0200)
commit43b287b3f4d8665cd5a4909132259b663cc1c0e3
treea782f11d7934e451c57f1b7e9a8f1dd87e1cbd15
parentce2a1e67f1738535b011a7b4bd42cc114b1d805f
x86/fpu: Add debugging checks to all copy_kernel_to_*() functions

Copying from in-kernel FPU context buffers to FPU registers are
never supposed to fault.

Add debugging checks to copy_kernel_to_fxregs() and copy_kernel_to_fregs()
to double check this assumption.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Bobby Powers <bobbypowers@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/fpu/internal.h