Skip to contentSkip to conversation

mips: question about switch_to()->__sanitize_fcr31()

DISCUSSION Oleg Nesterov 1 participant 2 messages Nov 21, 2023 – Nov 28, 2023 MIPS

lore
Share & tools
lore
#0 lore raw

Hello,

I know absolutely nothing about arch/mips, I can't even find the definition of "current" or the caller of switch_to().

So, __sanitize_fcr31() is called by switch_to() and it does force_fcr31_sig(fcr31, pc, next).

Was "current" already updated at this stage so that next == current?

Why I am asking. I want to add

	// otherwise the usage of ->siglock is not safe
	WARN_ON(!(t == current || task_is_traced(t)));

into force_sig_info_to_task() and simplify it a bit, but I don't know if "t == current" is already true at the start of switch_to().

Thanks,

Oleg.

#1 lore raw

ping.

Quoted 24 lines · Oleg Nesterov

Hello,

I know absolutely nothing about arch/mips, I can't even find the definition of "current" or the caller of switch_to().

So, __sanitize_fcr31() is called by switch_to() and it does force_fcr31_sig(fcr31, pc, next).

Was "current" already updated at this stage so that next == current?

Why I am asking. I want to add

	// otherwise the usage of ->siglock is not safe
	WARN_ON(!(t == current || task_is_traced(t)));

into force_sig_info_to_task() and simplify it a bit, but I don't know if "t == current" is already true at the start of switch_to().

Thanks,

Oleg.