diff for duplicates of <20050523154229.089202000@csdlinux-2.jf.intel.com> diff --git a/a/1.txt b/N1/1.txt index 11f9669..3510e7f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,12 +1,14 @@ This patch is required to support kprobe on branch/call instructions. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> -================================== arch/ia64/kernel/kprobes.c | 131 +++++++++++++++++++++++++++++++++++++++------ +===================================================================== + arch/ia64/kernel/kprobes.c | 131 +++++++++++++++++++++++++++++++++++++++------ include/asm-ia64/kprobes.h | 17 +++++ 2 files changed, 132 insertions(+), 16 deletions(-) Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c -=================================--- linux-2.6.12-rc4.orig/arch/ia64/kernel/kprobes.c 2005-05-23 07:57:22.848550199 -0700 +=================================================================== +--- linux-2.6.12-rc4.orig/arch/ia64/kernel/kprobes.c 2005-05-23 07:57:22.848550199 -0700 +++ linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c 2005-05-23 07:57:24.205972057 -0700 @@ -120,25 +120,75 @@ unsigned long arm_addr = addr & ~0xFULL; @@ -22,14 +24,14 @@ Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c memcpy(&bundle, &p->ainsn.insn.bundle, sizeof(bundle_t)); + template = bundle.quad0.template; -+ if (slot = 1 && bundle_encoding[template][1] = L) { ++ if (slot == 1 && bundle_encoding[template][1] == L) { + lx_type_inst = 1; + slot = 2; + } + - template = bundle.quad0.template; -- if (slot = 1 && bundle_encoding[template][1] = L) +- if (slot == 1 && bundle_encoding[template][1] == L) - slot = 2; switch (slot) { case 0: @@ -54,7 +56,7 @@ Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c + * Look for IP relative Branches, IP relative call or + * IP relative predicate instructions + */ -+ if (bundle_encoding[template][slot] = B) { ++ if (bundle_encoding[template][slot] == B) { + switch (major_opcode) { + case INDIRECT_CALL_OPCODE: + p->ainsn.inst_flag |= INST_FLAG_FIX_BRANCH_REG; @@ -111,7 +113,7 @@ Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c - */ + template = p->opcode.bundle.quad0.template; + -+ if (slot = 1 && bundle_encoding[template][1] = L) ++ if (slot == 1 && bundle_encoding[template][1] == L) + slot = 2; + + if (p->ainsn.inst_flag) { @@ -133,22 +135,22 @@ Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c + */ + switch (p->ainsn.target_br_reg) { + case 0: -+ if ((regs->b0 = bundle_addr) || -+ (regs->b0 = bundle_addr + 0x10)) { ++ if ((regs->b0 == bundle_addr) || ++ (regs->b0 == bundle_addr + 0x10)) { + regs->b0 = (regs->b0 - bundle_addr) + + resume_addr; + } + break; + case 6: -+ if ((regs->b6 = bundle_addr) || -+ (regs->b6 = bundle_addr + 0x10)) { ++ if ((regs->b6 == bundle_addr) || ++ (regs->b6 == bundle_addr + 0x10)) { + regs->b6 = (regs->b6 - bundle_addr) + + resume_addr; + } + break; + case 7: -+ if ((regs->b7 = bundle_addr) || -+ (regs->b7 = bundle_addr + 0x10)) { ++ if ((regs->b7 == bundle_addr) || ++ (regs->b7 == bundle_addr + 0x10)) { + regs->b7 = (regs->b7 - bundle_addr) + + resume_addr; + } @@ -159,12 +161,12 @@ Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c + } - ia64_psr(regs)->ss = 0; -+ if (slot = 2) { -+ if (regs->cr_iip = bundle_addr + 0x10) { ++ if (slot == 2) { ++ if (regs->cr_iip == bundle_addr + 0x10) { + regs->cr_iip = resume_addr + 0x10; + } + } else { -+ if (regs->cr_iip = bundle_addr) { ++ if (regs->cr_iip == bundle_addr) { + regs->cr_iip = resume_addr; + } + } @@ -176,7 +178,8 @@ Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c static void prepare_ss(struct kprobe *p, struct pt_regs *regs) Index: linux-2.6.12-rc4/include/asm-ia64/kprobes.h -=================================--- linux-2.6.12-rc4.orig/include/asm-ia64/kprobes.h 2005-05-23 07:57:22.851479886 -0700 +=================================================================== +--- linux-2.6.12-rc4.orig/include/asm-ia64/kprobes.h 2005-05-23 07:57:22.851479886 -0700 +++ linux-2.6.12-rc4/include/asm-ia64/kprobes.h 2005-05-23 07:57:24.207925182 -0700 @@ -42,6 +42,17 @@ } quad1; diff --git a/a/content_digest b/N1/content_digest index b5b380f..405e382 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\020050523153906.988390000@csdlinux-2.jf.intel.com\0" "From\0Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>\0" "Subject\0[patch 4/4] Kprobes support for IA64\0" - "Date\0Mon, 23 May 2005 15:39:10 +0000\0" + "Date\0Mon, 23 May 2005 08:39:10 -0700\0" "To\0akpm@osdl.org\0" "Cc\0tony.luck@intel.com" rohit.seth@intel.com @@ -13,16 +13,19 @@ linux-kernel@vger.kernel.org " anil.s.keshavamurthy@intel.com\0" "\00:1\0" + "fn\0kprobes-branch-support.patch\0" "b\0" "\n" "This patch is required to support kprobe on branch/call instructions.\n" "Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>\n" - "================================== arch/ia64/kernel/kprobes.c | 131 +++++++++++++++++++++++++++++++++++++++------\n" + "=====================================================================\n" + " arch/ia64/kernel/kprobes.c | 131 +++++++++++++++++++++++++++++++++++++++------\n" " include/asm-ia64/kprobes.h | 17 +++++\n" " 2 files changed, 132 insertions(+), 16 deletions(-)\n" "\n" "Index: linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c\n" - "=================================--- linux-2.6.12-rc4.orig/arch/ia64/kernel/kprobes.c\t2005-05-23 07:57:22.848550199 -0700\n" + "===================================================================\n" + "--- linux-2.6.12-rc4.orig/arch/ia64/kernel/kprobes.c\t2005-05-23 07:57:22.848550199 -0700\n" "+++ linux-2.6.12-rc4/arch/ia64/kernel/kprobes.c\t2005-05-23 07:57:24.205972057 -0700\n" "@@ -120,25 +120,75 @@\n" " \tunsigned long arm_addr = addr & ~0xFULL;\n" @@ -38,14 +41,14 @@ " \n" " \tmemcpy(&bundle, &p->ainsn.insn.bundle, sizeof(bundle_t));\n" "+ \ttemplate = bundle.quad0.template;\n" - "+ \tif (slot = 1 && bundle_encoding[template][1] = L) {\n" + "+ \tif (slot == 1 && bundle_encoding[template][1] == L) {\n" "+ \t\tlx_type_inst = 1;\n" "+ \t\tslot = 2;\n" "+ \t}\n" "+ \n" " \n" "-\ttemplate = bundle.quad0.template;\n" - "-\tif (slot = 1 && bundle_encoding[template][1] = L)\n" + "-\tif (slot == 1 && bundle_encoding[template][1] == L)\n" "-\t\tslot = 2;\n" " \tswitch (slot) {\n" " \tcase 0:\n" @@ -70,7 +73,7 @@ "+ \t * Look for IP relative Branches, IP relative call or\n" "+ \t * IP relative predicate instructions\n" "+ \t */\n" - "+ \tif (bundle_encoding[template][slot] = B) {\n" + "+ \tif (bundle_encoding[template][slot] == B) {\n" "+ \t\tswitch (major_opcode) {\n" "+ \t\t\tcase INDIRECT_CALL_OPCODE:\n" "+ \t\t\t\tp->ainsn.inst_flag |= INST_FLAG_FIX_BRANCH_REG;\n" @@ -127,7 +130,7 @@ "-\t */\n" "+\ttemplate = p->opcode.bundle.quad0.template;\n" "+\n" - "+ \tif (slot = 1 && bundle_encoding[template][1] = L)\n" + "+ \tif (slot == 1 && bundle_encoding[template][1] == L)\n" "+ \t\tslot = 2;\n" "+\n" "+\tif (p->ainsn.inst_flag) {\n" @@ -149,22 +152,22 @@ "+\t\t */\n" "+\t\t\tswitch (p->ainsn.target_br_reg) {\n" "+\t\t\tcase 0:\n" - "+\t\t\t\tif ((regs->b0 = bundle_addr) ||\n" - "+\t\t\t\t\t(regs->b0 = bundle_addr + 0x10)) {\n" + "+\t\t\t\tif ((regs->b0 == bundle_addr) ||\n" + "+\t\t\t\t\t(regs->b0 == bundle_addr + 0x10)) {\n" "+\t\t\t\t\tregs->b0 = (regs->b0 - bundle_addr) +\n" "+\t\t\t\t\t\tresume_addr;\n" "+\t\t\t\t}\n" "+\t\t\t\tbreak;\n" "+\t\t\tcase 6:\n" - "+\t\t\t\tif ((regs->b6 = bundle_addr) ||\n" - "+\t\t\t\t\t(regs->b6 = bundle_addr + 0x10)) {\n" + "+\t\t\t\tif ((regs->b6 == bundle_addr) ||\n" + "+\t\t\t\t\t(regs->b6 == bundle_addr + 0x10)) {\n" "+\t\t\t\t\tregs->b6 = (regs->b6 - bundle_addr) +\n" "+\t\t\t\t\t\tresume_addr;\n" "+\t\t\t\t}\n" "+\t\t\t\tbreak;\n" "+\t\t\tcase 7:\n" - "+\t\t\t\tif ((regs->b7 = bundle_addr) ||\n" - "+\t\t\t\t\t(regs->b7 = bundle_addr + 0x10)) {\n" + "+\t\t\t\tif ((regs->b7 == bundle_addr) ||\n" + "+\t\t\t\t\t(regs->b7 == bundle_addr + 0x10)) {\n" "+\t\t\t\t\tregs->b7 = (regs->b7 - bundle_addr) +\n" "+\t\t\t\t\t\tresume_addr;\n" "+\t\t\t\t}\n" @@ -175,12 +178,12 @@ "+\t}\n" " \n" "-\tia64_psr(regs)->ss = 0;\n" - "+\tif (slot = 2) {\n" - "+ \t\tif (regs->cr_iip = bundle_addr + 0x10) {\n" + "+\tif (slot == 2) {\n" + "+ \t\tif (regs->cr_iip == bundle_addr + 0x10) {\n" "+ \t\t\tregs->cr_iip = resume_addr + 0x10;\n" "+ \t\t}\n" "+ \t} else {\n" - "+ \t\tif (regs->cr_iip = bundle_addr) {\n" + "+ \t\tif (regs->cr_iip == bundle_addr) {\n" "+ \t\t\tregs->cr_iip = resume_addr;\n" "+ \t\t}\n" "+ \t}\n" @@ -192,7 +195,8 @@ " \n" " static void prepare_ss(struct kprobe *p, struct pt_regs *regs)\n" "Index: linux-2.6.12-rc4/include/asm-ia64/kprobes.h\n" - "=================================--- linux-2.6.12-rc4.orig/include/asm-ia64/kprobes.h\t2005-05-23 07:57:22.851479886 -0700\n" + "===================================================================\n" + "--- linux-2.6.12-rc4.orig/include/asm-ia64/kprobes.h\t2005-05-23 07:57:22.851479886 -0700\n" "+++ linux-2.6.12-rc4/include/asm-ia64/kprobes.h\t2005-05-23 07:57:24.207925182 -0700\n" "@@ -42,6 +42,17 @@\n" " \t} quad1;\n" @@ -229,4 +233,4 @@ "\n" -- -cd8a915887950d408614ca266fdbe88773d442910a9c51355e2fc2a4fe7fc243 +282c6afbc81ad6895df18a1c8ec42d4b51276ee7d95f4fa475adf82a20031d8f
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.