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

From: Mark Brown
Date: Fri Mar 17 2023 - 09:03:48 EST


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.

> * 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.

Attachment: signature.asc
Description: PGP signature