]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rseq: Clarify rseq registration rseq_size bound check comment
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 20 Feb 2026 20:06:40 +0000 (15:06 -0500)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 23 Feb 2026 10:19:19 +0000 (11:19 +0100)
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
kernel/rseq.c

index b0973d19f366efdf14a8fcfb2bd4806b9985a1e8..e349f86cc9452cf87437c3f50cd7c8cb5857c0a1 100644 (file)
@@ -449,8 +449,9 @@ SYSCALL_DEFINE4(rseq, struct rseq __user *, rseq, u32, rseq_len, int, flags, u32
         * auxiliary vector AT_RSEQ_ALIGN. If rseq_len is the original rseq
         * size, the required alignment is the original struct rseq alignment.
         *
-        * In order to be valid, rseq_len is either the original rseq size, or
-        * large enough to contain all supported fields, as communicated to
+        * The rseq_len is required to be greater or equal to the original rseq
+        * size. In order to be valid, rseq_len is either the original rseq size,
+        * or large enough to contain all supported fields, as communicated to
         * user-space through the ELF auxiliary vector AT_RSEQ_FEATURE_SIZE.
         */
        if (rseq_len < ORIG_RSEQ_SIZE ||