[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181128151145.78a3d8b1f66f6b8fd66f0629@linux-foundation.org>
Date: Wed, 28 Nov 2018 15:11:45 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc: luto@...nel.org, will.deacon@....com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, kernel-hardening@...ts.openwall.com,
naveen.n.rao@...ux.vnet.ibm.com, anil.s.keshavamurthy@...el.com,
davem@...emloft.net, mhiramat@...nel.org, rostedt@...dmis.org,
mingo@...hat.com, ast@...nel.org, daniel@...earbox.net,
jeyu@...nel.org, netdev@...r.kernel.org, ard.biesheuvel@...aro.org,
jannh@...gle.com, kristen@...ux.intel.com, dave.hansen@...el.com,
deneen.t.dock@...el.com
Subject: Re: [PATCH 2/2] x86/modules: Make x86 allocs to flush when free
On Tue, 27 Nov 2018 16:07:54 -0800 Rick Edgecombe <rick.p.edgecombe@...el.com> wrote:
> Change the module allocations to flush before freeing the pages.
>
> ...
>
> --- a/arch/x86/kernel/module.c
> +++ b/arch/x86/kernel/module.c
> @@ -87,8 +87,8 @@ void *module_alloc(unsigned long size)
> p = __vmalloc_node_range(size, MODULE_ALIGN,
> MODULES_VADDR + get_module_load_offset(),
> MODULES_END, GFP_KERNEL,
> - PAGE_KERNEL_EXEC, 0, NUMA_NO_NODE,
> - __builtin_return_address(0));
> + PAGE_KERNEL_EXEC, VM_IMMEDIATE_UNMAP,
> + NUMA_NO_NODE, __builtin_return_address(0));
> if (p && (kasan_module_alloc(p, size) < 0)) {
> vfree(p);
> return NULL;
Should any other architectures do this?
Powered by blists - more mailing lists