Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move kernel stack to vmap area (CONFIG_HAVE_ARCH_VMAP_STACK) #2

Open
kees opened this issue Sep 25, 2019 · 4 comments
Open

Move kernel stack to vmap area (CONFIG_HAVE_ARCH_VMAP_STACK) #2

kees opened this issue Sep 25, 2019 · 4 comments
Labels
[ARCH] mips Needed on the MIPS architecture (ARCH=mips) [ARCH] powerpc64 Needed on the 64-bit POWER architecture [ARCH] x86_32 Needed on the 32-bit x86 architecture (ARCH=i386) [ARCH-done] arm32 Finished on the 32-bit ARM architecture (ARCH=arm) [ARCH-done] arm64 Finished on the 64-bit ARM architecture (ARCH=arm64) [ARCH-done] powerpc32 Finished on the 32-bit POWER architecture [ARCH-done] riscv Finished on the RISC-V architecture (ARCH=riscv) [ARCH-done] s390 Finished on the s390 architecture (ARCH=s390) [ARCH-done] x86_64 Finished on the 64-bit x86 architecture (ARCH=x86) [Linux] v5.18 Released in Linux kernel v5.18

Comments

@kees
Copy link

kees commented Sep 25, 2019

Stack exhaustion attacks are able to write past the bottom of the stack into potentially neighboring memory allocations. To avoid this, kernel stacks should live in the vmap area to gain guard pages.

For many architectures, this has been implemented under CONFIG_HAVE_ARCH_VMAP_STACK with the option build-selected with CONFIG_VMAP_STACK.

@kees kees added [ARCH] arm32 Needed on the 32-bit ARM architecture (ARCH=arm) [ARCH] powerpc64 Needed on the 64-bit POWER architecture [ARCH-done] x86_64 Finished on the 64-bit x86 architecture (ARCH=x86) [ARCH-done] arm64 Finished on the 64-bit ARM architecture (ARCH=arm64) [ARCH-done] s390 Finished on the s390 architecture (ARCH=s390) [ARCH] x86_32 Needed on the 32-bit x86 architecture (ARCH=i386) [ARCH] riscv Needed on the RISC-V architecture (ARCH=riscv) [ARCH] mips Needed on the MIPS architecture (ARCH=mips) labels Sep 25, 2019
@ajdlinux
Copy link

For PowerPC, we're tracking this over at linuxppc/issues#57 - there are currently patches for some 32-bit platforms, we're hoping to take a look at 64-bit server (IBM) platforms soon.

@kees kees added the [ARCH-done] powerpc32 Finished on the 32-bit POWER architecture label May 26, 2020
@kees
Copy link
Author

kees commented May 26, 2020

@kees kees changed the title Move kernel stack to vmap area Move kernel stack to vmap area (HAVE_ARCH_VMAP_STACK) Sep 16, 2021
@kees kees changed the title Move kernel stack to vmap area (HAVE_ARCH_VMAP_STACK) Move kernel stack to vmap area (CONFIG_HAVE_ARCH_VMAP_STACK) Sep 16, 2021
@kees
Copy link
Author

kees commented Sep 16, 2021

riscv support in commit 31da94c

@kees kees added [ARCH-done] riscv Finished on the RISC-V architecture (ARCH=riscv) and removed [ARCH] riscv Needed on the RISC-V architecture (ARCH=riscv) labels Sep 16, 2021
@kees
Copy link
Author

kees commented Apr 7, 2022

arm32, commit a1c510d (v5.18).

@kees kees added [ARCH-done] arm32 Finished on the 32-bit ARM architecture (ARCH=arm) [Linux] v5.18 Released in Linux kernel v5.18 and removed [ARCH] arm32 Needed on the 32-bit ARM architecture (ARCH=arm) labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ARCH] mips Needed on the MIPS architecture (ARCH=mips) [ARCH] powerpc64 Needed on the 64-bit POWER architecture [ARCH] x86_32 Needed on the 32-bit x86 architecture (ARCH=i386) [ARCH-done] arm32 Finished on the 32-bit ARM architecture (ARCH=arm) [ARCH-done] arm64 Finished on the 64-bit ARM architecture (ARCH=arm64) [ARCH-done] powerpc32 Finished on the 32-bit POWER architecture [ARCH-done] riscv Finished on the RISC-V architecture (ARCH=riscv) [ARCH-done] s390 Finished on the s390 architecture (ARCH=s390) [ARCH-done] x86_64 Finished on the 64-bit x86 architecture (ARCH=x86) [Linux] v5.18 Released in Linux kernel v5.18
Projects
None yet
Development

No branches or pull requests

3 participants