Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1635867

RE: [PATCH] x86/asm: Don't use rbp as temp register in csum_partial_copy_generic()

From David Laight <David.Laight@ACULAB.COM>
Newsgroups linux.kernel
Subject RE: [PATCH] x86/asm: Don't use rbp as temp register in csum_partial_copy_generic()
Date 2017-05-04 18:10 +0200
Message-ID <tDruh-5So-5@gated-at.bofh.it> (permalink)
References <tDqoy-4PF-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Josh Poimboeuf
> Sent: 04 May 2017 15:52
> 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.

Does gcc guarantee not to use bp as a scratch register in leaf functions?

	David

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/asm: Don't use rbp as temp register in csum_partial_copy_generic() Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-04 17:00 +0200
  RE: [PATCH] x86/asm: Don't use rbp as temp register in  csum_partial_copy_generic() David Laight <David.Laight@ACULAB.COM> - 2017-05-04 18:10 +0200
    Re: [PATCH] x86/asm: Don't use rbp as temp register in  csum_partial_copy_generic() Josh Poimboeuf <jpoimboe@redhat.com> - 2017-05-04 18:20 +0200
  [tip:x86/urgent] x86/asm: Don't use RBP as a temporary register in  csum_partial_copy_generic() tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2017-05-05 10:30 +0200

csiph-web