linux-mips
[Top] [All Lists]

Re: [PATCH 1/4] MIPS Kprobes: Fix OOPS in arch_prepare_kprobe()

To: David Daney <david.daney@cavium.com>
Subject: Re: [PATCH 1/4] MIPS Kprobes: Fix OOPS in arch_prepare_kprobe()
From: Maneesh Soni <manesoni@cisco.com>
Date: Wed, 9 Nov 2011 10:56:07 +0530
Cc: Ralf Baechle <ralf@linux-mips.org>, "ananth@in.ibm.com" <ananth@in.ibm.com>, "kamensky@cisco.com" <kamensky@cisco.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=manesoni@cisco.com; l=1220; q=dns/txt; s=iport; t=1320816371; x=1322025971; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=qWvQXTzVeWK0qkUj6GZJ/b1MTdb1z4a0+UfOIl5u5bs=; b=lBSjrSrI8ZEdSbyW2epdsYugQy+1mzlqmMJ/2hluLeDDgc7cdFY9CaQk ThG2Dq7Tc7gZ7uG53KScwYE86RmHKVp/NVYz6qGdrPSXksgnWn93laUYO 6gR/21zSWNIOBEVv/KeOiVPJo9sy3yGqfWlaxkBmvQBcs7svBwTHQ0u/b o=;
In-reply-to: <4EB989B9.2060904@cavium.com>
References: <20111108170336.GA16526@cisco.com> <20111108170454.GB16526@cisco.com> <4EB989B9.2060904@cavium.com>
Reply-to: manesoni@cisco.com
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Nov 08, 2011 at 11:57:45AM -0800, David Daney wrote:
> On 11/08/2011 09:04 AM, Maneesh Soni wrote:
> [...]
> >
> >diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c
> >index ee28683..9fb1876 100644
> >--- a/arch/mips/kernel/kprobes.c
> >+++ b/arch/mips/kernel/kprobes.c
> >@@ -25,6 +25,7 @@
> >
> >  #include<linux/kprobes.h>
> >  #include<linux/preempt.h>
> >+#include<linux/uaccess.h>
> >  #include<linux/kdebug.h>
> >  #include<linux/slab.h>
> >
> >@@ -118,11 +119,19 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)
> >     union mips_instruction prev_insn;
> >     int ret = 0;
> >
> >-    prev_insn = p->addr[-1];
> >     insn = p->addr[0];
> >
> >-    if (insn_has_delayslot(insn) || insn_has_delayslot(prev_insn)) {
> >-            pr_notice("Kprobes for branch and jump instructions are not 
> >supported\n");
> >+    if (insn_has_delayslot(insn)) {
> >+            pr_notice("Kprobes for branch and jump instructions are not"
> >+                      "supported\n");
> 
> Don't wrap these strings.
> 
> It is better to go a little bit over 80 columns, than have this.
> 
> David Daney

Ok.. will keep that in mind for future patches. This line actually
goes away in patch 4/4.

Thanks
Maneesh

<Prev in Thread] Current Thread [Next in Thread>