LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] kprobe: missing cast
@ 2008-01-15  3:21 Stephen Hemminger
  2008-01-16  4:52 ` Ananth N Mavinakayanahalli
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2008-01-15  3:21 UTC (permalink / raw)
  To: prasanna, ananth, anil.s.keshavamurthy; +Cc: linux-kernel

Fix warning from missing cast, maybe a result of the x86 merge?

Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>

  CC      arch/x86/kernel/kprobes_32.o
arch/x86/kernel/kprobes_32.c: In function ‘longjmp_break_handler’:
arch/x86/kernel/kprobes_32.c:729: warning: comparison of distinct pointer types lacks a cast

--- a/arch/x86/kernel/kprobes_32.c	2008-01-14 19:18:01.000000000 -0800
+++ b/arch/x86/kernel/kprobes_32.c	2008-01-14 19:18:08.000000000 -0800
@@ -726,7 +726,7 @@ int __kprobes longjmp_break_handler(stru
 	struct jprobe *jp = container_of(p, struct jprobe, kp);
 
 	if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) {
-		if (&regs->esp != kcb->jprobe_saved_esp) {
+		if ((unsigned long *) &regs->esp != kcb->jprobe_saved_esp) {
 			struct pt_regs *saved_regs = &kcb->jprobe_saved_regs;
 			printk("current esp %p does not match saved esp %p\n",
 			       &regs->esp, kcb->jprobe_saved_esp);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kprobe: missing cast
  2008-01-15  3:21 [PATCH] kprobe: missing cast Stephen Hemminger
@ 2008-01-16  4:52 ` Ananth N Mavinakayanahalli
  2008-01-16  4:58   ` Harvey Harrison
  0 siblings, 1 reply; 3+ messages in thread
From: Ananth N Mavinakayanahalli @ 2008-01-16  4:52 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: prasanna, anil.s.keshavamurthy, linux-kernel

On Mon, Jan 14, 2008 at 07:21:55PM -0800, Stephen Hemminger wrote:
> Fix warning from missing cast, maybe a result of the x86 merge?
> 
> Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>

Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

Thanks Stephen!

Ananth

> 
>   CC      arch/x86/kernel/kprobes_32.o
> arch/x86/kernel/kprobes_32.c: In function ‘longjmp_break_handler’:
> arch/x86/kernel/kprobes_32.c:729: warning: comparison of distinct pointer types lacks a cast
> 
> --- a/arch/x86/kernel/kprobes_32.c	2008-01-14 19:18:01.000000000 -0800
> +++ b/arch/x86/kernel/kprobes_32.c	2008-01-14 19:18:08.000000000 -0800
> @@ -726,7 +726,7 @@ int __kprobes longjmp_break_handler(stru
>  	struct jprobe *jp = container_of(p, struct jprobe, kp);
>  
>  	if ((addr > (u8 *) jprobe_return) && (addr < (u8 *) jprobe_return_end)) {
> -		if (&regs->esp != kcb->jprobe_saved_esp) {
> +		if ((unsigned long *) &regs->esp != kcb->jprobe_saved_esp) {
>  			struct pt_regs *saved_regs = &kcb->jprobe_saved_regs;
>  			printk("current esp %p does not match saved esp %p\n",
>  			       &regs->esp, kcb->jprobe_saved_esp);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kprobe: missing cast
  2008-01-16  4:52 ` Ananth N Mavinakayanahalli
@ 2008-01-16  4:58   ` Harvey Harrison
  0 siblings, 0 replies; 3+ messages in thread
From: Harvey Harrison @ 2008-01-16  4:58 UTC (permalink / raw)
  To: ananth; +Cc: Stephen Hemminger, prasanna, anil.s.keshavamurthy, linux-kernel

On Wed, 2008-01-16 at 10:22 +0530, Ananth N Mavinakayanahalli wrote:
> On Mon, Jan 14, 2008 at 07:21:55PM -0800, Stephen Hemminger wrote:
> > Fix warning from missing cast, maybe a result of the x86 merge?
> > 
> > Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
> 
> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> 
> Thanks Stephen!
> 

kprobes_32|64.c have already been merged to kprobes.c in the x86.git
tree.  A stack_addr() helper was added to deal with the differences
here between 32 and 64 bit.

I'm pretty sure the x86 kprobes unification is headed for 2.6.25, so
it will get fixed.

Harvey


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-16  4:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-15  3:21 [PATCH] kprobe: missing cast Stephen Hemminger
2008-01-16  4:52 ` Ananth N Mavinakayanahalli
2008-01-16  4:58   ` Harvey Harrison

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).