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

Mark Brown broonie at kernel.org
Tue Nov 15 09:13:39 PST 2022


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20221115/937a233d/attachment.sig>


More information about the linux-arm-kernel mailing list