On Tue, Dec 29, 2020 at 08:55:59PM +0800, Tiezhu Yang wrote:
+u64 perf_reg_abi(struct task_struct *tsk)So we recently changed this on x86 to not rely on TIF flags. IIRC the
+{
+ if (test_tsk_thread_flag(tsk, TIF_32BIT_REGS))
+ return PERF_SAMPLE_REGS_ABI_32;
+ else
+ return PERF_SAMPLE_REGS_ABI_64;
+}
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 theIt is possible to look at pt_regs Status.UX bit on MIPS. But it seems unnecessary
actual state.