From: Rick Edgecombe <rick.p.edgecombe@intel.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org,
bpf@vger.kernel.org, dave.hansen@linux.intel.com,
peterz@infradead.org, luto@kernel.org, jeyu@kernel.org
Cc: linux-kernel@vger.kernel.org, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org, hch@infradead.org,
x86@kernel.org, Rick Edgecombe <rick.p.edgecombe@intel.com>
Subject: [RFC 3/3] x86/module: Use VM_GROUP_PAGES flag
Date: Mon, 5 Apr 2021 13:37:11 -0700 [thread overview]
Message-ID: <20210405203711.1095940-4-rick.p.edgecombe@intel.com> (raw)
In-Reply-To: <20210405203711.1095940-1-rick.p.edgecombe@intel.com>
Callers of module_alloc() will set permissions on the allocation. Use
the VM_GROUP_PAGES to reduce direct map breakage.
Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
---
arch/x86/kernel/module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 34b153cbd4ac..9161ce0e987f 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -75,7 +75,7 @@ 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, 0, NUMA_NO_NODE,
+ PAGE_KERNEL, VM_GROUP_PAGES, NUMA_NO_NODE,
__builtin_return_address(0));
if (p && (kasan_module_alloc(p, size) < 0)) {
vfree(p);
--
2.29.2
prev parent reply other threads:[~2021-04-05 20:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 20:37 [RFC 0/3] Group pages on the direct map for permissioned vmallocs Rick Edgecombe
2021-04-05 20:37 ` [RFC 1/3] list: Support getting most recent element in list_lru Rick Edgecombe
2021-04-05 20:37 ` [RFC 2/3] vmalloc: Support grouped page allocations Rick Edgecombe
2021-04-05 21:01 ` Dave Hansen
2021-04-05 21:32 ` Matthew Wilcox
2021-04-05 21:49 ` Edgecombe, Rick P
2021-04-05 21:38 ` Edgecombe, Rick P
2021-04-05 20:37 ` Rick Edgecombe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210405203711.1095940-4-rick.p.edgecombe@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@linux.intel.com \
--cc=hch@infradead.org \
--cc=jeyu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).