mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries
@ 2023-01-04 19:20 Mathieu Desnoyers
  2023-01-04 19:24 ` Nathan Chancellor
  2023-01-12 15:18 ` [tip: sched/core] rseq: " tip-bot2 for Mathieu Desnoyers
  0 siblings, 2 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2023-01-04 19:20 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: linux-kernel, Thomas Gleixner, Paul E . McKenney, Boqun Feng,
	H . Peter Anvin, Paul Turner, linux-api, Christian Brauner,
	Florian Weimer, David.Laight, carlos, Peter Oskolkov,
	Alexander Mikhalitsyn, Chris Kennelly, Mathieu Desnoyers,
	Nathan Chancellor

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.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/Y7XJKZhuU9VJZQ11@dev-arch.thelio-3990X
Fixes: 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
---
 include/linux/auxvec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h
index f68d0ec2d740..407f7005e6d6 100644
--- a/include/linux/auxvec.h
+++ b/include/linux/auxvec.h
@@ -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 */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries
  2023-01-04 19:20 [RFC PATCH tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries Mathieu Desnoyers
@ 2023-01-04 19:24 ` Nathan Chancellor
  2023-01-11 14:15   ` Peter Zijlstra
  2023-01-12 15:18 ` [tip: sched/core] rseq: " tip-bot2 for Mathieu Desnoyers
  1 sibling, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2023-01-04 19:24 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Peter Zijlstra, linux-kernel, Thomas Gleixner, Paul E . McKenney,
	Boqun Feng, H . Peter Anvin, Paul Turner, linux-api,
	Christian Brauner, Florian Weimer, David.Laight, carlos,
	Peter Oskolkov, Alexander Mikhalitsyn, Chris Kennelly

On Wed, Jan 04, 2023 at 02:20:54PM -0500, Mathieu Desnoyers wrote:
> 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.
> 
> Reported-by: Nathan Chancellor <nathan@kernel.org>
> Link: https://lore.kernel.org/r/Y7XJKZhuU9VJZQ11@dev-arch.thelio-3990X
> Fixes: 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

This resolves the boot failure with the configuration I tested:

Tested-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  include/linux/auxvec.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h
> index f68d0ec2d740..407f7005e6d6 100644
> --- a/include/linux/auxvec.h
> +++ b/include/linux/auxvec.h
> @@ -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 */
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries
  2023-01-04 19:24 ` Nathan Chancellor
@ 2023-01-11 14:15   ` Peter Zijlstra
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2023-01-11 14:15 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Mathieu Desnoyers, linux-kernel, Thomas Gleixner,
	Paul E . McKenney, Boqun Feng, H . Peter Anvin, Paul Turner,
	linux-api, Christian Brauner, Florian Weimer, David.Laight,
	carlos, Peter Oskolkov, Alexander Mikhalitsyn, Chris Kennelly

On Wed, Jan 04, 2023 at 12:24:09PM -0700, Nathan Chancellor wrote:
> On Wed, Jan 04, 2023 at 02:20:54PM -0500, Mathieu Desnoyers wrote:
> > 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.
> > 
> > Reported-by: Nathan Chancellor <nathan@kernel.org>
> > Link: https://lore.kernel.org/r/Y7XJKZhuU9VJZQ11@dev-arch.thelio-3990X
> > Fixes: 317c8194e6ae ("rseq: Introduce feature size and alignment ELF auxiliary vector entries")
> > Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> 
> This resolves the boot failure with the configuration I tested:
> 
> Tested-by: Nathan Chancellor <nathan@kernel.org>

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip: sched/core] rseq: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries
  2023-01-04 19:20 [RFC PATCH tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries Mathieu Desnoyers
  2023-01-04 19:24 ` Nathan Chancellor
@ 2023-01-12 15:18 ` tip-bot2 for Mathieu Desnoyers
  1 sibling, 0 replies; 4+ messages in thread
From: tip-bot2 for Mathieu Desnoyers @ 2023-01-12 15:18 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Nathan Chancellor, Mathieu Desnoyers, Peter Zijlstra (Intel),
	x86, linux-kernel

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 <mathieu.desnoyers@efficios.com>
AuthorDate:    Wed, 04 Jan 2023 14:20:54 -05:00
Committer:     Peter Zijlstra <peterz@infradead.org>
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")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20230104192054.34046-1-mathieu.desnoyers@efficios.com
---
 include/linux/auxvec.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h
index f68d0ec..407f700 100644
--- a/include/linux/auxvec.h
+++ b/include/linux/auxvec.h
@@ -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 */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-12 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 19:20 [RFC PATCH tip] rseq: Fix: Increase AT_VECTOR_SIZE_BASE to match rseq auxvec entries Mathieu Desnoyers
2023-01-04 19:24 ` Nathan Chancellor
2023-01-11 14:15   ` Peter Zijlstra
2023-01-12 15:18 ` [tip: sched/core] rseq: " tip-bot2 for Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®