Re: [PATCH] per-cpu slab

From: Juan J. Quintela (quintela@fi.udc.es)
Date: Thu Jun 08 2000 - 17:07:45 EST


>>>>> "dave" == Dave Jones <dave@denial.force9.co.uk> writes:

dave> Manfred Spraul <manfreds@colorfullife.com> wrote:
>> If you want to benchmark the code: disable SLAB_DEBUG_SUPPORT &
>> SLAB_STATS, otherwise you'll see a huge slowdown: double free detection
>> is now always on, and red zoning is also enabled (SLAB_FORCED_DEBUG).

dave> This reminded me of something I was curious about recently.
dave> What exactly is red-zoning? I understand slab-poisoning,
dave> but couldn't figure out what red-zoning actually does.

Normally red-zoning means to read/write protect one page (for
instance) the end of the stack, if you try to access that page (that
means that you need more stack that stimated), you will provoke a
segmentation fault. If you have stored the red-stack addresses, you
can indeed tell _which_ thread provokes the stack overflow, and you
can actuate in consecuence:
    - kill the process
    - kill the thread
    - allocate a bigger stack
    - ....

That is red-zonning aplicated to stacks. You can applicate a similar
technique in other situations.

Later, Juanp

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:16 EST