Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19611
b: refs/heads/master
c: e65cefe
h: refs/heads/master
i:
  19609: 1e807d2
  19607: 021412d
v: v3
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Feb 3, 2006
1 parent 73ba6a5 commit d8e5ea9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ed75463b969f72fd724ba0c01107fa443522321
refs/heads/master: e65cefe87beda627c0bfba39b387ee4bffedc93c
34 changes: 17 additions & 17 deletions trunk/kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,6 @@ void __kprobes kprobe_flush_task(struct task_struct *tk)
spin_unlock_irqrestore(&kretprobe_lock, flags);
}

/*
* This kprobe pre_handler is registered with every kretprobe. When probe
* hits it will set up the return probe.
*/
static int __kprobes pre_handler_kretprobe(struct kprobe *p,
struct pt_regs *regs)
{
struct kretprobe *rp = container_of(p, struct kretprobe, kp);
unsigned long flags = 0;

/*TODO: consider to only swap the RA after the last pre_handler fired */
spin_lock_irqsave(&kretprobe_lock, flags);
arch_prepare_kretprobe(rp, regs);
spin_unlock_irqrestore(&kretprobe_lock, flags);
return 0;
}

static inline void free_rp_inst(struct kretprobe *rp)
{
struct kretprobe_instance *ri;
Expand Down Expand Up @@ -578,6 +561,23 @@ void __kprobes unregister_jprobe(struct jprobe *jp)

#ifdef ARCH_SUPPORTS_KRETPROBES

/*
* This kprobe pre_handler is registered with every kretprobe. When probe
* hits it will set up the return probe.
*/
static int __kprobes pre_handler_kretprobe(struct kprobe *p,
struct pt_regs *regs)
{
struct kretprobe *rp = container_of(p, struct kretprobe, kp);
unsigned long flags = 0;

/*TODO: consider to only swap the RA after the last pre_handler fired */
spin_lock_irqsave(&kretprobe_lock, flags);
arch_prepare_kretprobe(rp, regs);
spin_unlock_irqrestore(&kretprobe_lock, flags);
return 0;
}

int __kprobes register_kretprobe(struct kretprobe *rp)
{
int ret = 0;
Expand Down

0 comments on commit d8e5ea9

Please sign in to comment.