Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1724317
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 4/4] x86/asm: Use ASM_CALL() macro for inline asm statements with call instructions |
| Date | 2017-08-31 17:30 +0200 |
| Message-ID | <ukzzP-7k7-7@gated-at.bofh.it> (permalink) |
| References | <ukyu5-6Gt-5@gated-at.bofh.it> <ukyu5-6Gt-21@gated-at.bofh.it> <ukz6O-6TE-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 31, 2017 at 04:50:41PM +0200, Peter Zijlstra wrote: > On Thu, Aug 31, 2017 at 09:11:20AM -0500, Josh Poimboeuf wrote: > > Inline asm statements which have call instructions can be problematic. > > GCC doesn't know about the call instructions, so in some cases it can > > insert the asm before setting up the frame pointer. This can result in > > bad stack traces when unwinding from the called function. > > > > Previously we worked around this issue by listing the stack pointer as > > an input/output constraint for the inline asm. That works for GCC, but > > unfortunately it doesn't work for Clang. In fact, it causes Clang to > > corrupt the stack pointer. > > Sounds like it ought to get fixed regardless and then it might as well > do the right thing ;-) There was some disagreement about what the "right thing" is because it's an undocumented and unintuitive interface. And I use the term "interface" loosely. It was apparently a side effect which was mentioned to me on the GCC mailing list. -- Josh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/4] x86/asm: Add ASM_CALL() macro for inline asms with call instructions Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 16:20 +0200
[RFC PATCH 3/4] x86/asm: Make alternative macro interfaces more clear and consistent Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 16:20 +0200
Re: [RFC PATCH 3/4] x86/asm: Make alternative macro interfaces more clear and consistent Linus Torvalds <torvalds@linux-foundation.org> - 2017-08-31 18:20 +0200
Re: [RFC PATCH 3/4] x86/asm: Make alternative macro interfaces more clear and consistent Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 19:30 +0200
Re: [RFC PATCH 3/4] x86/asm: Make alternative macro interfaces more clear and consistent Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 19:40 +0200
Re: [RFC PATCH 3/4] x86/asm: Make alternative macro interfaces more clear and consistent Ingo Molnar <mingo@kernel.org> - 2017-09-02 12:40 +0200
[RFC PATCH 2/4] x86/asm: Convert some inline asm positional operands to named operands Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 16:20 +0200
[RFC PATCH 1/4] x86/paravirt: Fix output constraint macro names Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 16:20 +0200
[RFC PATCH 4/4] x86/asm: Use ASM_CALL() macro for inline asm statements with call instructions Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 16:20 +0200
Re: [RFC PATCH 4/4] x86/asm: Use ASM_CALL() macro for inline asm statements with call instructions Peter Zijlstra <peterz@infradead.org> - 2017-08-31 17:00 +0200
Re: [RFC PATCH 4/4] x86/asm: Use ASM_CALL() macro for inline asm statements with call instructions Josh Poimboeuf <jpoimboe@redhat.com> - 2017-08-31 17:30 +0200
Re: [RFC PATCH 4/4] x86/asm: Use ASM_CALL() macro for inline asm statements with call instructions Dmitry Vyukov <dvyukov@google.com> - 2017-08-31 17:50 +0200
csiph-web