diff options
author | Gabriel Krisman Bertazi <krisman@collabora.com> | 2020-10-04 06:25:27 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-10-26 15:46:46 +0300 |
commit | 375d4bfda57392f0865dae051e1c4bd2700e8d71 (patch) | |
tree | cc2258a1a4fef887012ee331b39f8fdeb35f81c5 /arch/x86/kernel/perf_regs.c | |
parent | 3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff) | |
download | linux-375d4bfda57392f0865dae051e1c4bd2700e8d71.tar.xz |
perf/x86: Avoid TIF_IA32 when checking 64bit mode
In preparation to remove TIF_IA32, stop using it in perf events code.
Tested by running perf on 32-bit, 64-bit and x32 applications.
Suggested-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20201004032536.1229030-2-krisman@collabora.com
Diffstat (limited to 'arch/x86/kernel/perf_regs.c')
-rw-r--r-- | arch/x86/kernel/perf_regs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/perf_regs.c b/arch/x86/kernel/perf_regs.c index bb7e1132290b..9332c49a64a8 100644 --- a/arch/x86/kernel/perf_regs.c +++ b/arch/x86/kernel/perf_regs.c @@ -123,7 +123,7 @@ int perf_reg_validate(u64 mask) u64 perf_reg_abi(struct task_struct *task) { - if (test_tsk_thread_flag(task, TIF_IA32)) + if (!user_64bit_mode(task_pt_regs(task))) return PERF_SAMPLE_REGS_ABI_32; else return PERF_SAMPLE_REGS_ABI_64; |