Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1635872
| From | Josh Poimboeuf <jpoimboe@redhat.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:20 +0200 |
| Message-ID | <tDrDY-5WC-9@gated-at.bofh.it> (permalink) |
| References | <tDqoy-4PF-15@gated-at.bofh.it> <tDruh-5So-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, May 04, 2017 at 03:56:49PM +0000, David Laight wrote: > 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? At least in practice, gcc doesn't touch rbp in leaf functions. (I don't know about guarantees.) -- Josh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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