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


Groups > linux.kernel > #1379187 > unrolled thread

[PATCH 4/4] x86/oprofile: down with test_thread_flag(TIF_IA32)

Started byDmitry Safonov <dsafonov@virtuozzo.com>
First post2016-04-14 20:20 +0200
Last post2016-04-14 21:40 +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

  [PATCH 4/4] x86/oprofile: down with test_thread_flag(TIF_IA32) Dmitry Safonov <dsafonov@virtuozzo.com> - 2016-04-14 20:20 +0200
    Re: [PATCH 4/4] x86/oprofile: down with test_thread_flag(TIF_IA32) Andy Lutomirski <luto@amacapital.net> - 2016-04-14 21:40 +0200

#1379187 — [PATCH 4/4] x86/oprofile: down with test_thread_flag(TIF_IA32)

FromDmitry Safonov <dsafonov@virtuozzo.com>
Date2016-04-14 20:20 +0200
Subject[PATCH 4/4] x86/oprofile: down with test_thread_flag(TIF_IA32)
Message-ID<rnU1X-6dp-1@gated-at.bofh.it>
As we have here full register set - just use user_64bit_mode
on it.

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
---
 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))
 		return 0;
 
 	head = (struct stack_frame_ia32 *) regs->bp;
-- 
2.8.0

[toc] | [next] | [standalone]


#1379263

FromAndy Lutomirski <luto@amacapital.net>
Date2016-04-14 21:40 +0200
Message-ID<rnVho-7bz-19@gated-at.bofh.it>
In reply to#1379187
On Thu, Apr 14, 2016 at 11:10 AM, Dmitry Safonov <dsafonov@virtuozzo.com> wrote:
> As we have here full register set - just use user_64bit_mode
> on it.
>
> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
> ---
>  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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web