Skip to content

Commit 9e75e74

Browse files
brooniewilldeacon
authored andcommitted
arm64/signal: Document our convention for choosing magic numbers
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] [will: Fixed typo and tweaked wording] Signed-off-by: Will Deacon <[email protected]>
1 parent 657eef0 commit 9e75e74

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/include/uapi/asm/sigcontext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ struct sigcontext {
6262
* context. Such structures must be placed after the rt_sigframe on the stack
6363
* and be 16-byte aligned. The last structure must be a dummy one with the
6464
* magic and size set to 0.
65+
*
66+
* Note that the values allocated for use as magic should be chosen to
67+
* be meaningful in ASCII to aid manual parsing, ZA doesn't follow this
68+
* convention due to oversight but it should be observed for future additions.
6569
*/
6670
struct _aarch64_ctx {
6771
__u32 magic;

0 commit comments

Comments
 (0)