[PATCH] arm64/ptrace: Ensure that the task sees ZT writes on first use

Mark Brown broonie at kernel.org
Wed Aug 16 07:31:57 PDT 2023


On Wed, Aug 16, 2023 at 03:22:19PM +0100, Will Deacon wrote:
> On Mon, Aug 14, 2023 at 10:27:51PM +0100, Mark Brown wrote:

> > @@ -1182,6 +1187,8 @@ static int zt_set(struct task_struct *target,
> >  	if (ret == 0)
> >  		target->thread.svcr |= SVCR_ZA_MASK;
> >  
> > +	set_tsk_thread_flag(target, TIF_SME);

> Hmm, this is now weirdly inconsistent with za_set(), which doesn't touch
> the thread flag unless the regset copy succeeds. Is that intentional?

Not particularly, it's just a product of the more complex parsing that
ZA needs due to the variable size and optional payload.  Either way is
fine so long as we allocated the storage but it would be better if they
were consistent, I'll update this to match what ZA does.
-------------- 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/20230816/c033177b/attachment.sig>


More information about the linux-arm-kernel mailing list