Skip to contentSkip to conversation

kallsyms broken on ARM by commit 17b1f0d

DISCUSSION Catalin Marinas 3 participants 4 messages Jun 15, 2009

lore
Share & tools
lore
#0 lore raw

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.

Signature · 1 line
Catalin
#1 lore raw
Quoted 31 lines · Catalin Marinas

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
Quoted 1 line

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

From c1d4c2316ee4db7a5747cfd9c744b42b679bea20 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <[email protected]>
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.

---
 scripts/kallsyms.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/kallsyms.c +3 -3
index 3cb5789..64343cc 100644
@@ -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)
Signature · 1 line
1.6.3.1
#2 lore raw
Quoted 5 lines · Mike Frysinger
Quoted 2 lines · Catalin Marinas

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.

Signature · 1 line
Catalin
#3 lore raw
Quoted 8 lines · Catalin Marinas
Quoted 5 lines · Mike Frysinger
Quoted 2 lines · Catalin Marinas

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