Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'riscv/for-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fix from Paul Walmsley:
"One significant fix for 32-bit RISC-V systems:

Fix the RV32 memory map to prevent userspace from corrupting the
FIXMAP area. Without this patch, the system can crash very early
during the boot"

* tag 'riscv/for-v5.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
RISC-V: Fix FIXMAP area corruption on RV32 systems

+10 -6
-4
arch/riscv/include/asm/fixmap.h
··· 30 30 __end_of_fixed_addresses 31 31 }; 32 32 33 - #define FIXADDR_SIZE (__end_of_fixed_addresses * PAGE_SIZE) 34 - #define FIXADDR_TOP (VMALLOC_START) 35 - #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 36 - 37 33 #define FIXMAP_PAGE_IO PAGE_KERNEL 38 34 39 35 #define __early_set_fixmap __set_fixmap
+10 -2
arch/riscv/include/asm/pgtable.h
··· 420 420 #define VMALLOC_END (PAGE_OFFSET - 1) 421 421 #define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE) 422 422 423 + #define FIXADDR_TOP VMALLOC_START 424 + #ifdef CONFIG_64BIT 425 + #define FIXADDR_SIZE PMD_SIZE 426 + #else 427 + #define FIXADDR_SIZE PGDIR_SIZE 428 + #endif 429 + #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 430 + 423 431 /* 424 - * Task size is 0x4000000000 for RV64 or 0xb800000 for RV32. 432 + * Task size is 0x4000000000 for RV64 or 0x9fc00000 for RV32. 425 433 * Note that PGDIR_SIZE must evenly divide TASK_SIZE. 426 434 */ 427 435 #ifdef CONFIG_64BIT 428 436 #define TASK_SIZE (PGDIR_SIZE * PTRS_PER_PGD / 2) 429 437 #else 430 - #define TASK_SIZE VMALLOC_START 438 + #define TASK_SIZE FIXADDR_START 431 439 #endif 432 440 433 441 #include <asm-generic/pgtable.h>