[PATCH 3/5] arm64: signal: factor frame layout and population into separate passes

Catalin Marinas catalin.marinas at arm.com
Thu Jun 15 10:20:15 PDT 2017


On Thu, Jun 15, 2017 at 03:03:40PM +0100, Dave P Martin wrote:
> In preparation for expanding the signal frame, this patch refactors
> the signal frame setup code in setup_sigframe() into two separate
> passes.
> 
> The first pass, setup_sigframe_layout(), determines the size of the
> signal frame and its internal layout, including the presence and
> location of optional records.  The resulting knowledge is used to
> allocate and locate the user stack space required for the signal
> frame and to determine which optional records to include.
> 
> The second pass, setup_sigframe(), is called once the stack frame
> is allocated in order to populate it with the necessary context
> information.
> 
> As a result of these changes, it becomes more natural to represent
> locations in the signal frame by a base pointer and an offset,
> since the absolute address of each location is not known during the
> layout pass.  To be more consistent with this logic,
> parse_user_sigframe() is refactored to describe signal frame
> locations in a similar way.
> 
> This change has no effect on the signal ABI, but will make it
> easier to expand the signal frame in future patches.
> 
> Signed-off-by: Dave Martin <Dave.Martin at arm.com>

Reviewed-by: Catalin Marinas <catalin.marinas at arm.com>



More information about the linux-arm-kernel mailing list