diff options
| -rw-r--r-- | arch/x86/kernel/kprobes.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index 05c20a48841e..e05952af5d26 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
| @@ -230,9 +230,6 @@ static int recover_probed_instruction(kprobe_opcode_t *buf, unsigned long addr) | |||
| 230 | return 0; | 230 | return 0; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | /* Dummy buffers for kallsyms_lookup */ | ||
| 234 | static char __dummy_buf[KSYM_NAME_LEN]; | ||
| 235 | |||
| 236 | /* Check if paddr is at an instruction boundary */ | 233 | /* Check if paddr is at an instruction boundary */ |
| 237 | static int __kprobes can_probe(unsigned long paddr) | 234 | static int __kprobes can_probe(unsigned long paddr) |
| 238 | { | 235 | { |
| @@ -241,7 +238,7 @@ static int __kprobes can_probe(unsigned long paddr) | |||
| 241 | struct insn insn; | 238 | struct insn insn; |
| 242 | kprobe_opcode_t buf[MAX_INSN_SIZE]; | 239 | kprobe_opcode_t buf[MAX_INSN_SIZE]; |
| 243 | 240 | ||
| 244 | if (!kallsyms_lookup(paddr, NULL, &offset, NULL, __dummy_buf)) | 241 | if (!kallsyms_lookup_size_offset(paddr, NULL, &offset)) |
| 245 | return 0; | 242 | return 0; |
| 246 | 243 | ||
| 247 | /* Decode instructions */ | 244 | /* Decode instructions */ |
| @@ -1269,11 +1266,9 @@ static int __kprobes can_optimize(unsigned long paddr) | |||
| 1269 | unsigned long addr, size = 0, offset = 0; | 1266 | unsigned long addr, size = 0, offset = 0; |
| 1270 | struct insn insn; | 1267 | struct insn insn; |
| 1271 | kprobe_opcode_t buf[MAX_INSN_SIZE]; | 1268 | kprobe_opcode_t buf[MAX_INSN_SIZE]; |
| 1272 | /* Dummy buffers for lookup_symbol_attrs */ | ||
| 1273 | static char __dummy_buf[KSYM_NAME_LEN]; | ||
| 1274 | 1269 | ||
| 1275 | /* Lookup symbol including addr */ | 1270 | /* Lookup symbol including addr */ |
| 1276 | if (!kallsyms_lookup(paddr, &size, &offset, NULL, __dummy_buf)) | 1271 | if (!kallsyms_lookup_size_offset(paddr, &size, &offset)) |
| 1277 | return 0; | 1272 | return 0; |
| 1278 | 1273 | ||
| 1279 | /* Check there is enough space for a relative jump. */ | 1274 | /* Check there is enough space for a relative jump. */ |
