diff options
author | Josh Poimboeuf <jpoimboe@redhat.com> | 2017-05-04 09:51:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-05-05 07:59:24 +0200 |
commit | 42fc6c6cb1662ba2fa727dd01c9473c63be4e3b6 (patch) | |
tree | be27183342fdd3eea4f75d8b8645964fb0a81045 /arch/x86/kernel/vm86_32.c | |
parent | bfb8c6e495b9fc14c315e0f1550394b2137035b4 (diff) | |
download | blackbird-obmc-linux-42fc6c6cb1662ba2fa727dd01c9473c63be4e3b6.tar.gz blackbird-obmc-linux-42fc6c6cb1662ba2fa727dd01c9473c63be4e3b6.zip |
x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic()
Andrey Konovalov reported the following warning while fuzzing the kernel
with syzkaller:
WARNING: kernel stack regs at ffff8800686869f8 in a.out:4933 has bad 'bp' value c3fc855a10167ec0
The unwinder dump revealed that RBP had a bad value when an interrupt
occurred in csum_partial_copy_generic().
That function saves RBP on the stack and then overwrites it, using it as
a scratch register. That's problematic because it breaks stack traces
if an interrupt occurs in the middle of the function.
Replace the usage of RBP with another callee-saved register (R15) so
stack traces are no longer affected.
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: David S . Miller <davem@davemloft.net>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Kostya Serebryany <kcc@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Cc: linux-sctp@vger.kernel.org
Cc: netdev <netdev@vger.kernel.org>
Cc: syzkaller <syzkaller@googlegroups.com>
Link: http://lkml.kernel.org/r/4b03a961efda5ec9bfe46b7b9c9ad72d1efad343.1493909486.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/vm86_32.c')
0 files changed, 0 insertions, 0 deletions