[RFT PATCH] ARM: suspend: switch to swapper_pg_dir before using the vmap'ed stack

Ard Biesheuvel ardb at kernel.org
Mon Jan 10 02:55:48 PST 2022


On Mon, 10 Jan 2022 at 10:36, Marek Szyprowski <m.szyprowski at samsung.com> wrote:
>
> Hi Ard,
>
> On 06.01.2022 20:26, Ard Biesheuvel wrote:
> > The resume from suspend code switches to the ID map so it can enable the
> > MMU. On !LPAE configurations, the ID map carries its own copy of the
> > kernel VA range, but this is not kept in sync with swapper_pg_dir, and
> > so it may lack the mapping of the kernel mode stack if CONFIG_VMAP_STACK
> > is enabled.
> >
> > So let's switch to swapper_pg_dir right after re-enabling the MMU on
> > such configurations. This avoids a crash on resume observed on various
> > platforms [0].
> >
> > [0] https://protect2.fireeye.com/v1/url?k=efa2c314-b039fa16-efa3485b-0cc47a31381a-5dcf992b5d854429&q=1&e=1dac5900-a7aa-40ed-a2f0-9af17ae05bfe&u=https%3A%2F%2Flore.kernel.org%2Flinux-arm-kernel%2F20211122092816.2865873-8-ardb%40kernel.org%2F
> >
> > Cc: Marek Szyprowski <m.szyprowski at samsung.com>
> > Cc: Geert Uytterhoeven <geert at linux-m68k.org>
> > Cc: Jon Hunter <jonathanh at nvidia.com>
> > Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
>
> This fixes the suspend/resume issue observed on ARM 32bit Exynos based
> boards. Thanks!
>
> Reported-by: Marek Szyprowski <m.szyprowski at samsung.com>
>
> Tested-by: Marek Szyprowski <m.szyprowski at samsung.com>
>

Thanks Marek.



More information about the linux-arm-kernel mailing list