All of lore.kernel.org
 help / color / mirror / Atom feed
* maps mismatch in /proc/kcore for sparc
@ 2015-03-18 16:56 ` David Ahern
  0 siblings, 0 replies; 10+ messages in thread
From: David Ahern @ 2015-03-18 16:56 UTC (permalink / raw)
  To: LKML; +Cc: sparclinux

I am trying to understand why the perf tool on sparc fails to convert 
kernel symbols when /proc/kcore is used. I have instrumented perf to the 
point I can see that it drops symbols from kallsyms because it cannot 
find a corresponding map when the kernel maps are created based on 
parsing /proc/kcore.


For sparc kernel symbols start at 0x404000:

# less /proc/kallsyms
0000000000404000 T start
0000000000404000 T stext
0000000000404000 T _start
0000000000404000 T _stext
0000000000404000 T _text
0000000000404012 T root_flags
0000000000404014 T root_dev
0000000000404016 T ram_flags
0000000000404018 T sparc_ramdisk_image
000000000040401c T sparc_ramdisk_size
0000000000404030 T sparc_ramdisk_image64
000000000040403c t sparc64_boot
...


But 'objdump -x /proc/kcore' does not show a map covering 0x404000:
# objdump -x /proc/kcore

/proc/kcore:     file format elf64-sparc
/proc/kcore
architecture: sparc:v9, flags 0x00000000:

start address 0x0000000000000000

Program Header:
     NOTE off    0x00000000000005b8 vaddr 0x0000000000000000 paddr 
0x0000000000000000 align 2**0
          filesz 0x0000000000001a3c memsz 0x0000000000000000 flags ---
     LOAD off    0x0008000100004000 vaddr 0x0000000100000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0005ffff00000000 memsz 0x0005ffff00000000 flags rwx
     LOAD off    0x0008000010004000 vaddr 0x0000000010000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x00000000e0000000 memsz 0x00000000e0000000 flags rwx
     LOAD off    0x00000000a0404000 vaddr 0xfff80000a0400000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000000f800000 memsz 0x000000000f800000 flags rwx
     LOAD off    0x000e00000140c000 vaddr 0x0006000001408000 paddr 
0x0000000000000000 align 2**13
          filesz 0x00000000001f0000 memsz 0x00000000001f0000 flags rwx
     LOAD off    0x00000000afd84000 vaddr 0xfff80000afd80000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000018000 memsz 0x0000000000018000 flags rwx
     LOAD off    0x000e0000015fe000 vaddr 0x00060000015fa000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000002000 memsz 0x0000000000002000 flags rwx
     LOAD off    0x00000020c0004000 vaddr 0xfff80020c0000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000040000000 memsz 0x0000000040000000 flags rwx
     LOAD off    0x000e000041804000 vaddr 0x0006000041800000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000800000 memsz 0x0000000000800000 flags rwx
     LOAD off    0x0000004250004000 vaddr 0xfff8004250000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000150000000 memsz 0x0000000150000000 flags rwx
     LOAD off    0x000e000084a04000 vaddr 0x0006000084a00000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000002a00000 memsz 0x0000000002a00000 flags rwx
     LOAD off    0x0000006000004000 vaddr 0xfff8006000000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000800000000 memsz 0x0000000800000000 flags rwx
     LOAD off    0x000e0000c0004000 vaddr 0x00060000c0000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000010000000 memsz 0x0000000010000000 flags rwx
     LOAD off    0x0000008170004000 vaddr 0xfff8008170000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000010000000 memsz 0x0000000010000000 flags rwx
     LOAD off    0x000e000102e04000 vaddr 0x0006000102e00000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000200000 memsz 0x0000000000200000 flags rwx
     LOAD off    0x000000a2d0004000 vaddr 0xfff800a2d0000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000060000000 memsz 0x0000000060000000 flags rwx
     LOAD off    0x000e000145a04000 vaddr 0x0006000145a00000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000c00000 memsz 0x0000000000c00000 flags rwx
     LOAD off    0x000000c340004000 vaddr 0xfff800c340000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000040000000 memsz 0x0000000040000000 flags rwx
     LOAD off    0x000e000186804000 vaddr 0x0006000186800000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000800000 memsz 0x0000000000800000 flags rwx
     LOAD off    0x000000e390004000 vaddr 0xfff800e390000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000530000000 memsz 0x0000000530000000 flags rwx
     LOAD off    0x000e0001c7204000 vaddr 0x00060001c7200000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000000a600000 memsz 0x000000000a600000 flags rwx
     LOAD off    0x0000010000004000 vaddr 0xfff8010000000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000007fd3e000 memsz 0x000000007fd3e000 flags rwx
     LOAD off    0x000e000200004000 vaddr 0x0006000200000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000ffc000 memsz 0x0000000000ffc000 flags rwx
     LOAD off    0x000001007ffd2000 vaddr 0xfff801007ffce000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000000000a000 memsz 0x000000000000a000 flags rwx
     LOAD off    0x000e000201002000 vaddr 0x0006000200ffe000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000002000 memsz 0x0000000000002000 flags rwx


'objdump -x vmlinux' shows:

vmlinux:     file format elf64-sparc
vmlinux
architecture: sparc:v9a, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x0000000000404000

Program Header:
     LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 
0x0000000000400000 align 2**20
          filesz 0x0000000000917b00 memsz 0x0000000000a2bd39 flags rwx
     NOTE off    0x000000000088de98 vaddr 0x0000000000c8de98 paddr 
0x0000000000c8de98 align 2**2
          filesz 0x0000000000000024 memsz 0x0000000000000024 flags r-x
    STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 
0x0000000000000000 align 2**3
          filesz 0x0000000000000000 memsz 0x0000000000000000 flags rwx


Any ideas on where it is going off the rails?

Thanks,
David

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

* maps mismatch in /proc/kcore for sparc
@ 2015-03-18 16:56 ` David Ahern
  0 siblings, 0 replies; 10+ messages in thread
From: David Ahern @ 2015-03-18 16:56 UTC (permalink / raw)
  To: LKML; +Cc: sparclinux

I am trying to understand why the perf tool on sparc fails to convert 
kernel symbols when /proc/kcore is used. I have instrumented perf to the 
point I can see that it drops symbols from kallsyms because it cannot 
find a corresponding map when the kernel maps are created based on 
parsing /proc/kcore.


For sparc kernel symbols start at 0x404000:

# less /proc/kallsyms
0000000000404000 T start
0000000000404000 T stext
0000000000404000 T _start
0000000000404000 T _stext
0000000000404000 T _text
0000000000404012 T root_flags
0000000000404014 T root_dev
0000000000404016 T ram_flags
0000000000404018 T sparc_ramdisk_image
000000000040401c T sparc_ramdisk_size
0000000000404030 T sparc_ramdisk_image64
000000000040403c t sparc64_boot
...


But 'objdump -x /proc/kcore' does not show a map covering 0x404000:
# objdump -x /proc/kcore

/proc/kcore:     file format elf64-sparc
/proc/kcore
architecture: sparc:v9, flags 0x00000000:

start address 0x0000000000000000

Program Header:
     NOTE off    0x00000000000005b8 vaddr 0x0000000000000000 paddr 
0x0000000000000000 align 2**0
          filesz 0x0000000000001a3c memsz 0x0000000000000000 flags ---
     LOAD off    0x0008000100004000 vaddr 0x0000000100000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0005ffff00000000 memsz 0x0005ffff00000000 flags rwx
     LOAD off    0x0008000010004000 vaddr 0x0000000010000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x00000000e0000000 memsz 0x00000000e0000000 flags rwx
     LOAD off    0x00000000a0404000 vaddr 0xfff80000a0400000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000000f800000 memsz 0x000000000f800000 flags rwx
     LOAD off    0x000e00000140c000 vaddr 0x0006000001408000 paddr 
0x0000000000000000 align 2**13
          filesz 0x00000000001f0000 memsz 0x00000000001f0000 flags rwx
     LOAD off    0x00000000afd84000 vaddr 0xfff80000afd80000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000018000 memsz 0x0000000000018000 flags rwx
     LOAD off    0x000e0000015fe000 vaddr 0x00060000015fa000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000002000 memsz 0x0000000000002000 flags rwx
     LOAD off    0x00000020c0004000 vaddr 0xfff80020c0000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000040000000 memsz 0x0000000040000000 flags rwx
     LOAD off    0x000e000041804000 vaddr 0x0006000041800000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000800000 memsz 0x0000000000800000 flags rwx
     LOAD off    0x0000004250004000 vaddr 0xfff8004250000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000150000000 memsz 0x0000000150000000 flags rwx
     LOAD off    0x000e000084a04000 vaddr 0x0006000084a00000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000002a00000 memsz 0x0000000002a00000 flags rwx
     LOAD off    0x0000006000004000 vaddr 0xfff8006000000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000800000000 memsz 0x0000000800000000 flags rwx
     LOAD off    0x000e0000c0004000 vaddr 0x00060000c0000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000010000000 memsz 0x0000000010000000 flags rwx
     LOAD off    0x0000008170004000 vaddr 0xfff8008170000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000010000000 memsz 0x0000000010000000 flags rwx
     LOAD off    0x000e000102e04000 vaddr 0x0006000102e00000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000200000 memsz 0x0000000000200000 flags rwx
     LOAD off    0x000000a2d0004000 vaddr 0xfff800a2d0000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000060000000 memsz 0x0000000060000000 flags rwx
     LOAD off    0x000e000145a04000 vaddr 0x0006000145a00000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000c00000 memsz 0x0000000000c00000 flags rwx
     LOAD off    0x000000c340004000 vaddr 0xfff800c340000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000040000000 memsz 0x0000000040000000 flags rwx
     LOAD off    0x000e000186804000 vaddr 0x0006000186800000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000800000 memsz 0x0000000000800000 flags rwx
     LOAD off    0x000000e390004000 vaddr 0xfff800e390000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000530000000 memsz 0x0000000530000000 flags rwx
     LOAD off    0x000e0001c7204000 vaddr 0x00060001c7200000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000000a600000 memsz 0x000000000a600000 flags rwx
     LOAD off    0x0000010000004000 vaddr 0xfff8010000000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000007fd3e000 memsz 0x000000007fd3e000 flags rwx
     LOAD off    0x000e000200004000 vaddr 0x0006000200000000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000ffc000 memsz 0x0000000000ffc000 flags rwx
     LOAD off    0x000001007ffd2000 vaddr 0xfff801007ffce000 paddr 
0x0000000000000000 align 2**13
          filesz 0x000000000000a000 memsz 0x000000000000a000 flags rwx
     LOAD off    0x000e000201002000 vaddr 0x0006000200ffe000 paddr 
0x0000000000000000 align 2**13
          filesz 0x0000000000002000 memsz 0x0000000000002000 flags rwx


'objdump -x vmlinux' shows:

vmlinux:     file format elf64-sparc
vmlinux
architecture: sparc:v9a, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x0000000000404000

Program Header:
     LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 
0x0000000000400000 align 2**20
          filesz 0x0000000000917b00 memsz 0x0000000000a2bd39 flags rwx
     NOTE off    0x000000000088de98 vaddr 0x0000000000c8de98 paddr 
0x0000000000c8de98 align 2**2
          filesz 0x0000000000000024 memsz 0x0000000000000024 flags r-x
    STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 
0x0000000000000000 align 2**3
          filesz 0x0000000000000000 memsz 0x0000000000000000 flags rwx


Any ideas on where it is going off the rails?

Thanks,
David

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

* Re: maps mismatch in /proc/kcore for sparc
  2015-03-18 16:56 ` David Ahern
@ 2015-03-18 19:43   ` David Miller
  -1 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2015-03-18 19:43 UTC (permalink / raw)
  To: david.ahern; +Cc: linux-kernel, sparclinux

From: David Ahern <david.ahern@oracle.com>
Date: Wed, 18 Mar 2015 10:56:22 -0600

> I am trying to understand why the perf tool on sparc fails to convert
> kernel symbols when /proc/kcore is used. I have instrumented perf to
> the point I can see that it drops symbols from kallsyms because it
> cannot find a corresponding map when the kernel maps are created based
> on parsing /proc/kcore.

I'm looking into this, I think we need to set ARCH_PROC_KCORE_TEXT in
arch/sparc/Kconfig

I have an even worse problem on my T4 system, /proc/kcore is zero
length.  Looking into that now as well.

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

* Re: maps mismatch in /proc/kcore for sparc
@ 2015-03-18 19:43   ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2015-03-18 19:43 UTC (permalink / raw)
  To: david.ahern; +Cc: linux-kernel, sparclinux

From: David Ahern <david.ahern@oracle.com>
Date: Wed, 18 Mar 2015 10:56:22 -0600

> I am trying to understand why the perf tool on sparc fails to convert
> kernel symbols when /proc/kcore is used. I have instrumented perf to
> the point I can see that it drops symbols from kallsyms because it
> cannot find a corresponding map when the kernel maps are created based
> on parsing /proc/kcore.

I'm looking into this, I think we need to set ARCH_PROC_KCORE_TEXT in
arch/sparc/Kconfig

I have an even worse problem on my T4 system, /proc/kcore is zero
length.  Looking into that now as well.

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

* Re: maps mismatch in /proc/kcore for sparc
  2015-03-18 19:43   ` David Miller
@ 2015-03-18 19:57     ` David Ahern
  -1 siblings, 0 replies; 10+ messages in thread
From: David Ahern @ 2015-03-18 19:57 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, sparclinux

On 3/18/15 1:43 PM, David Miller wrote:
> From: David Ahern <david.ahern@oracle.com>
> Date: Wed, 18 Mar 2015 10:56:22 -0600
>
>> I am trying to understand why the perf tool on sparc fails to convert
>> kernel symbols when /proc/kcore is used. I have instrumented perf to
>> the point I can see that it drops symbols from kallsyms because it
>> cannot find a corresponding map when the kernel maps are created based
>> on parsing /proc/kcore.
>
> I'm looking into this, I think we need to set ARCH_PROC_KCORE_TEXT in
> arch/sparc/Kconfig

Missed that config in my fumbling through the kcore code. Adding it to 
sparc/Kconfig and it works. map is added:

kcore_mapfn: dso [kernel.kallsyms]: new map from 404000 to e33d79

and kernel symbols are not dropped. One mystery solved.

Thanks,
David

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

* Re: maps mismatch in /proc/kcore for sparc
@ 2015-03-18 19:57     ` David Ahern
  0 siblings, 0 replies; 10+ messages in thread
From: David Ahern @ 2015-03-18 19:57 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, sparclinux

On 3/18/15 1:43 PM, David Miller wrote:
> From: David Ahern <david.ahern@oracle.com>
> Date: Wed, 18 Mar 2015 10:56:22 -0600
>
>> I am trying to understand why the perf tool on sparc fails to convert
>> kernel symbols when /proc/kcore is used. I have instrumented perf to
>> the point I can see that it drops symbols from kallsyms because it
>> cannot find a corresponding map when the kernel maps are created based
>> on parsing /proc/kcore.
>
> I'm looking into this, I think we need to set ARCH_PROC_KCORE_TEXT in
> arch/sparc/Kconfig

Missed that config in my fumbling through the kcore code. Adding it to 
sparc/Kconfig and it works. map is added:

kcore_mapfn: dso [kernel.kallsyms]: new map from 404000 to e33d79

and kernel symbols are not dropped. One mystery solved.

Thanks,
David

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

* Re: maps mismatch in /proc/kcore for sparc
  2015-03-18 19:57     ` David Ahern
@ 2015-03-18 20:14       ` David Miller
  -1 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2015-03-18 20:14 UTC (permalink / raw)
  To: david.ahern; +Cc: linux-kernel, sparclinux

From: David Ahern <david.ahern@oracle.com>
Date: Wed, 18 Mar 2015 13:57:59 -0600

> On 3/18/15 1:43 PM, David Miller wrote:
>> From: David Ahern <david.ahern@oracle.com>
>> Date: Wed, 18 Mar 2015 10:56:22 -0600
>>
>>> I am trying to understand why the perf tool on sparc fails to convert
>>> kernel symbols when /proc/kcore is used. I have instrumented perf to
>>> the point I can see that it drops symbols from kallsyms because it
>>> cannot find a corresponding map when the kernel maps are created based
>>> on parsing /proc/kcore.
>>
>> I'm looking into this, I think we need to set ARCH_PROC_KCORE_TEXT in
>> arch/sparc/Kconfig
> 
> Missed that config in my fumbling through the kcore code. Adding it to
> sparc/Kconfig and it works. map is added:
> 
> kcore_mapfn: dso [kernel.kallsyms]: new map from 404000 to e33d79
> 
> and kernel symbols are not dropped. One mystery solved.

I'm really wondering how you have a non-zero-length /proc/kcore file, do
you have any local changes in your tree?

I ask because no memory regions should be added until we add the
"System RAM" entries to /proc/iomem, and this is done by report_memory()
in arch/sparc/mm/init_64.c which is a device_initcall().

The kcore core that looks for that stuff is an fs_initcall() which runs
earlier, and thus won't see any entries at all.

You have something different in your tree if kcore is actually finding
memory to add to the kcore memory lists.

Oh I see, you're using older sources which don't have:

	commit abaf3787ac26ba33e2f75e76b1174c32254c25b0
	Author: Paul Gortmaker <paul.gortmaker@windriver.com>
	Date:   Thu Jan 23 15:55:45 2014 -0800

	    fs/proc: don't use module_init for non-modular core code

And that explains everything, I'll submit the following:

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 96ac69c..efb00ec 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -86,6 +86,9 @@ config ARCH_DEFCONFIG
 	default "arch/sparc/configs/sparc32_defconfig" if SPARC32
 	default "arch/sparc/configs/sparc64_defconfig" if SPARC64
 
+config ARCH_PROC_KCORE_TEXT
+	def_bool y
+
 config IOMMU_HELPER
 	bool
 	default y if SPARC64
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 3ea267c..4ca0d6b 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2820,7 +2820,7 @@ static int __init report_memory(void)
 
 	return 0;
 }
-device_initcall(report_memory);
+arch_initcall(report_memory);
 
 #ifdef CONFIG_SMP
 #define do_flush_tlb_kernel_range	smp_flush_tlb_kernel_range

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

* Re: maps mismatch in /proc/kcore for sparc
@ 2015-03-18 20:14       ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2015-03-18 20:14 UTC (permalink / raw)
  To: david.ahern; +Cc: linux-kernel, sparclinux

From: David Ahern <david.ahern@oracle.com>
Date: Wed, 18 Mar 2015 13:57:59 -0600

> On 3/18/15 1:43 PM, David Miller wrote:
>> From: David Ahern <david.ahern@oracle.com>
>> Date: Wed, 18 Mar 2015 10:56:22 -0600
>>
>>> I am trying to understand why the perf tool on sparc fails to convert
>>> kernel symbols when /proc/kcore is used. I have instrumented perf to
>>> the point I can see that it drops symbols from kallsyms because it
>>> cannot find a corresponding map when the kernel maps are created based
>>> on parsing /proc/kcore.
>>
>> I'm looking into this, I think we need to set ARCH_PROC_KCORE_TEXT in
>> arch/sparc/Kconfig
> 
> Missed that config in my fumbling through the kcore code. Adding it to
> sparc/Kconfig and it works. map is added:
> 
> kcore_mapfn: dso [kernel.kallsyms]: new map from 404000 to e33d79
> 
> and kernel symbols are not dropped. One mystery solved.

I'm really wondering how you have a non-zero-length /proc/kcore file, do
you have any local changes in your tree?

I ask because no memory regions should be added until we add the
"System RAM" entries to /proc/iomem, and this is done by report_memory()
in arch/sparc/mm/init_64.c which is a device_initcall().

The kcore core that looks for that stuff is an fs_initcall() which runs
earlier, and thus won't see any entries at all.

You have something different in your tree if kcore is actually finding
memory to add to the kcore memory lists.

Oh I see, you're using older sources which don't have:

	commit abaf3787ac26ba33e2f75e76b1174c32254c25b0
	Author: Paul Gortmaker <paul.gortmaker@windriver.com>
	Date:   Thu Jan 23 15:55:45 2014 -0800

	    fs/proc: don't use module_init for non-modular core code

And that explains everything, I'll submit the following:

diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 96ac69c..efb00ec 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -86,6 +86,9 @@ config ARCH_DEFCONFIG
 	default "arch/sparc/configs/sparc32_defconfig" if SPARC32
 	default "arch/sparc/configs/sparc64_defconfig" if SPARC64
 
+config ARCH_PROC_KCORE_TEXT
+	def_bool y
+
 config IOMMU_HELPER
 	bool
 	default y if SPARC64
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 3ea267c..4ca0d6b 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2820,7 +2820,7 @@ static int __init report_memory(void)
 
 	return 0;
 }
-device_initcall(report_memory);
+arch_initcall(report_memory);
 
 #ifdef CONFIG_SMP
 #define do_flush_tlb_kernel_range	smp_flush_tlb_kernel_range

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

* Re: maps mismatch in /proc/kcore for sparc
  2015-03-18 20:14       ` David Miller
@ 2015-03-18 21:22         ` David Ahern
  -1 siblings, 0 replies; 10+ messages in thread
From: David Ahern @ 2015-03-18 21:22 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, sparclinux

On 3/18/15 2:14 PM, David Miller wrote:
> Oh I see, you're using older sources which don't have:
>
> 	commit abaf3787ac26ba33e2f75e76b1174c32254c25b0
> 	Author: Paul Gortmaker <paul.gortmaker@windriver.com>
> 	Date:   Thu Jan 23 15:55:45 2014 -0800
>
> 	    fs/proc: don't use module_init for non-modular core code

Interesting.

# git describe abaf3787ac26ba33e2f75e76b1174c32254c25b0
v3.13-4322-gabaf3787ac26

I am running 3.18 and that patch has been applied to the tree.

Looking at 4.0.0-rc3 and I do see the 0-length problem. Perhaps another 
defect is the root cause?

Regardless the below works.

David

>
> And that explains everything, I'll submit the following:
>
> diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
> index 96ac69c..efb00ec 100644
> --- a/arch/sparc/Kconfig
> +++ b/arch/sparc/Kconfig
> @@ -86,6 +86,9 @@ config ARCH_DEFCONFIG
>   	default "arch/sparc/configs/sparc32_defconfig" if SPARC32
>   	default "arch/sparc/configs/sparc64_defconfig" if SPARC64
>
> +config ARCH_PROC_KCORE_TEXT
> +	def_bool y
> +
>   config IOMMU_HELPER
>   	bool
>   	default y if SPARC64
> diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
> index 3ea267c..4ca0d6b 100644
> --- a/arch/sparc/mm/init_64.c
> +++ b/arch/sparc/mm/init_64.c
> @@ -2820,7 +2820,7 @@ static int __init report_memory(void)
>
>   	return 0;
>   }
> -device_initcall(report_memory);
> +arch_initcall(report_memory);
>
>   #ifdef CONFIG_SMP
>   #define do_flush_tlb_kernel_range	smp_flush_tlb_kernel_range
>


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

* Re: maps mismatch in /proc/kcore for sparc
@ 2015-03-18 21:22         ` David Ahern
  0 siblings, 0 replies; 10+ messages in thread
From: David Ahern @ 2015-03-18 21:22 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, sparclinux

On 3/18/15 2:14 PM, David Miller wrote:
> Oh I see, you're using older sources which don't have:
>
> 	commit abaf3787ac26ba33e2f75e76b1174c32254c25b0
> 	Author: Paul Gortmaker <paul.gortmaker@windriver.com>
> 	Date:   Thu Jan 23 15:55:45 2014 -0800
>
> 	    fs/proc: don't use module_init for non-modular core code

Interesting.

# git describe abaf3787ac26ba33e2f75e76b1174c32254c25b0
v3.13-4322-gabaf3787ac26

I am running 3.18 and that patch has been applied to the tree.

Looking at 4.0.0-rc3 and I do see the 0-length problem. Perhaps another 
defect is the root cause?

Regardless the below works.

David

>
> And that explains everything, I'll submit the following:
>
> diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
> index 96ac69c..efb00ec 100644
> --- a/arch/sparc/Kconfig
> +++ b/arch/sparc/Kconfig
> @@ -86,6 +86,9 @@ config ARCH_DEFCONFIG
>   	default "arch/sparc/configs/sparc32_defconfig" if SPARC32
>   	default "arch/sparc/configs/sparc64_defconfig" if SPARC64
>
> +config ARCH_PROC_KCORE_TEXT
> +	def_bool y
> +
>   config IOMMU_HELPER
>   	bool
>   	default y if SPARC64
> diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
> index 3ea267c..4ca0d6b 100644
> --- a/arch/sparc/mm/init_64.c
> +++ b/arch/sparc/mm/init_64.c
> @@ -2820,7 +2820,7 @@ static int __init report_memory(void)
>
>   	return 0;
>   }
> -device_initcall(report_memory);
> +arch_initcall(report_memory);
>
>   #ifdef CONFIG_SMP
>   #define do_flush_tlb_kernel_range	smp_flush_tlb_kernel_range
>


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

end of thread, other threads:[~2015-03-18 21:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 16:56 maps mismatch in /proc/kcore for sparc David Ahern
2015-03-18 16:56 ` David Ahern
2015-03-18 19:43 ` David Miller
2015-03-18 19:43   ` David Miller
2015-03-18 19:57   ` David Ahern
2015-03-18 19:57     ` David Ahern
2015-03-18 20:14     ` David Miller
2015-03-18 20:14       ` David Miller
2015-03-18 21:22       ` David Ahern
2015-03-18 21:22         ` David Ahern

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.