mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* kallsyms broken on ARM by commit 17b1f0d
@ 2009-06-15 12:47 Catalin Marinas
  2009-06-15 12:51 ` Mike Frysinger
  0 siblings, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2009-06-15 12:47 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Sam Ravnborg, linux-kernel

Hi Mike,

With the above commit, kallsyms on ARM no longer show correct
information. That's a trace with this commit:

    [<c007bfec>] _etext+0xffd9bfec/0x126d8                                      
    [<c00795e4>] _etext+0xffd995e4/0x126d8                                      
    [<c0147d94>] _etext+0xffe67d94/0x126d8                                      
    [<c0147f10>] _etext+0xffe67f10/0x126d8                                      
    [<c01481bc>] _etext+0xffe681bc/0x126d8                                      
    [<c0148218>] _etext+0xffe68218/0x126d8                                      
    [<c0143db0>] _etext+0xffe63db0/0x126d8                                      
    [<c0143e18>] _etext+0xffe63e18/0x126d8                                      
    [<c007f250>] _etext+0xffd9f250/0x126d8                                      
    [<c007c238>] _etext+0xffd9c238/0x126d8                                      
    [<c007c2b8>] _etext+0xffd9c2b8/0x126d8                                      
    [<c0023dc0>] _etext+0xffd43dc0/0x126d8                                      

and with the commit reverted:

    [<c007bfec>] kmemleak_alloc+0x14c/0x260                                     
    [<c00795e4>] kmem_cache_alloc+0xd4/0x108                                    
    [<c0147d94>] tty_ldisc_try_get+0x18/0xb0                                    
    [<c0147f10>] tty_ldisc_get+0x18/0x40                                        
    [<c01481bc>] tty_ldisc_reinit+0x28/0x5c                                     
    [<c0148218>] tty_ldisc_release+0x28/0x3c                                    
    [<c0143db0>] tty_release_dev+0x3cc/0x428                                    
    [<c0143e18>] tty_release+0xc/0x14                                           
    [<c007f250>] __fput+0x104/0x1c4                                             
    [<c007c238>] filp_close+0x70/0x7c                                           
    [<c007c2b8>] sys_close+0x74/0xa8                                            
    [<c0023dc0>] ret_fast_syscall+0x0/0x28                                      

Any idea what went wrong? I haven't looked at your commit in detail.

Thanks.

-- 
Catalin


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

* Re: kallsyms broken on ARM by commit 17b1f0d
  2009-06-15 12:47 kallsyms broken on ARM by commit 17b1f0d Catalin Marinas
@ 2009-06-15 12:51 ` Mike Frysinger
  2009-06-15 13:16   ` Catalin Marinas
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2009-06-15 12:51 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Sam Ravnborg, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

On Mon, Jun 15, 2009 at 08:47, Catalin Marinas wrote:
> With the above commit, kallsyms on ARM no longer show correct
> information. That's a trace with this commit:
>
>    [<c007bfec>] _etext+0xffd9bfec/0x126d8
>    [<c00795e4>] _etext+0xffd995e4/0x126d8
>    [<c0147d94>] _etext+0xffe67d94/0x126d8
>    [<c0147f10>] _etext+0xffe67f10/0x126d8
>    [<c01481bc>] _etext+0xffe681bc/0x126d8
>    [<c0148218>] _etext+0xffe68218/0x126d8
>    [<c0143db0>] _etext+0xffe63db0/0x126d8
>    [<c0143e18>] _etext+0xffe63e18/0x126d8
>    [<c007f250>] _etext+0xffd9f250/0x126d8
>    [<c007c238>] _etext+0xffd9c238/0x126d8
>    [<c007c2b8>] _etext+0xffd9c2b8/0x126d8
>    [<c0023dc0>] _etext+0xffd43dc0/0x126d8
>
> and with the commit reverted:
>
>    [<c007bfec>] kmemleak_alloc+0x14c/0x260
>    [<c00795e4>] kmem_cache_alloc+0xd4/0x108
>    [<c0147d94>] tty_ldisc_try_get+0x18/0xb0
>    [<c0147f10>] tty_ldisc_get+0x18/0x40
>    [<c01481bc>] tty_ldisc_reinit+0x28/0x5c
>    [<c0148218>] tty_ldisc_release+0x28/0x3c
>    [<c0143db0>] tty_release_dev+0x3cc/0x428
>    [<c0143e18>] tty_release+0xc/0x14
>    [<c007f250>] __fput+0x104/0x1c4
>    [<c007c238>] filp_close+0x70/0x7c
>    [<c007c2b8>] sys_close+0x74/0xa8
>    [<c0023dc0>] ret_fast_syscall+0x0/0x28
>
> Any idea what went wrong? I haven't looked at your commit in detail.

try this patch (Gentoo mail server is broken atm, so attaching)
-mike

[-- Attachment #2: 0001-kallsyms-fix-inverted-valid-symbol-checking.patch --]
[-- Type: application/octet-stream, Size: 965 bytes --]

From c1d4c2316ee4db7a5747cfd9c744b42b679bea20 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 15 Jun 2009 07:52:48 -0400
Subject: [PATCH] kallsyms: fix inverted valid symbol checking

The previous commit (17b1f0de) introduced a slightly broken consolidation
of the memory text range checking.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 scripts/kallsyms.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 3cb5789..64343cc 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -167,11 +167,11 @@ static int symbol_valid_tr(struct sym_entry *s)
 	for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) {
 		tr = &text_ranges[i];
 
-		if (s->addr >= tr->start && s->addr < tr->end)
-			return 0;
+		if (s->addr >= tr->start && s->addr <= tr->end)
+			return 1;
 	}
 
-	return 1;
+	return 0;
 }
 
 static int symbol_valid(struct sym_entry *s)
-- 
1.6.3.1


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

* Re: kallsyms broken on ARM by commit 17b1f0d
  2009-06-15 12:51 ` Mike Frysinger
@ 2009-06-15 13:16   ` Catalin Marinas
  2009-06-15 13:26     ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2009-06-15 13:16 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Sam Ravnborg, linux-kernel

On Mon, 2009-06-15 at 08:51 -0400, Mike Frysinger wrote:
> On Mon, Jun 15, 2009 at 08:47, Catalin Marinas wrote:
> > With the above commit, kallsyms on ARM no longer show correct
> > information. 
> 
> try this patch (Gentoo mail server is broken atm, so attaching)

Thanks. This patch fixed the problem.

-- 
Catalin


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

* Re: kallsyms broken on ARM by commit 17b1f0d
  2009-06-15 13:16   ` Catalin Marinas
@ 2009-06-15 13:26     ` Sam Ravnborg
  0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2009-06-15 13:26 UTC (permalink / raw)
  To: Catalin Marinas; +Cc: Mike Frysinger, linux-kernel

On Mon, Jun 15, 2009 at 02:16:45PM +0100, Catalin Marinas wrote:
> On Mon, 2009-06-15 at 08:51 -0400, Mike Frysinger wrote:
> > On Mon, Jun 15, 2009 at 08:47, Catalin Marinas wrote:
> > > With the above commit, kallsyms on ARM no longer show correct
> > > information. 
> > 
> > try this patch (Gentoo mail server is broken atm, so attaching)
> 
> Thanks. This patch fixed the problem.

Quick testing - good.
I will forward this to Linus tonight.

	Sam

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

end of thread, other threads:[~2009-06-15 13:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 12:47 kallsyms broken on ARM by commit 17b1f0d Catalin Marinas
2009-06-15 12:51 ` Mike Frysinger
2009-06-15 13:16   ` Catalin Marinas
2009-06-15 13:26     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®