Re: [PATCH v2] vmalloc: Fix issues with flush flag

From: Edgecombe, Rick P
Date: Mon May 20 2019 - 21:23:03 EST


On Mon, 2019-05-20 at 20:33 -0400, David Miller wrote:
> From: "Edgecombe, Rick P" <rick.p.edgecombe@xxxxxxxxx>
> Date: Tue, 21 May 2019 00:20:13 +0000
>
> > This behavior shouldn't happen until modules or BPF are being
> > freed.
>
> Then that would rule out my theory.
>
> The only thing left is whether the permissions are actually set
> properly. If they aren't we'll take an exception when the BPF
> program
> is run and I'm not %100 sure that kernel execute permission
> violations
> are totally handled cleanly.
Permissions shouldn't be affected with this except on free. But reading
the code it looked like sparc had all PAGE_KERNEL as executable and no
set_memory_() implementations. Is there some places where permissions
are being set?

Should it handle executing an unmapped page gracefully? Because this
change is causing that to happen much earlier. If something was relying
on a cached translation to execute something it could find the mapping
disappear.