Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rseq: Clarify rseq registration rseq_size bound check comment

The rseq registration validates that the rseq_size argument is greater
or equal to 32 (the original rseq size), but the comment associated with
this check does not clearly state this.

Clarify the comment to that effect.

Fixes: ee3e3ac05c26 ("rseq: Introduce extensible rseq ABI")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260220200642.1317826-2-mathieu.desnoyers@efficios.com

authored by

Mathieu Desnoyers and committed by
Peter Zijlstra
26d43a90 5324953c

+3 -2
+3 -2
kernel/rseq.c
··· 449 449 * auxiliary vector AT_RSEQ_ALIGN. If rseq_len is the original rseq 450 450 * size, the required alignment is the original struct rseq alignment. 451 451 * 452 - * In order to be valid, rseq_len is either the original rseq size, or 453 - * large enough to contain all supported fields, as communicated to 452 + * The rseq_len is required to be greater or equal to the original rseq 453 + * size. In order to be valid, rseq_len is either the original rseq size, 454 + * or large enough to contain all supported fields, as communicated to 454 455 * user-space through the ELF auxiliary vector AT_RSEQ_FEATURE_SIZE. 455 456 */ 456 457 if (rseq_len < ORIG_RSEQ_SIZE ||