Files
android_kernel_xiaomi_sm8450/arch/x86/include/asm
Peter Zijlstra 6ae865615f x86/uaccess: Dont leak the AC flag into __put_user() argument evaluation
The __put_user() macro evaluates it's @ptr argument inside the
__uaccess_begin() / __uaccess_end() region. While this would normally
not be expected to be an issue, an UBSAN bug (it ignored -fwrapv,
fixed in GCC 8+) would transform the @ptr evaluation for:

  drivers/gpu/drm/i915/i915_gem_execbuffer.c: if (unlikely(__put_user(offset, &urelocs[r-stack].presumed_offset))) {

into a signed-overflow-UB check and trigger the objtool AC validation.

Finish this commit:

  2a418cf3f5 ("x86/uaccess: Don't leak the AC flag into __put_user() value evaluation")

and explicitly evaluate all 3 arguments early.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: luto@kernel.org
Fixes: 2a418cf3f5 ("x86/uaccess: Don't leak the AC flag into __put_user() value evaluation")
Link: http://lkml.kernel.org/r/20190424072208.695962771@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-04-24 12:19:45 +02:00
..
2019-02-11 14:28:56 +01:00
2018-12-03 10:49:13 +01:00
2018-03-20 10:01:57 +01:00
2018-08-15 13:44:10 -07:00
2017-12-22 20:13:04 +01:00
2018-10-31 08:54:12 -07:00
2017-12-22 20:13:01 +01:00
2019-03-06 09:25:41 +01:00
2019-01-16 12:43:08 +01:00
2017-07-26 13:18:20 +02:00
2018-10-14 11:11:22 +02:00
2018-07-20 01:11:45 +02:00
2018-11-04 00:54:34 +01:00
2019-04-03 11:02:24 +02:00
2018-03-20 10:01:57 +01:00
2017-11-15 18:21:04 -08:00