opt.c (8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17) opt.c (c42421e205fc2570a4d019184ea7d6c382c93f4c)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Kernel Probes Jump Optimization (Optprobes)
4 *
5 * Copyright (C) IBM Corporation, 2002, 2004
6 * Copyright (C) Hitachi Ltd., 2012
7 */
8#include <linux/kprobes.h>

--- 353 unchanged lines hidden (view full) ---

362 return -EEXIST;
363 }
364
365 return 0;
366}
367
368/* Check the addr is within the optimized instructions. */
369int arch_within_optimized_kprobe(struct optimized_kprobe *op,
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Kernel Probes Jump Optimization (Optprobes)
4 *
5 * Copyright (C) IBM Corporation, 2002, 2004
6 * Copyright (C) Hitachi Ltd., 2012
7 */
8#include <linux/kprobes.h>

--- 353 unchanged lines hidden (view full) ---

362 return -EEXIST;
363 }
364
365 return 0;
366}
367
368/* Check the addr is within the optimized instructions. */
369int arch_within_optimized_kprobe(struct optimized_kprobe *op,
370 unsigned long addr)
370 kprobe_opcode_t *addr)
371{
371{
372 return ((unsigned long)op->kp.addr <= addr &&
373 (unsigned long)op->kp.addr + op->optinsn.size > addr);
372 return (op->kp.addr <= addr &&
373 op->kp.addr + op->optinsn.size > addr);
374}
375
376/* Free optimized instruction slot */
377static
378void __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty)
379{
380 u8 *slot = op->optinsn.insn;
381 if (slot) {

--- 187 unchanged lines hidden ---
374}
375
376/* Free optimized instruction slot */
377static
378void __arch_remove_optimized_kprobe(struct optimized_kprobe *op, int dirty)
379{
380 u8 *slot = op->optinsn.insn;
381 if (slot) {

--- 187 unchanged lines hidden ---