[PATCH] arm64: mm: don't assume struct page is always 64 bytes

Geert Uytterhoeven geert at linux-m68k.org
Thu Nov 12 03:27:45 EST 2020


Hi Ard,

On Tue, Nov 10, 2020 at 7:05 PM Ard Biesheuvel <ardb at kernel.org> wrote:
> Commit 8c96400d6a39be7 simplified the page-to-virt and virt-to-page
> conversions, based on the assumption that struct page is always 64
> bytes in size, in which case we can use a single signed shift to
> perform the conversion (provided that the vmemmap array is placed
> appropriately in the kernel VA space)
>
> Unfortunately, this assumption turns out not to hold, and so we need
> to revert part of this commit, and go back to an affine transformation.
> Given that all the quantities involved are compile time constants,
> this should not make any practical difference.
>
> Reported-by: Geert Uytterhoeven <geert at linux-m68k.org>
> Signed-off-by: Ard Biesheuvel <ardb at kernel.org>

Thanks!

FTR:
Tested-by: Geert Uytterhoeven <geert+renesas at glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



More information about the linux-arm-kernel mailing list