The 04/06/2022 19:50, Mark Brown wrote:
On Thu, Mar 31, 2022 at 04:05:38PM +0000, Szabolcs Nagy wrote:
i think it's slightly better to treat ZA like TPIDR2, so only clear if CLONE_SETTLS is set.
otherwise in principle the child can return to the frame where ZA was used and expect it to work (it's hard to come up with a reason why would some code do that, but this is valid in a single-threaded fork child).
From an implementation point of view it's a bit clearer if we just always preserve PSTATE.ZA and ZA contents on clone() and clear them on exec. Do you see a problem with that?
i think that's ok too.