Re: [PATCH 3/4] arm64/signal: Add tpidr2/za/zt sigframe size in comment

From: Dongxu Sun
Date: Tue Mar 21 2023 - 22:42:16 EST


On 2023/3/17 21:03, Mark Brown wrote:
> On Fri, Mar 17, 2023 at 08:49:14PM +0800, Dongxu Sun wrote:
>
>> * 0x8a0 sve_context (vl <= 64) (optional)
>> + * 0x10 tpidr2_context (optional)
>> + * 0x10 za_context (optional)
>
> The size of the ZA context is variable, going with what the SVE has a VL
> which might fit into the base context should be included but that's
> complicated what with it likely appearing after another variably sized
> frame.
>
>> + * 0x10 zt_context (optional)
>
> The ZT context is never this small, it's always got register contents if
> present.

The context size of ZA and ZT here is wrong due to oversight. The ZA context size is related to the SVL, and the ZT context size may also get changed with further extensions.
>
>> * 0x20 extra_context (optional)
>> * 0x10 terminator (null _aarch64_ctx)
>> *
>> - * 0x510 (reserved for future allocation)
>> + * 0x4e0 (reserved for future allocation)
>
> TBH I'm not sure this comment is actually useful or helpful, it's
> already not fully taking into account the variablility of the SVE frame
> size (quoting a fixed value) and with the way we allocate things once
> we've gone into the extra_context we'll allocate new frames from there
> so even smaller frames like the tpidr2_context will go there. I'm not
> sure trying to suggest a layout/ordering is clarifying anything for
> anyone.

Thanks for your point, considering the scalability of SME/SME2, maybe there is no need to add layout suggestion. So, let's discard this commit:)

Thanks,
Dongxu