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


Groups > linux.kernel > #1383313 > unrolled thread

Re: [PATCH 3/4] x86/intel lbr: down with test_thread_flag(TIF_IA32)

Started byPeter Zijlstra <peterz@infradead.org>
First post2016-04-20 13:30 +0200
Last post2016-04-20 16:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/4] x86/intel lbr: down with test_thread_flag(TIF_IA32) Peter Zijlstra <peterz@infradead.org> - 2016-04-20 13:30 +0200
    Re: [PATCH 3/4] x86/intel lbr: down with test_thread_flag(TIF_IA32) Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-04-20 16:00 +0200

#1383313 — Re: [PATCH 3/4] x86/intel lbr: down with test_thread_flag(TIF_IA32)

FromPeter Zijlstra <peterz@infradead.org>
Date2016-04-20 13:30 +0200
SubjectRe: [PATCH 3/4] x86/intel lbr: down with test_thread_flag(TIF_IA32)
Message-ID<rpYuv-75L-29@gated-at.bofh.it>
On Thu, Apr 14, 2016 at 12:29:12PM -0700, Andy Lutomirski wrote:
> On Thu, Apr 14, 2016 at 11:10 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:

> > @@ -724,7 +727,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
> >          * on 64-bit systems running 32-bit apps
> >          */
> >  #ifdef CONFIG_X86_64
> > -       is64 = kernel_ip((unsigned long)addr) || !test_thread_flag(TIF_IA32);
> > +       is64 = kernel_ip((unsigned long)addr) || user_64bit_mode(regs);
> 
> Peterz, looking at this some more, would it make sense to pass
> user_regs and interrupt_regs (or whatever we'd call it) all the way
> through to here?

Urgh; again, wtf wasn't I Cc'ed to these patches?

And not sure; if we never need the user regs, calling
perf_get_user_regs() to set all that up seems like a massive waste of
cycles.

[toc] | [next] | [standalone]


#1383417

FromDmitry Safonov <dsafonov@virtuozzo.com>
Date2016-04-20 16:00 +0200
Message-ID<rq0PE-jH-23@gated-at.bofh.it>
In reply to#1383313
On 04/20/2016 02:21 PM, Peter Zijlstra wrote:
> On Thu, Apr 14, 2016 at 12:29:12PM -0700, Andy Lutomirski wrote:
>> On Thu, Apr 14, 2016 at 11:10 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
>>> @@ -724,7 +727,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
>>>           * on 64-bit systems running 32-bit apps
>>>           */
>>>   #ifdef CONFIG_X86_64
>>> -       is64 = kernel_ip((unsigned long)addr) || !test_thread_flag(TIF_IA32);
>>> +       is64 = kernel_ip((unsigned long)addr) || user_64bit_mode(regs);
>> Peterz, looking at this some more, would it make sense to pass
>> user_regs and interrupt_regs (or whatever we'd call it) all the way
>> through to here?
> Urgh; again, wtf wasn't I Cc'ed to these patches?

Sorry for that - that was my unintentional miss on git-send-email.

> And not sure; if we never need the user regs, calling
> perf_get_user_regs() to set all that up seems like a massive waste of
> cycles.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web