Re: [PATCH 1/2] vmalloc: New flag for flush before releasing pages

From: Andy Lutomirski
Date: Thu Dec 06 2018 - 14:21:13 EST


On Thu, Dec 6, 2018 at 11:04 AM Ard Biesheuvel
<ard.biesheuvel@xxxxxxxxxx> wrote:
>
> On Thu, 6 Dec 2018 at 19:54, Andy Lutomirski <luto@xxxxxxxxxx> wrote:
> >

> > Thatâs not totally nuts. Do we ever have code that expects __va() to
> > work on module data? Perhaps crypto code trying to encrypt static
> > data because our APIs donât understand virtual addresses. I guess if
> > highmem is ever used for modules, then we should be fine.
> >
>
> The crypto code shouldn't care, but I think it will probably break hibernate :-(

How so? Hibernate works (or at least should work) on x86 PAE, where
__va doesn't work on module data, and, on x86, the direct map has some
RO parts with where the module is, so hibernate can't be writing to
the memory through the direct map with its final permissions.