Messages in this thread |  | | Date | Sun, 5 Jan 1997 03:39:45 -0500 | From | "David S. Miller" <> | Subject | Re: 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 /_____________/ / // /_/ ><
|  |