Find a file
Nam Cao c67ddf59ac
riscv: force PAGE_SIZE linear mapping if debug_pagealloc is enabled
debug_pagealloc is a debug feature which clears the valid bit in page table
entry for freed pages to detect illegal accesses to freed memory.

For this feature to work, virtual mapping must have PAGE_SIZE resolution.
(No, we cannot map with huge pages and split them only when needed; because
pages can be allocated/freed in atomic context and page splitting cannot be
done in atomic context)

Force linear mapping to use small pages if debug_pagealloc is enabled.

Note that it is not necessary to force the entire linear mapping, but only
those that are given to memory allocator. Some parts of memory can keep
using huge page mapping (for example, kernel's executable code). But these
parts are minority, so keep it simple. This is just a debug feature, some
extra overhead should be acceptable.

Fixes: 5fde3db5eb ("riscv: add ARCH_SUPPORTS_DEBUG_PAGEALLOC support")
Signed-off-by: Nam Cao <namcao@linutronix.de>
Cc: stable@vger.kernel.org
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/2e391fa6c6f9b3fcf1b41cefbace02ee4ab4bf59.1715750938.git.namcao@linutronix.de
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-05-22 09:15:08 -07:00
arch riscv: force PAGE_SIZE linear mapping if debug_pagealloc is enabled 2024-05-22 09:15:08 -07:00
block
certs
crypto RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
Documentation A set of x86 fixes: 2024-03-24 11:13:56 -07:00
drivers EFI fixes for v6.9 #2 2024-03-24 13:54:06 -07:00
fs A patch to minimize blockage when processing very large batches of 2024-03-22 11:15:45 -07:00
include powerpc updates for 6.9 #2 2024-03-23 09:21:26 -07:00
init RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
io_uring
ipc
kernel dma-mapping fixes for Linux 6.9 2024-03-24 10:45:31 -07:00
lib hardening fixes for v6.9-rc1 2024-03-23 08:43:21 -07:00
LICENSES
mm RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
net Including fixes from CAN, netfilter, wireguard and IPsec. 2024-03-21 14:50:39 -07:00
rust Kbuild updates for v6.9 2024-03-21 14:41:00 -07:00
samples
scripts LoongArch changes for v6.9 2024-03-22 10:22:45 -07:00
security
sound sound fixes #2 for 6.9-rc2 2024-03-22 09:44:19 -07:00
tools RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
usr
virt
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
Makefile Linux 6.9-rc1 2024-03-24 14:10:05 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.