linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: akpm@linux-foundation.org, ardb@kernel.org, hch@lst.de,
	linux-mm@kvack.org, mm-commits@vger.kernel.org,
	torvalds@linux-foundation.org
Subject: [patch 4/5] vmalloc: fix the owner argument for the new __vmalloc_node_range callers
Date: Fri, 03 Jul 2020 15:15:27 -0700	[thread overview]
Message-ID: <20200703221527.HlsHOkXbm%akpm@linux-foundation.org> (raw)
In-Reply-To: <20200703151445.b6a0cfee402c7c5c4651f1b1@linux-foundation.org>

From: Christoph Hellwig <hch@lst.de>
Subject: vmalloc: fix the owner argument for the new __vmalloc_node_range callers

Fix the recently added new __vmalloc_node_range callers to pass the
correct values as the owner for display in /proc/vmallocinfo.

Link: http://lkml.kernel.org/r/20200627075649.2455097-1-hch@lst.de
Fixes: 800e26b81311 ("x86/hyperv: allocate the hypercall page with only read and execute bits")
Fixes: 10d5e97c1bf8 ("arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page")
Fixes: 7a0e27b2a0ce ("mm: remove vmalloc_exec")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm64/kernel/probes/kprobes.c |    2 +-
 arch/x86/hyperv/hv_init.c          |    3 ++-
 kernel/module.c                    |    2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

--- a/arch/arm64/kernel/probes/kprobes.c~vmalloc-fix-the-owner-argument-for-the-new-__vmalloc_node_range-callers
+++ a/arch/arm64/kernel/probes/kprobes.c
@@ -122,7 +122,7 @@ void *alloc_insn_page(void)
 {
 	return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END,
 			GFP_KERNEL, PAGE_KERNEL_ROX, VM_FLUSH_RESET_PERMS,
-			NUMA_NO_NODE, __func__);
+			NUMA_NO_NODE, __builtin_return_address(0));
 }
 
 /* arm kprobe: install breakpoint in text */
--- a/arch/x86/hyperv/hv_init.c~vmalloc-fix-the-owner-argument-for-the-new-__vmalloc_node_range-callers
+++ a/arch/x86/hyperv/hv_init.c
@@ -377,7 +377,8 @@ void __init hyperv_init(void)
 
 	hv_hypercall_pg = __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START,
 			VMALLOC_END, GFP_KERNEL, PAGE_KERNEL_ROX,
-			VM_FLUSH_RESET_PERMS, NUMA_NO_NODE, __func__);
+			VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
+			__builtin_return_address(0));
 	if (hv_hypercall_pg == NULL) {
 		wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
 		goto remove_cpuhp_state;
--- a/kernel/module.c~vmalloc-fix-the-owner-argument-for-the-new-__vmalloc_node_range-callers
+++ a/kernel/module.c
@@ -2785,7 +2785,7 @@ void * __weak module_alloc(unsigned long
 {
 	return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
 			GFP_KERNEL, PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS,
-			NUMA_NO_NODE, __func__);
+			NUMA_NO_NODE, __builtin_return_address(0));
 }
 
 bool __weak module_init_section(const char *name)
_


  parent reply	other threads:[~2020-07-03 22:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03 22:14 incoming Andrew Morton
2020-07-03 22:15 ` [patch 1/5] mm/hugetlb.c: fix pages per hugetlb calculation Andrew Morton
2020-07-03 22:15 ` [patch 2/5] samples/vfs: avoid warning in statx override Andrew Morton
2020-07-03 22:15 ` [patch 3/5] mm/cma.c: use exact_nid true to fix possible per-numa cma leak Andrew Morton
2020-07-03 22:15 ` Andrew Morton [this message]
2020-07-03 22:15 ` [patch 5/5] mm/page_alloc: fix documentation error Andrew Morton
2020-07-07  1:53 ` mmotm 2020-07-06-18-53 uploaded Andrew Morton
2020-07-07  5:44   ` mmotm 2020-07-06-18-53 uploaded (sound/soc/amd/renoir/rn-pci-acp3x.c:) Randy Dunlap
2020-07-07  6:15     ` Mukunda,Vijendar
2020-07-07  6:08       ` Randy Dunlap
2020-07-07 10:50         ` Mukunda,Vijendar
2020-07-09  2:29 ` mmotm 2020-07-08-19-28 uploaded Andrew Morton
2020-07-09  3:47   ` mmotm 2020-07-08-19-28 uploaded (mm/migrate.c) Randy Dunlap
2020-07-09  3:56     ` Anshuman Khandual
2020-07-10  4:00 ` mmotm 2020-07-09-21-00 uploaded Andrew Morton
2020-07-10 17:40   ` mmotm 2020-07-09-21-00 uploaded (drivers/net/ethernet/mellanox/mlx5/core/en_main.c) Randy Dunlap
2020-07-13  4:02     ` Stephen Rothwell
2020-07-13  4:17       ` Randy Dunlap
2020-07-14 23:58         ` Saeed Mahameed
2020-07-14  2:49 ` mmotm 2020-07-13-19-49 uploaded Andrew Morton
2020-07-17  5:53 ` mmotm 2020-07-16-22-52 uploaded Andrew Morton
2020-07-17 15:30   ` mmotm 2020-07-16-22-52 uploaded (net: IPVS) Randy Dunlap
2020-07-18  1:27     ` Stephen Rothwell
2020-07-17 15:35   ` mmotm 2020-07-16-22-52 uploaded (mm/hugetlb.c) Randy Dunlap
2020-07-18  1:32     ` Stephen Rothwell
2020-07-21  2:07 ` mmotm 2020-07-20-19-06 uploaded Andrew Morton
2020-07-21  6:09   ` mmotm 2020-07-20-19-06 uploaded (net/ipv6/ip6_vti.o) Randy Dunlap
2020-07-21  6:14     ` Steffen Klassert
2020-07-21  6:54     ` Stephen Rothwell
2020-07-21  6:55       ` Stephen Rothwell

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=20200703221527.HlsHOkXbm%akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-mm@kvack.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).