Skip to contentSkip to conversation

size in /proc/modules

DISCUSSION John Levon 2 participants 2 messages Jan 20, 2003 – Jan 21, 2003

lore
Share & tools
lore

John Levon

author
#0 lore raw

/proc/modules size field includes init_size in 2.5. Why ?

The removal of sensible values in /proc/ksyms means that oprofile can no longer attribute module samples reliably. The only information we have is module_core address, and size == core_size+init_size. Since init code is removed in sys_init_module, this will overestimate, and can lead to overlapping with the start of another module, afaics.

In 2.4, we had size(.text), which could underestimate (think .text.exit), but that is not a big problem.

Rusty, does this fall under another one of your "corner cases" ? (what I would call "flaky code" ...)

Or I have I just missed something obvious ?

regards
john

Signature · 2 lines
"Anyone who quotes Rusty in their sig is an idiot."
	- me
#1 lore raw

In message <[email protected]> you write:

Quoted 9 lines

/proc/modules size field includes init_size in 2.5. Why ?

The removal of sensible values in /proc/ksyms means that oprofile can no longer attribute module samples reliably. The only information we have is module_core address, and size == core_size+init_size. Since init code is removed in sys_init_module, this will overestimate, and can lead to overlapping with the start of another module, afaics.

Quoted 7 lines

In 2.4, we had size(.text), which could underestimate (think .text.exit), but that is not a big problem.

Rusty, does this fall under another one of your "corner cases" ? (what I would call "flaky code" ...)

Or I have I just missed something obvious ?

Yes, line 1328 of kernel/module.c, by the sound of it 8)

I was thinking of you when I added this, actually.

Hope that helps!
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.