Re: size of /proc/kcore grows?

From: Christian Kujau
Date: Wed Mar 09 2005 - 08:25:34 EST


Tony Luck wrote:
>
> Take a look at the driver (fs/proc/kcore.c) that creates this pseudo-file.

will do ;)

> Initially the size of the file is set from the size of your memory.
>
> Reading the file has the side-effect of setting up the ELF headers to make
> this look like an ELF file ... in fact a sparse one. Use "objdump" (with the
> "-p" flag I think) to show the headers, and you'll see which offsets in the file
> correspond to which kernel virtual addresses.

ah, well. i was just curious, why the file on the filesystem did not grow
beyond 4 times of the size of the ram. i just reproduced it on another
machine, booted with "mem=48M" and "dd" tried to write out a file until
E_NOSPACE happens, just as expected.

thank you,
Christian.
--
BOFH excuse #133:

It's not plugged in.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/