[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1810192100130.1651@nanos.tec.linutronix.de>
Date: Fri, 19 Oct 2018 21:12:48 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Tim Chen <tim.c.chen@...ux.intel.com>
cc: Jiri Kosina <jikos@...nel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Woodhouse <dwmw@...zon.co.uk>,
Andi Kleen <ak@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Casey Schaufler <casey.schaufler@...el.com>,
Asit Mallick <asit.k.mallick@...el.com>,
Arjan van de Ven <arjan@...ux.intel.com>,
Jon Masters <jcm@...hat.com>, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: Re: [Patch v3 07/13] x86/process Add arch_set_dumpable
On Thu, 18 Oct 2018, Tim Chen wrote:
> On 10/18/2018 06:28 AM, Thomas Gleixner wrote:
> >
> > So now the obvious question. set_dumpable() operates on tsk->mm. i.e. it's
> > a process wide operation. But arch_set_dumpable() operates on the task
> > itself. What about the other tasks of that process?
>
> I missed this part.
>
> Fixing this is tricky as I don't see an easy way to
> reverse map mm back to all tasks that use the same mm
> to update their STIBP flags.
task is known and handed in to the function. So why do you want to reverse
map mm?
for_each_thread(task, ...) is what you want. The only thing to verify is
whether you can lock the tasks sighand lock there. And then it's enough to
set/clear the TIF bit and let it take effect at the next context switch.
Thanks,
tglx
Powered by blists - more mailing lists