Re: [RFC 11/14] x86: add support for Dynamic Kernel Stacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pasha Tatashin <pasha.tatashin@xxxxxxxxxx> writes:

> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index d6375b3c633b..651c558b10eb 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -1198,6 +1198,9 @@ do_kern_addr_fault(struct pt_regs *regs, unsigned long hw_error_code,
>  	if (is_f00f_bug(regs, hw_error_code, address))
>  		return;
>  
> +	if (dynamic_stack_fault(current, address))
> +		return;

Probably I'm missing something here, but since you are on the same stack as
you are trying to fix up, how can this possibly work?

Fault on missing stack
#PF
<will push more stuff onto the missing stack causing a double fault>

You would need a separate stack just to handle this. But the normal
page fault handler couldn't use it because it needs to be able to block.

Ah I get it -- you handle it in the double fault handler?  So every
stack grow will be a #DF too? That's scary. 


-Andi




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux