[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210104105904.GK3021@hirez.programming.kicks-ass.net>
Date: Mon, 4 Jan 2021 11:59:04 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org, Xuefeng Li <lixuefeng@...ngson.cn>,
David Daney <david.daney@...ium.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Archer Yan <ayan@...ecomp.com>, x86@...nel.org
Subject: Re: [PATCH 1/3] MIPS: kernel: Support extracting off-line stack
traces from user-space with perf
On Tue, Dec 29, 2020 at 08:55:59PM +0800, Tiezhu Yang wrote:
> +u64 perf_reg_abi(struct task_struct *tsk)
> +{
> + if (test_tsk_thread_flag(tsk, TIF_32BIT_REGS))
> + return PERF_SAMPLE_REGS_ABI_32;
> + else
> + return PERF_SAMPLE_REGS_ABI_64;
> +}
So we recently changed this on x86 to not rely on TIF flags. IIRC the
problem is that on x86 you can change the mode of a task without the
kernel being aware of it. Is something like that possible on MIPS as
well?
The thing x86 does today is look at it's pt_regs state to determine the
actual state.
Powered by blists - more mailing lists