From: tip-bot for Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@redhat.com, torvalds@linux-foundation.org,
peterz@infradead.org, rostedt@goodmis.org,
jkenisto@linux.vnet.ibm.com, tglx@linutronix.de, oleg@redhat.com,
linux-mm@kvack.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
andi@firstfloor.org, hch@infradead.org, ananth@in.ibm.com,
masami.hiramatsu.pt@hitachi.com, acme@infradead.org,
srikar@linux.vnet.ibm.com, mingo@elte.hu
Subject: [tip:perf/uprobes] uprobes/core: Rename bkpt to swbp
Date: Tue, 13 Mar 2012 02:43:15 -0700 [thread overview]
Message-ID: <tip-5cb4ac3a583d4ee18c8682ab857e093c4a0d0895@git.kernel.org> (raw)
In-Reply-To: <20120312092545.5379.91251.sendpatchset@srdronam.in.ibm.com>
Commit-ID: 5cb4ac3a583d4ee18c8682ab857e093c4a0d0895
Gitweb: http://git.kernel.org/tip/5cb4ac3a583d4ee18c8682ab857e093c4a0d0895
Author: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
AuthorDate: Mon, 12 Mar 2012 14:55:45 +0530
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue, 13 Mar 2012 06:22:21 +0100
uprobes/core: Rename bkpt to swbp
bkpt doesnt seem to be a correct abbrevation for breakpoint.
Choice was between bp and breakpoint. Since bp can refer to
things other than breakpoint, use swbp to refer to breakpoints.
This is pure cleanup, no functional change intended.
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com>
Cc: Linux-mm <linux-mm@kvack.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20120312092545.5379.91251.sendpatchset@srdronam.in.ibm.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/uprobes.h | 4 ++--
include/linux/uprobes.h | 4 ++--
kernel/events/uprobes.c | 34 +++++++++++++++++-----------------
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/arch/x86/include/asm/uprobes.h b/arch/x86/include/asm/uprobes.h
index 384f1be..0500391 100644
--- a/arch/x86/include/asm/uprobes.h
+++ b/arch/x86/include/asm/uprobes.h
@@ -28,8 +28,8 @@ typedef u8 uprobe_opcode_t;
#define MAX_UINSN_BYTES 16
#define UPROBE_XOL_SLOT_BYTES 128 /* to keep it cache aligned */
-#define UPROBE_BKPT_INSN 0xcc
-#define UPROBE_BKPT_INSN_SIZE 1
+#define UPROBE_SWBP_INSN 0xcc
+#define UPROBE_SWBP_INSN_SIZE 1
struct arch_uprobe {
u16 fixups;
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index 5869918..eac525f 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -52,9 +52,9 @@ struct uprobe_consumer {
};
#ifdef CONFIG_UPROBES
-extern int __weak set_bkpt(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
+extern int __weak set_swbp(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr);
extern int __weak set_orig_insn(struct arch_uprobe *aup, struct mm_struct *mm, unsigned long vaddr, bool verify);
-extern bool __weak is_bkpt_insn(uprobe_opcode_t *insn);
+extern bool __weak is_swbp_insn(uprobe_opcode_t *insn);
extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *uc);
extern int uprobe_mmap(struct vm_area_struct *vma);
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 9c5ddff..e56e56a 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -170,14 +170,14 @@ out:
}
/**
- * is_bkpt_insn - check if instruction is breakpoint instruction.
+ * is_swbp_insn - check if instruction is breakpoint instruction.
* @insn: instruction to be checked.
- * Default implementation of is_bkpt_insn
+ * Default implementation of is_swbp_insn
* Returns true if @insn is a breakpoint instruction.
*/
-bool __weak is_bkpt_insn(uprobe_opcode_t *insn)
+bool __weak is_swbp_insn(uprobe_opcode_t *insn)
{
- return *insn == UPROBE_BKPT_INSN;
+ return *insn == UPROBE_SWBP_INSN;
}
/*
@@ -227,7 +227,7 @@ static int write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
* adding probes in write mapped pages since the breakpoints
* might end up in the file copy.
*/
- if (!valid_vma(vma, is_bkpt_insn(&opcode)))
+ if (!valid_vma(vma, is_swbp_insn(&opcode)))
goto put_out;
uprobe = container_of(auprobe, struct uprobe, arch);
@@ -259,8 +259,8 @@ static int write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm,
/* poke the new insn in, ASSUMES we don't cross page boundary */
vaddr &= ~PAGE_MASK;
- BUG_ON(vaddr + UPROBE_BKPT_INSN_SIZE > PAGE_SIZE);
- memcpy(vaddr_new + vaddr, &opcode, UPROBE_BKPT_INSN_SIZE);
+ BUG_ON(vaddr + UPROBE_SWBP_INSN_SIZE > PAGE_SIZE);
+ memcpy(vaddr_new + vaddr, &opcode, UPROBE_SWBP_INSN_SIZE);
kunmap_atomic(vaddr_new);
kunmap_atomic(vaddr_old);
@@ -308,7 +308,7 @@ static int read_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_
lock_page(page);
vaddr_new = kmap_atomic(page);
vaddr &= ~PAGE_MASK;
- memcpy(opcode, vaddr_new + vaddr, UPROBE_BKPT_INSN_SIZE);
+ memcpy(opcode, vaddr_new + vaddr, UPROBE_SWBP_INSN_SIZE);
kunmap_atomic(vaddr_new);
unlock_page(page);
@@ -317,7 +317,7 @@ static int read_opcode(struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_
return 0;
}
-static int is_bkpt_at_addr(struct mm_struct *mm, unsigned long vaddr)
+static int is_swbp_at_addr(struct mm_struct *mm, unsigned long vaddr)
{
uprobe_opcode_t opcode;
int result;
@@ -326,14 +326,14 @@ static int is_bkpt_at_addr(struct mm_struct *mm, unsigned long vaddr)
if (result)
return result;
- if (is_bkpt_insn(&opcode))
+ if (is_swbp_insn(&opcode))
return 1;
return 0;
}
/**
- * set_bkpt - store breakpoint at a given address.
+ * set_swbp - store breakpoint at a given address.
* @auprobe: arch specific probepoint information.
* @mm: the probed process address space.
* @vaddr: the virtual address to insert the opcode.
@@ -341,18 +341,18 @@ static int is_bkpt_at_addr(struct mm_struct *mm, unsigned long vaddr)
* For mm @mm, store the breakpoint instruction at @vaddr.
* Return 0 (success) or a negative errno.
*/
-int __weak set_bkpt(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr)
+int __weak set_swbp(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr)
{
int result;
- result = is_bkpt_at_addr(mm, vaddr);
+ result = is_swbp_at_addr(mm, vaddr);
if (result == 1)
return -EEXIST;
if (result)
return result;
- return write_opcode(auprobe, mm, vaddr, UPROBE_BKPT_INSN);
+ return write_opcode(auprobe, mm, vaddr, UPROBE_SWBP_INSN);
}
/**
@@ -371,7 +371,7 @@ set_orig_insn(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long v
if (verify) {
int result;
- result = is_bkpt_at_addr(mm, vaddr);
+ result = is_swbp_at_addr(mm, vaddr);
if (!result)
return -EINVAL;
@@ -642,7 +642,7 @@ install_breakpoint(struct uprobe *uprobe, struct mm_struct *mm,
if (ret)
return ret;
- if (is_bkpt_insn((uprobe_opcode_t *)uprobe->arch.insn))
+ if (is_swbp_insn((uprobe_opcode_t *)uprobe->arch.insn))
return -EEXIST;
ret = arch_uprobes_analyze_insn(&uprobe->arch, mm);
@@ -651,7 +651,7 @@ install_breakpoint(struct uprobe *uprobe, struct mm_struct *mm,
uprobe->flags |= UPROBE_COPY_INSN;
}
- ret = set_bkpt(&uprobe->arch, mm, addr);
+ ret = set_swbp(&uprobe->arch, mm, addr);
return ret;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-03-13 9:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 9:25 [PATCH v2 1/7] uprobes/core: Make macro names consistent Srikar Dronamraju
2012-03-12 9:25 ` [PATCH v2 2/7] uprobes/core: Make order of function parameters consistent across functions Srikar Dronamraju
2012-03-13 9:42 ` [tip:perf/uprobes] " tip-bot for Srikar Dronamraju
2012-03-12 9:25 ` [PATCH v2 3/7] uprobes/core: Rename bkpt to swbp Srikar Dronamraju
2012-03-13 9:43 ` tip-bot for Srikar Dronamraju [this message]
2012-03-12 9:25 ` [PATCH v2 4/7] x86/trivial: Rename trap_no to trap_nr in thread struct Srikar Dronamraju
2012-03-13 9:44 ` [tip:x86/cleanups] x86: Rename trap_no to trap_nr in thread_struct tip-bot for Srikar Dronamraju
2012-03-12 9:26 ` [PATCH v2 5/7] x86/trivial: Fix 'old_rsp' undefined build failure when including asm/compat.h Srikar Dronamraju
2012-03-12 9:26 ` [PATCH v2 6/7] x86/trivial: Use is_ia32_compat_task Srikar Dronamraju
2012-03-12 9:26 ` [PATCH v2 7/7] uprobes/core: Handle breakpoint and singlestep exception Srikar Dronamraju
2012-03-13 9:41 ` [tip:perf/uprobes] uprobes/core: Make macro names consistent tip-bot for Srikar Dronamraju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-5cb4ac3a583d4ee18c8682ab857e093c4a0d0895@git.kernel.org \
--to=srikar@linux.vnet.ibm.com \
--cc=acme@infradead.org \
--cc=ananth@in.ibm.com \
--cc=andi@firstfloor.org \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=jkenisto@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).