[PATCH 0/8] arm64: set VMAP_STACK by default

Breno Leitao posted 8 patches 3 months ago
arch/arm64/Kconfig                  |  1 +
arch/arm64/include/asm/memory.h     |  6 +-----
arch/arm64/include/asm/stacktrace.h |  6 +-----
arch/arm64/kernel/efi.c             |  5 -----
arch/arm64/kernel/entry-common.c    |  2 --
arch/arm64/kernel/entry.S           |  6 ------
arch/arm64/kernel/irq.c             | 13 -------------
arch/arm64/kernel/sdei.c            |  8 ++------
arch/arm64/kernel/stacktrace.c      |  4 +---
arch/arm64/kernel/traps.c           |  3 ---
10 files changed, 6 insertions(+), 48 deletions(-)
[PATCH 0/8] arm64: set VMAP_STACK by default
Posted by Breno Leitao 3 months ago
Hi all,

This patchset select VMAP_STACK on arm64 by default, and cleans up the
code by removing all associated CONFIG_VMAP_STACK conditionals.

This is a suggestion from Will Deacon from another discussion[1].

With VMAP_STACK now always enabled on arm64, the code can be
significantly simplified, reducing complexity and potential for
misconfiguration.

Overview of Changes

    * Remove all #ifdef CONFIG_VMAP_STACK and related runtime checks
      throughout the architecture codebase.
    * Replace runtime checks with build-time assertions where
      appropriate.

Link: https://lore.kernel.org/all/aGfYL8eXjTA9puQr@willie-the-truck/ [1]

Signed-off-by: Breno Leitao <leitao@debian.org>
---
Breno Leitao (8):
      arm64: Enable VMAP_STACK support
      arm64: efi: Remove CONFIG_VMAP_STACK check
      arm64: Remove CONFIG_VMAP_STACK conditionals from THREAD_SHIFT and THREAD_ALIGN
      arm64: remove CONFIG_VMAP_STACK conditionals from irq stack setup
      arm64: remove CONFIG_VMAP_STACK conditionals from traps overflow stack
      arm64: remove CONFIG_VMAP_STACK checks from stacktrace overflow logic
      arm64: remove CONFIG_VMAP_STACK checks from SDEI stack handling
      arm64: remove CONFIG_VMAP_STACK checks from entry code

 arch/arm64/Kconfig                  |  1 +
 arch/arm64/include/asm/memory.h     |  6 +-----
 arch/arm64/include/asm/stacktrace.h |  6 +-----
 arch/arm64/kernel/efi.c             |  5 -----
 arch/arm64/kernel/entry-common.c    |  2 --
 arch/arm64/kernel/entry.S           |  6 ------
 arch/arm64/kernel/irq.c             | 13 -------------
 arch/arm64/kernel/sdei.c            |  8 ++------
 arch/arm64/kernel/stacktrace.c      |  4 +---
 arch/arm64/kernel/traps.c           |  3 ---
 10 files changed, 6 insertions(+), 48 deletions(-)
---
base-commit: 9dd1757493416310a5e71146a08bc228869f8dae
change-id: 20250707-arm64_vmap-fa70ba3c9cfb

Best regards,
-- 
Breno Leitao <leitao@debian.org>
Re: [PATCH 0/8] arm64: set VMAP_STACK by default
Posted by Will Deacon 3 months ago
On Mon, 07 Jul 2025 09:01:00 -0700, Breno Leitao wrote:
> This patchset select VMAP_STACK on arm64 by default, and cleans up the
> code by removing all associated CONFIG_VMAP_STACK conditionals.
> 
> This is a suggestion from Will Deacon from another discussion[1].
> 
> With VMAP_STACK now always enabled on arm64, the code can be
> significantly simplified, reducing complexity and potential for
> misconfiguration.
> 
> [...]

Applied to arm64 (for-next/vmap-stack), thanks!

[1/8] arm64: Enable VMAP_STACK support
      https://git.kernel.org/arm64/c/ef6861b8e6dd
[2/8] arm64: efi: Remove CONFIG_VMAP_STACK check
      https://git.kernel.org/arm64/c/63829521a8e8
[3/8] arm64: Remove CONFIG_VMAP_STACK conditionals from THREAD_SHIFT and THREAD_ALIGN
      https://git.kernel.org/arm64/c/0909c719c17b
[4/8] arm64: remove CONFIG_VMAP_STACK conditionals from irq stack setup
      https://git.kernel.org/arm64/c/c4a5699d5cef
[5/8] arm64: remove CONFIG_VMAP_STACK conditionals from traps overflow stack
      https://git.kernel.org/arm64/c/e5692bba1e66
[6/8] arm64: remove CONFIG_VMAP_STACK checks from stacktrace overflow logic
      https://git.kernel.org/arm64/c/907cb5cd8efd
[7/8] arm64: remove CONFIG_VMAP_STACK checks from SDEI stack handling
      https://git.kernel.org/arm64/c/3e72b9e9f01a
[8/8] arm64: remove CONFIG_VMAP_STACK checks from entry code
      https://git.kernel.org/arm64/c/9d1869f0f537

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
Re: [PATCH 0/8] arm64: set VMAP_STACK by default
Posted by Ard Biesheuvel 3 months ago
On Tue, 8 Jul 2025 at 02:01, Breno Leitao <leitao@debian.org> wrote:
>
> Hi all,
>
> This patchset select VMAP_STACK on arm64 by default, and cleans up the
> code by removing all associated CONFIG_VMAP_STACK conditionals.
>
> This is a suggestion from Will Deacon from another discussion[1].
>
> With VMAP_STACK now always enabled on arm64, the code can be
> significantly simplified, reducing complexity and potential for
> misconfiguration.
>
> Overview of Changes
>
>     * Remove all #ifdef CONFIG_VMAP_STACK and related runtime checks
>       throughout the architecture codebase.
>     * Replace runtime checks with build-time assertions where
>       appropriate.
>
> Link: https://lore.kernel.org/all/aGfYL8eXjTA9puQr@willie-the-truck/ [1]
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> Breno Leitao (8):
>       arm64: Enable VMAP_STACK support
>       arm64: efi: Remove CONFIG_VMAP_STACK check
>       arm64: Remove CONFIG_VMAP_STACK conditionals from THREAD_SHIFT and THREAD_ALIGN
>       arm64: remove CONFIG_VMAP_STACK conditionals from irq stack setup
>       arm64: remove CONFIG_VMAP_STACK conditionals from traps overflow stack
>       arm64: remove CONFIG_VMAP_STACK checks from stacktrace overflow logic
>       arm64: remove CONFIG_VMAP_STACK checks from SDEI stack handling
>       arm64: remove CONFIG_VMAP_STACK checks from entry code
>

For the series,

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Re: [PATCH 0/8] arm64: set VMAP_STACK by default
Posted by Mark Rutland 3 months ago
On Mon, Jul 07, 2025 at 09:01:00AM -0700, Breno Leitao wrote:
> Hi all,
> 
> This patchset select VMAP_STACK on arm64 by default, and cleans up the
> code by removing all associated CONFIG_VMAP_STACK conditionals.
> 
> This is a suggestion from Will Deacon from another discussion[1].
> 
> With VMAP_STACK now always enabled on arm64, the code can be
> significantly simplified, reducing complexity and potential for
> misconfiguration.
> 
> Overview of Changes
> 
>     * Remove all #ifdef CONFIG_VMAP_STACK and related runtime checks
>       throughout the architecture codebase.
>     * Replace runtime checks with build-time assertions where
>       appropriate.
> 
> Link: https://lore.kernel.org/all/aGfYL8eXjTA9puQr@willie-the-truck/ [1]
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>

Nice!

Aside from a minor comment on the first patch, this all looks good to
me. For the series:

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
> Breno Leitao (8):
>       arm64: Enable VMAP_STACK support
>       arm64: efi: Remove CONFIG_VMAP_STACK check
>       arm64: Remove CONFIG_VMAP_STACK conditionals from THREAD_SHIFT and THREAD_ALIGN
>       arm64: remove CONFIG_VMAP_STACK conditionals from irq stack setup
>       arm64: remove CONFIG_VMAP_STACK conditionals from traps overflow stack
>       arm64: remove CONFIG_VMAP_STACK checks from stacktrace overflow logic
>       arm64: remove CONFIG_VMAP_STACK checks from SDEI stack handling
>       arm64: remove CONFIG_VMAP_STACK checks from entry code
> 
>  arch/arm64/Kconfig                  |  1 +
>  arch/arm64/include/asm/memory.h     |  6 +-----
>  arch/arm64/include/asm/stacktrace.h |  6 +-----
>  arch/arm64/kernel/efi.c             |  5 -----
>  arch/arm64/kernel/entry-common.c    |  2 --
>  arch/arm64/kernel/entry.S           |  6 ------
>  arch/arm64/kernel/irq.c             | 13 -------------
>  arch/arm64/kernel/sdei.c            |  8 ++------
>  arch/arm64/kernel/stacktrace.c      |  4 +---
>  arch/arm64/kernel/traps.c           |  3 ---
>  10 files changed, 6 insertions(+), 48 deletions(-)
> ---
> base-commit: 9dd1757493416310a5e71146a08bc228869f8dae
> change-id: 20250707-arm64_vmap-fa70ba3c9cfb
> 
> Best regards,
> -- 
> Breno Leitao <leitao@debian.org>
>