lkml.org 
[lkml]   [2006]   [Jan]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 26 Jan 2006 06:28:20 +0100
FromEric Dumazet <>
SubjectRe: Red zones
Bernd Eckenfels a écrit :
> Eric Dumazet <dada1@cosmosbay.com> wrote:
>> We can use a red zone big enough to hold the whole per_cpu data.
> 
> I am trying to learn a bit here: why is it required to have a speciel red
> zone for this case? Wouldnt it make more sence to have a single red zone
> which can be used by all locations in the kernel for unused structures? That
> would reduce the number of wasted segements in the page table, or?
>

On x86_64, available virtual space is huge, so having different red zones can 
spot the fault more easily : If the target of the fault is in the PER_CPU 
redzone given range, we can instantly knows there is still a per_cpu() user 
accessing a non possible cpu area. As the red zone is not mapped at all, no 
page table is setup.


On 32 bits platforms, this is completely different : space is scarse (typical 
User/Kernel split of 3GB/1GB), so we should avoid to reserve even a 32 KB 
redzone. We could do it in DEBUG mode for example. Current interim patch in 
2.6.16-rc1-mm3 is using NULL pointer but this is not a perfect solution since 
the underlying current user process can perfectly map something in this 'zone'.

Eric


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

\
 
 \ /
  Last update: 2006-01-26 05:30    [from the cache]
©2003-2008