code-patching.c (0ea5c948cb64bab5bc7a5516774eb8536f05aa0d) | code-patching.c (0a956d52e6fc31c52e5f21a134659a28e958480d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright 2008 Michael Ellerman, IBM Corporation. 4 */ 5 6#include <linux/kprobes.h> 7#include <linux/mmu_context.h> 8#include <linux/random.h> --- 211 unchanged lines hidden (view full) --- 220 if (WARN_ON(ret < 0)) 221 return; 222 223 static_branch_enable(&poking_init_done); 224} 225 226static unsigned long get_patch_pfn(void *addr) 227{ | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright 2008 Michael Ellerman, IBM Corporation. 4 */ 5 6#include <linux/kprobes.h> 7#include <linux/mmu_context.h> 8#include <linux/random.h> --- 211 unchanged lines hidden (view full) --- 220 if (WARN_ON(ret < 0)) 221 return; 222 223 static_branch_enable(&poking_init_done); 224} 225 226static unsigned long get_patch_pfn(void *addr) 227{ |
228 if (IS_ENABLED(CONFIG_MODULES) && is_vmalloc_or_module_addr(addr)) | 228 if (IS_ENABLED(CONFIG_EXECMEM) && is_vmalloc_or_module_addr(addr)) |
229 return vmalloc_to_pfn(addr); 230 else 231 return __pa_symbol(addr) >> PAGE_SHIFT; 232} 233 234/* 235 * This can be called for kernel text or a module. 236 */ --- 396 unchanged lines hidden --- | 229 return vmalloc_to_pfn(addr); 230 else 231 return __pa_symbol(addr) >> PAGE_SHIFT; 232} 233 234/* 235 * This can be called for kernel text or a module. 236 */ --- 396 unchanged lines hidden --- |