summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/uapi
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2017-06-15 15:03:41 +0100
committerWill Deacon <will.deacon@arm.com>2017-06-20 12:42:59 +0100
commitbb4322f74340de578bc61ed0cfb9690ddeb9ef76 (patch)
tree6977efdb0f0aa4d2fc60fbc10604a9708ab5af91 /arch/arm64/include/uapi
parentbb4891a6c3551f27fa4d548b87a66c258bdb100b (diff)
downloadlinux-bb4322f74340de578bc61ed0cfb9690ddeb9ef76.tar.gz
linux-bb4322f74340de578bc61ed0cfb9690ddeb9ef76.tar.bz2
linux-bb4322f74340de578bc61ed0cfb9690ddeb9ef76.zip
arm64: signal: factor out signal frame record allocation
This patch factors out the allocator for signal frame optional records into a separate function, to ensure consistency and facilitate later expansion. No overrun checking is currently done, because the allocation is in user memory and anyway the kernel never tries to allocate enough space in the signal frame yet for an overrun to occur. This behaviour will be refined in future patches. The approach taken in this patch to allocation of the terminator record is not very clean: this will also be replaced in subsequent patches. For future extension, a comment is added in sigcontext.h documenting the current static allocations in __reserved[]. This will be important for determining under what circumstances userspace may or may not see an expanded signal frame. Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/uapi')
-rw-r--r--arch/arm64/include/uapi/asm/sigcontext.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h
index ee469be1ae1d..1328a2c14371 100644
--- a/arch/arm64/include/uapi/asm/sigcontext.h
+++ b/arch/arm64/include/uapi/asm/sigcontext.h
@@ -34,6 +34,25 @@ struct sigcontext {
};
/*
+ * Allocation of __reserved[]:
+ * (Note: records do not necessarily occur in the order shown here.)
+ *
+ * size description
+ *
+ * 0x210 fpsimd_context
+ * 0x10 esr_context
+ * 0x10 terminator (null _aarch64_ctx)
+ *
+ * 0xdd0 (reserved for future allocation)
+ *
+ * New records that can exceed this space need to be opt-in for userspace, so
+ * that an expanded signal frame is not generated unexpectedly. The mechanism
+ * for opting in will depend on the extension that generates each new record.
+ * The above table documents the maximum set and sizes of records than can be
+ * generated when userspace does not opt in for any such extension.
+ */
+
+/*
* Header to be used at the beginning of structures extending the user
* context. Such structures must be placed after the rt_sigframe on the stack
* and be 16-byte aligned. The last structure must be a dummy one with the