linux-stable/arch
Dimitris Vlachos 8310080799 riscv: Sparse-Memory/vmemmap out-of-bounds fix
[ Upstream commit a11dd49dcb ]

Offset vmemmap so that the first page of vmemmap will be mapped
to the first page of physical memory in order to ensure that
vmemmap’s bounds will be respected during
pfn_to_page()/page_to_pfn() operations.
The conversion macros will produce correct SV39/48/57 addresses
for every possible/valid DRAM_BASE inside the physical memory limits.

v2:Address Alex's comments

Suggested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Dimitris Vlachos <dvlachos@ics.forth.gr>
Reported-by: Dimitris Vlachos <dvlachos@ics.forth.gr>
Closes: https://lore.kernel.org/linux-riscv/20240202135030.42265-1-csd4492@csd.uoc.gr
Fixes: d95f1a542c ("RISC-V: Implement sparsemem")
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240229191723.32779-1-dvlachos@ics.forth.gr
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-06 14:45:09 +00:00
..
alpha
arc
arm ARM: dts: imx7s: Drop dma-apb interrupt-names 2024-03-06 14:45:05 +00:00
arm64 arm64/sme: Restore SME registers on exit from suspend 2024-03-01 13:26:37 +01:00
csky
hexagon
ia64
loongarch LoongArch: Disable IRQ before init_fn() for nonboot CPUs 2024-03-01 13:26:31 +01:00
m68k
microblaze
mips MIPS: reserve exception vector space ONLY ONCE 2024-03-01 13:26:26 +01:00
nios2
openrisc
parisc Revert "parisc: Only list existing CPUs in cpu_possible_mask" 2024-03-01 13:26:31 +01:00
powerpc powerpc/pseries: fix accuracy of stolen time 2024-02-23 09:12:43 +01:00
riscv riscv: Sparse-Memory/vmemmap out-of-bounds fix 2024-03-06 14:45:09 +00:00
s390 s390: use the correct count for __iowrite64_copy() 2024-03-01 13:26:37 +01:00
sh
sparc
um um: Fix adding '-no-pie' for clang 2024-02-23 09:12:38 +01:00
x86 x86/numa: Fix the sort compare func used in numa_fill_memblks() 2024-03-01 13:26:36 +01:00
xtensa
.gitignore
Kconfig scs: add CONFIG_MMU dependency for vfree_atomic() 2024-02-23 09:12:32 +01:00