Skip to content

Commit a3a66c3

Browse files
Christoph Hellwigtorvalds
authored andcommitted
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. Fixes: 800e26b ("x86/hyperv: allocate the hypercall page with only read and execute bits") Fixes: 10d5e97 ("arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page") Fixes: 7a0e27b ("mm: remove vmalloc_exec") Reported-by: Ard Biesheuvel <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 40366bd commit a3a66c3

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

arch/arm64/kernel/probes/kprobes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void *alloc_insn_page(void)
122122
{
123123
return __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START, VMALLOC_END,
124124
GFP_KERNEL, PAGE_KERNEL_ROX, VM_FLUSH_RESET_PERMS,
125-
NUMA_NO_NODE, __func__);
125+
NUMA_NO_NODE, __builtin_return_address(0));
126126
}
127127

128128
/* arm kprobe: install breakpoint in text */

arch/x86/hyperv/hv_init.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ void __init hyperv_init(void)
377377

378378
hv_hypercall_pg = __vmalloc_node_range(PAGE_SIZE, 1, VMALLOC_START,
379379
VMALLOC_END, GFP_KERNEL, PAGE_KERNEL_ROX,
380-
VM_FLUSH_RESET_PERMS, NUMA_NO_NODE, __func__);
380+
VM_FLUSH_RESET_PERMS, NUMA_NO_NODE,
381+
__builtin_return_address(0));
381382
if (hv_hypercall_pg == NULL) {
382383
wrmsrl(HV_X64_MSR_GUEST_OS_ID, 0);
383384
goto remove_cpuhp_state;

kernel/module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2785,7 +2785,7 @@ void * __weak module_alloc(unsigned long size)
27852785
{
27862786
return __vmalloc_node_range(size, 1, VMALLOC_START, VMALLOC_END,
27872787
GFP_KERNEL, PAGE_KERNEL_EXEC, VM_FLUSH_RESET_PERMS,
2788-
NUMA_NO_NODE, __func__);
2788+
NUMA_NO_NODE, __builtin_return_address(0));
27892789
}
27902790

27912791
bool __weak module_init_section(const char *name)

0 commit comments

Comments
 (0)