Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbcDNTaQ (ORCPT ); Thu, 14 Apr 2016 15:30:16 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:36111 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750724AbcDNTaO (ORCPT ); Thu, 14 Apr 2016 15:30:14 -0400 MIME-Version: 1.0 In-Reply-To: <1460657414-12530-5-git-send-email-dsafonov@virtuozzo.com> References: <1460657414-12530-1-git-send-email-dsafonov@virtuozzo.com> <1460657414-12530-5-git-send-email-dsafonov@virtuozzo.com> From: Andy Lutomirski Date: Thu, 14 Apr 2016 12:29:53 -0700 Message-ID: Subject: Re: [PATCH 4/4] x86/oprofile: down with test_thread_flag(TIF_IA32) To: Dmitry Safonov Cc: "linux-kernel@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Robert Richter , oprofile-list@lists.sf.net, Dmitry Safonov <0x7f454c46@gmail.com> Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 987 Lines: 34 On Thu, Apr 14, 2016 at 11:10 AM, Dmitry Safonov wrote: > As we have here full register set - just use user_64bit_mode > on it. > > Signed-off-by: Dmitry Safonov > --- > arch/x86/oprofile/backtrace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/oprofile/backtrace.c b/arch/x86/oprofile/backtrace.c > index cb31a4440e58..405dadaee74a 100644 > --- a/arch/x86/oprofile/backtrace.c > +++ b/arch/x86/oprofile/backtrace.c > @@ -69,7 +69,7 @@ x86_backtrace_32(struct pt_regs * const regs, unsigned int depth) > struct stack_frame_ia32 *head; > > /* User process is IA32 */ > - if (!current || !test_thread_flag(TIF_IA32)) > + if (!current || user_64bit_mode(regs)) This is presumably okay, but I know nothing about oprofile. > return 0; > > head = (struct stack_frame_ia32 *) regs->bp; > -- > 2.8.0 > -- Andy Lutomirski AMA Capital Management, LLC