[PATCH RESEND v4] riscv: mm: Fix the out of bound issue of vmemmap address

patchwork-bot+linux-riscv at kernel.org patchwork-bot+linux-riscv at kernel.org
Thu Jan 9 08:16:48 PST 2025


Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer at rivosinc.com>:

On Fri,  3 Jan 2025 17:20:23 +0800 you wrote:
> In sparse vmemmap model, the virtual address of vmemmap is calculated as:
> ((struct page *)VMEMMAP_START - (phys_ram_base >> PAGE_SHIFT)).
> And the struct page's va can be calculated with an offset:
> (vmemmap + (pfn)).
> 
> However, when initializing struct pages, kernel actually starts from the
> first page from the same section that phys_ram_base belongs to. If the
> first page's physical address is not (phys_ram_base >> PAGE_SHIFT), then
> we get an va below VMEMMAP_START when calculating va for it's struct page.
> 
> [...]

Here is the summary with links:
  - [RESEND,v4] riscv: mm: Fix the out of bound issue of vmemmap address
    https://git.kernel.org/riscv/c/f754f27e98f8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





More information about the linux-riscv mailing list