Re: kernel size, kcore fun

From: Helge Hafting (
Date: Wed Oct 10 2001 - 04:10:30 EST

Nikita Danilov wrote:

> Haha, I got several pieces of your mail message while doing this.
> (/proc/kcore is unique file, because grep of *any* string on it would
> succeeded).

I tried
strings /proc/kcore | grep any_weird_string_tsst_testtesttest
I expected it to hit a few times - the command line buffer,
the parameter to grep - but I got 7 screenfulls.

Then I understood - this hits the xterm scrollback buffer
too, which makes for some nice recursion.
Doing the same with output to a file hits the cache and
got some repetitions out of that. And then there's
internal buffers of strings and grep.

This reminded me of the commodore 64 game "fort apocalypse",
where your fly a helicopter around in caves. I patched the
machine code once so I could fly through walls. The game simply
loads memory into screen memory depending on coordinates.
So I got an interesting look at how code and state variables
look when interpreted as "terrain". I could identify
the variables holding x and y coordinates by looking at how
they changed when I moved in the two directions.

Then I came upon a very weird area, where everything
moved around in big jumps, changing in weird ways. After a while,
I figured out that I was looking at screen memory, having it
reloaded into itself with a different mapping. Crazy.

Finally - being able to press the fire button and fire
upon pieces of code and variables is the ultimate in
madman debugging and single-click crashes. :-)

Helge Hafting
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:31 EST