kprobes.c (1136fa0c07de570dc17858745af8be169d1440ba) | kprobes.c (8d56e5c5a99ce1d17d39ce5a8260e42c2a2d7682) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * arch/arm64/kernel/probes/kprobes.c 4 * 5 * Kprobes support for ARM64 6 * 7 * Copyright (C) 2013 Linaro Limited. 8 * Author: Sandeepa Prabhu <sandeepa.prabhu@linaro.org> --- 321 unchanged lines hidden (view full) --- 330 * either a probepoint or a debugger breakpoint 331 * at this address. In either case, no further 332 * handling of this interrupt is appropriate. 333 * Return back to original instruction, and continue. 334 */ 335} 336 337static int __kprobes | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * arch/arm64/kernel/probes/kprobes.c 4 * 5 * Kprobes support for ARM64 6 * 7 * Copyright (C) 2013 Linaro Limited. 8 * Author: Sandeepa Prabhu <sandeepa.prabhu@linaro.org> --- 321 unchanged lines hidden (view full) --- 330 * either a probepoint or a debugger breakpoint 331 * at this address. In either case, no further 332 * handling of this interrupt is appropriate. 333 * Return back to original instruction, and continue. 334 */ 335} 336 337static int __kprobes |
338kprobe_breakpoint_ss_handler(struct pt_regs *regs, unsigned int esr) | 338kprobe_breakpoint_ss_handler(struct pt_regs *regs, unsigned long esr) |
339{ 340 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); 341 unsigned long addr = instruction_pointer(regs); 342 struct kprobe *cur = kprobe_running(); 343 344 if (cur && (kcb->kprobe_status & (KPROBE_HIT_SS | KPROBE_REENTER)) && 345 ((unsigned long)&cur->ainsn.api.insn[1] == addr)) { 346 kprobes_restore_local_irqflag(kcb, regs); --- 7 unchanged lines hidden (view full) --- 354} 355 356static struct break_hook kprobes_break_ss_hook = { 357 .imm = KPROBES_BRK_SS_IMM, 358 .fn = kprobe_breakpoint_ss_handler, 359}; 360 361static int __kprobes | 339{ 340 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk(); 341 unsigned long addr = instruction_pointer(regs); 342 struct kprobe *cur = kprobe_running(); 343 344 if (cur && (kcb->kprobe_status & (KPROBE_HIT_SS | KPROBE_REENTER)) && 345 ((unsigned long)&cur->ainsn.api.insn[1] == addr)) { 346 kprobes_restore_local_irqflag(kcb, regs); --- 7 unchanged lines hidden (view full) --- 354} 355 356static struct break_hook kprobes_break_ss_hook = { 357 .imm = KPROBES_BRK_SS_IMM, 358 .fn = kprobe_breakpoint_ss_handler, 359}; 360 361static int __kprobes |
362kprobe_breakpoint_handler(struct pt_regs *regs, unsigned int esr) | 362kprobe_breakpoint_handler(struct pt_regs *regs, unsigned long esr) |
363{ 364 kprobe_handler(regs); 365 return DBG_HOOK_HANDLED; 366} 367 368static struct break_hook kprobes_break_hook = { 369 .imm = KPROBES_BRK_IMM, 370 .fn = kprobe_breakpoint_handler, --- 58 unchanged lines hidden --- | 363{ 364 kprobe_handler(regs); 365 return DBG_HOOK_HANDLED; 366} 367 368static struct break_hook kprobes_break_hook = { 369 .imm = KPROBES_BRK_IMM, 370 .fn = kprobe_breakpoint_handler, --- 58 unchanged lines hidden --- |