Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1686090
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" |
| Date | 2017-07-13 00:40 +0200 |
| Message-ID | <u2ysz-5Ke-29@gated-at.bofh.it> (permalink) |
| References | <u2xmP-53z-29@gated-at.bofh.it> <u2y9c-5zv-11@gated-at.bofh.it> <u2yiS-5DX-9@gated-at.bofh.it> <u2ysy-5Ke-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 12, 2017 at 05:35:47PM -0500, Josh Poimboeuf wrote:
> On Wed, Jul 12, 2017 at 03:20:40PM -0700, Matthias Kaehlcke wrote:
> > > This is admittedly an awkward way of achieving this goal, but it's the
> > > only way I know how to do it with GCC.
> > >
> > > What extra instruction does clang add?
> >
> > I was looking at the get_user() call in drm_mode_setcrtc(). The code
> > generated by clang without the patch is:
> >
> > if (get_user(out_id, &set_connectors_ptr[i])) {
> > ffffffff81386955: 4a 8d 04 bd 00 00 00 lea 0x0(,%r15,4),%rax
> > ffffffff8138695c: 00
> > ffffffff8138695d: 49 03 06 add (%r14),%rax
> > ffffffff81386960: e8 2b a5 f0 ff callq ffffffff81290e90 <__get_user_4>
> >
> > And with the patch:
> >
> > if (get_user(out_id, &set_connectors_ptr[i])) {
> > ffffffff81386a56: 4a 8d 04 bd 00 00 00 lea 0x0(,%r15,4),%rax
> > ffffffff81386a5d: 00
> > ffffffff81386a5e: 49 03 06 add (%r14),%rax
> > ffffffff81386a61: 48 8b 64 24 28 mov 0x28(%rsp),%rsp
> > ffffffff81386a66: e8 15 a5 f0 ff callq
> > ffffffff81290f80 <__get_user_4>
>
> Hm, that seems odd. Can you sure the disassembly for the whole
> function?
Er, share :-)
--
Josh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Matthias Kaehlcke <mka@chromium.org> - 2017-07-12 23:30 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 00:20 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Matthias Kaehlcke <mka@chromium.org> - 2017-07-13 00:30 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 00:40 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 00:40 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 20:10 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Matthias Kaehlcke <mka@chromium.org> - 2017-07-13 20:50 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 21:30 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Michael Davidson <md@google.com> - 2017-07-13 21:40 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 22:20 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Andrey Rybainin <ryabinin.a.a@gmail.com> - 2017-07-13 22:30 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 22:40 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Matthias Kaehlcke <mka@chromium.org> - 2017-07-13 23:20 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-13 23:40 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Matthias Kaehlcke <mka@chromium.org> - 2017-07-14 00:00 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Matthias Kaehlcke <mka@chromium.org> - 2017-07-13 23:20 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Andrey Rybainin <ryabinin.a.a@gmail.com> - 2017-07-13 23:30 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Matthias Kaehlcke <mka@chromium.org> - 2017-07-13 23:50 +0200
Re: [PATCH] Revert "x86/uaccess: Add stack frame output operand in get_user() inline asm" Josh Poimboeuf <jpoimboe@redhat.com> - 2017-07-14 00:00 +0200
csiph-web