lkml.org 
[lkml]   [1997]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MMU protected kernel stacks [was: Re: Kernel stack corruption with SCSI]
   Date: Sat, 4 Jan 1997 19:44:04 +0100 (MET)
From: Ingo Molnar <mingo@pc5829.hil.siemens.at>

Is there any easy way to do this?

Use your original code, and use the hack to scsi_scsis I suggested in
my previous mail, should work just fine.

the only way i can think of is hacking virt_to_* to detect such MMU
kernel stack areas and doing the translation correctly.

the virt_to_*() and *_to_phys() routines are extremely misleading as
to what they are expected to do for you for pages mapped in different
ways in the system. Currently you only really get consistant results
for pages in the free page pool, as you noted.

On some systems (some sun4c things come to mind) there are mappings
which are not backed by any page table information at all, because it
simply isn't necessary.

Those routines should probably turn into something like:

if(in_free_page_pool(addr))
return constant_translation(addr);
addr = check_swapper_page_tables();
if(could_not_find_it)
addr = probe_mmu();
return addr;

Handling device memory and other anomalies in a consistant fashion for
all architectures is beyond the scope of this email.

---------------------------------------------////
Yow! 11.26 MB/s remote host TCP bandwidth & ////
199 usec remote TCP latency over 100Mb/s ////
ethernet. Beat that! ////
-----------------------------------------////__________ o
David S. Miller, davem@caip.rutgers.edu /_____________/ / // /_/ ><

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.068 / U:2.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site