[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1610210922490.4797@nanos>
Date: Fri, 21 Oct 2016 10:05:08 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
cc: Andy Lutomirski <luto@...capital.net>,
Roman Pen <roman.penyaev@...fitbricks.com>,
Andy Lutomirski <luto@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Brian Gerst <brgerst@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>,
Tejun Heo <tj@...nel.org>, X86 ML <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] x86/dumpstack: on oops do not rewind stack for
kthread
On Fri, 21 Oct 2016, Peter Zijlstra wrote:
> We need to preserve the entire struct kthread on the stack, kthread just
> abuses that pointer to stash an on-stack kthread descriptor. See
> kthread():
>
> current->vfork_done = &self.exited;
>
> Its a horrible horrible thing kthread does. I suppose there might have
> been some intent by keeping that exited completion last in the
> structure, but *shudder*.
>
> But yes, leaving enough stack to not clobber that might keep this horror
> show working.
>
> ISTR talk about alternative schemes for this a long time ago, but I
> cannot recall :-(
The simplest solution would be to stick struct kthread into task_struct,
but that's bloat.
But we can allocate it seperately along with kthread_create_info. That's
pretty straight forward.
Thanks,
tglx
Powered by blists - more mailing lists