Skip to contentSkip to conversation

rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries

RFC PATCH Applied Mathieu Desnoyers 4 participants 4 messages Jan 4, 2023 – Jan 12, 2023 ABI/API

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries

Two new auxiliary vector entries are introduced for rseq without matching increment of the AT_VECTOR_SIZE_BASE, which causes failures with CONFIG_HARDENED_USERCOPY=y.

Fixes 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")
---
 include/linux/auxvec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/auxvec.h +1 -1
index f68d0ec2d740..407f7005e6d6 100644
@@ -4,6 +4,6 @@
 
 #include <uapi/linux/auxvec.h>
 
-#define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */
+#define AT_VECTOR_SIZE_BASE 22 /* NEW_AUX_ENT entries in auxiliary table */
   /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */
 #endif /* _LINUX_AUXVEC_H */
Signature · 1 line
2.25.1
Tested-by on v1 1/1
#1 lore raw
Quoted 8 lines · Mathieu Desnoyers

Two new auxiliary vector entries are introduced for rseq without matching increment of the AT_VECTOR_SIZE_BASE, which causes failures with CONFIG_HARDENED_USERCOPY=y.

Fixes 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")

This resolves the boot failure with the configuration I tested:

Quoted 19 lines
---
 include/linux/auxvec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/auxvec.h +1 -1
index f68d0ec2d740..407f7005e6d6 100644
@@ -4,6 +4,6 @@
 
 #include <uapi/linux/auxvec.h>
 
-#define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */
+#define AT_VECTOR_SIZE_BASE 22 /* NEW_AUX_ENT entries in auxiliary table */
   /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */
 #endif /* _LINUX_AUXVEC_H */
Signature · 1 line
2.25.1
#2 lore raw
Quoted 5 lines · Nathan Chancellor
Quoted 4 lines · Mathieu Desnoyers

Two new auxiliary vector entries are introduced for rseq without matching increment of the AT_VECTOR_SIZE_BASE, which causes failures with CONFIG_HARDENED_USERCOPY=y.

Quoted 8 lines
Quoted 4 lines
Fixes 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")

This resolves the boot failure with the configuration I tested:

Thanks!

#3 lore raw

[tip: sched/core] rseq: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries

In reply to Mathieu Desnoyers
The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     28c8e088427ad30b4260953f3b6f908972b77c2d
Gitweb:        https://git.kernel.org/tip/28c8e088427ad30b4260953f3b6f908972b77c2d
Author:        Mathieu Desnoyers <[email protected]>
AuthorDate:    Wed, 04 Jan 2023 14:20:54 -05:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Thu, 12 Jan 2023 11:22:22 +01:00

rseq: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries

Two new auxiliary vector entries are introduced for rseq without matching increment of the AT_VECTOR_SIZE_BASE, which causes failures with CONFIG_HARDENED_USERCOPY=y.

Fixes 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")
---
 include/linux/auxvec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/auxvec.h +1 -1
index f68d0ec..407f700 100644
@@ -4,6 +4,6 @@
 
 #include <uapi/linux/auxvec.h>
 
-#define AT_VECTOR_SIZE_BASE 20 /* NEW_AUX_ENT entries in auxiliary table */
+#define AT_VECTOR_SIZE_BASE 22 /* NEW_AUX_ENT entries in auxiliary table */
   /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */
 #endif /* _LINUX_AUXVEC_H */