[PATCH v1] arm64/signal: Document our convention for choosing magic numbers
Mark Brown
broonie at kernel.org
Mon Oct 31 12:24:50 PDT 2022
Szabolcs Nagy has pointed out that most of our signal frame magic numbers
are chosen to be meaningful ASCII when dumped to aid manual parsing. This
seems sensible since it might help someone parsing things out, let's
document it so people implementing new signal contexts are aware of it and
are more likely to follow it.
Signed-off-by: Mark Brown <broonie at kernel.org>
---
arch/arm64/include/uapi/asm/sigcontext.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/include/uapi/asm/sigcontext.h b/arch/arm64/include/uapi/asm/sigcontext.h
index 4aaf31e3bf16..32db6c6adc94 100644
--- a/arch/arm64/include/uapi/asm/sigcontext.h
+++ b/arch/arm64/include/uapi/asm/sigcontext.h
@@ -62,6 +62,11 @@ struct sigcontext {
* 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
* magic and size set to 0.
+ *
+ * Note that the values allocated for use as magic should be chosen to
+ * be meanigful in ASCII to aid manual parsing, ZA doesn't follow this
+ * convention due to oversight but it should be observed going
+ * forwards.
*/
struct _aarch64_ctx {
__u32 magic;
base-commit: 30a0b95b1335e12efef89dd78518ed3e4a71a763
--
2.30.2
More information about the linux-arm-kernel
mailing list