[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ttlbm7tj.fsf@linux.intel.com>
Date: Tue, 12 Mar 2024 14:58:00 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
akpm@...ux-foundation.org, x86@...nel.org, bp@...en8.de,
brauner@...nel.org, bristot@...hat.com, bsegall@...gle.com,
dave.hansen@...ux.intel.com, dianders@...omium.org,
dietmar.eggemann@....com, eric.devolder@...cle.com, hca@...ux.ibm.com,
hch@...radead.org, hpa@...or.com, jacob.jun.pan@...ux.intel.com,
jgg@...pe.ca, jpoimboe@...nel.org, jroedel@...e.de,
juri.lelli@...hat.com, kent.overstreet@...ux.dev, kinseyho@...gle.com,
kirill.shutemov@...ux.intel.com, lstoakes@...il.com, luto@...nel.org,
mgorman@...e.de, mic@...ikod.net, michael.christie@...cle.com,
mingo@...hat.com, mjguzik@...il.com, mst@...hat.com,
npiggin@...il.com, peterz@...radead.org, pmladek@...e.com,
rick.p.edgecombe@...el.com, rostedt@...dmis.org, surenb@...gle.com,
tglx@...utronix.de, urezki@...il.com, vincent.guittot@...aro.org
Subject: Re: [RFC 11/14] x86: add support for Dynamic Kernel Stacks
Pasha Tatashin <pasha.tatashin@...een.com> 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
Powered by blists - more mailing lists