uprobes.c (762f99f4f3cb41a775b5157dd761217beba65873) uprobes.c (8d56e5c5a99ce1d17d39ce5a8260e42c2a2d7682)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2014-2016 Pratyush Anand <panand@redhat.com>
4 */
5#include <linux/highmem.h>
6#include <linux/ptrace.h>
7#include <linux/uprobes.h>
8#include <asm/cacheflush.h>

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

161
162int arch_uprobe_exception_notify(struct notifier_block *self,
163 unsigned long val, void *data)
164{
165 return NOTIFY_DONE;
166}
167
168static int uprobe_breakpoint_handler(struct pt_regs *regs,
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2014-2016 Pratyush Anand <panand@redhat.com>
4 */
5#include <linux/highmem.h>
6#include <linux/ptrace.h>
7#include <linux/uprobes.h>
8#include <asm/cacheflush.h>

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

161
162int arch_uprobe_exception_notify(struct notifier_block *self,
163 unsigned long val, void *data)
164{
165 return NOTIFY_DONE;
166}
167
168static int uprobe_breakpoint_handler(struct pt_regs *regs,
169 unsigned int esr)
169 unsigned long esr)
170{
171 if (uprobe_pre_sstep_notifier(regs))
172 return DBG_HOOK_HANDLED;
173
174 return DBG_HOOK_ERROR;
175}
176
177static int uprobe_single_step_handler(struct pt_regs *regs,
170{
171 if (uprobe_pre_sstep_notifier(regs))
172 return DBG_HOOK_HANDLED;
173
174 return DBG_HOOK_ERROR;
175}
176
177static int uprobe_single_step_handler(struct pt_regs *regs,
178 unsigned int esr)
178 unsigned long esr)
179{
180 struct uprobe_task *utask = current->utask;
181
182 WARN_ON(utask && (instruction_pointer(regs) != utask->xol_vaddr + 4));
183 if (uprobe_post_sstep_notifier(regs))
184 return DBG_HOOK_HANDLED;
185
186 return DBG_HOOK_ERROR;

--- 22 unchanged lines hidden ---
179{
180 struct uprobe_task *utask = current->utask;
181
182 WARN_ON(utask && (instruction_pointer(regs) != utask->xol_vaddr + 4));
183 if (uprobe_post_sstep_notifier(regs))
184 return DBG_HOOK_HANDLED;
185
186 return DBG_HOOK_ERROR;

--- 22 unchanged lines hidden ---