[PATCH v2 2/4] arm64/signal: Include TPIDR2 in the signal context

Will Deacon will at kernel.org
Fri Nov 18 05:53:43 PST 2022


On Tue, Nov 15, 2022 at 05:13:39PM +0000, Mark Brown wrote:
> On Mon, Nov 14, 2022 at 04:10:06PM +0000, Will Deacon wrote:
> > On Mon, Oct 31, 2022 at 08:17:34PM +0000, Mark Brown wrote:
> 
> > > +	__get_user_error(tpidr2_el0, &user->tpidr2->tpidr2, err);
> > > +	if (!err)
> > > +		current->thread.tpidr2_el0 = tpidr2_el0;
> 
> > What guarantees this makes its way into the hardware register before we
> > return to userspace, context switch or deliver another signal?
> 
> Context switch is handled, part of context switch is to restore
> the value from the task struct, but other cases aren't AFAICT.
> This is in general an oversight in our signal testing framework,
> it does not have a pattern of validating values set in signals.

Right, but my question is about going to userspace _before_ we context
switch, so I think there's an issue here.

Will



More information about the linux-arm-kernel mailing list