[lkml]   [1997]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Kernel stack corruption with SCSI

[correcting my mail]

> #define alloc_kernel_stack() __get_free_page(GFP_KERNEL)
> #define free_kernel_stack(page) free_page((page))
> #else
> #define alloc_kernel_stack() vmalloc(4096)
> #define free_kernel_stack(page) vfree((page))
> #endif
> thus all kernel stacks are MMU protected and separated by a zero pte? I
> havent checked this (yet), just wondering wether someone has done this
> already. This is a bit safer (and the resulting fault is much more
> informative).

well currently the fault will be a triple fault, thus making the situation
much worse than the current STACK_MAGIC solution.

but what if we make the double fault handler a task gate? We could call a
special i386 task (with a correct stack), to get the previous task cleaned
up. As far as i remember, such task switch pushes nothing to the old
stack, thus we cannot see a triple fault ...

is this correct?

-- mingo

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