lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrXbc0SQEdjuRgyxd933LmEiairodw+j5XqxcnOQszLLcg@mail.gmail.com>
Date:	Mon, 28 Sep 2015 15:40:09 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Chris Metcalf <cmetcalf@...hip.com>
Cc:	Gilad Ben Yossef <giladb@...hip.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Rik van Riel <riel@...hat.com>, Tejun Heo <tj@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Christoph Lameter <cl@...ux.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 05/11] task_isolation: add debug boot flag

On Mon, Sep 28, 2015 at 2:55 PM, Chris Metcalf <cmetcalf@...hip.com> wrote:
> On 09/28/2015 04:59 PM, Andy Lutomirski wrote:
>>
>> On Mon, Sep 28, 2015 at 11:17 AM, Chris Metcalf <cmetcalf@...hip.com>
>> wrote:
>>>
>>> The new "task_isolation_debug" flag simplifies debugging
>>> of TASK_ISOLATION kernels when processes are running in
>>> PR_TASK_ISOLATION_ENABLE mode.  Such processes should get no
>>> interrupts from the kernel, and if they do, when this boot flag is
>>> specified a kernel stack dump on the console is generated.
>>>
>>> It's possible to use ftrace to simply detect whether a task_isolation
>>> core has unexpectedly entered the kernel.  But what this boot flag
>>> does is allow the kernel to provide better diagnostics, e.g. by
>>> reporting in the IPI-generating code what remote core and context
>>> is preparing to deliver an interrupt to a task_isolation core.
>>>
>>> It may be worth considering other ways to generate useful debugging
>>> output rather than console spew, but for now that is simple and direct.
>>
>> This may be addressed elsewhere, but is there anything that alerts the
>> task or the admin if it's PR_TASK_ISOLATION_ENABLE and *not* on a
>> nohz_full core?
>
>
> No, and I've thought about it without coming up with a great
> solution.  We could certainly fail the initial prctl() if the caller
> was not on a nohz_full core.  But this seems a little asymmetric
> since the task could be on such a core at prctl() time, and then
> do a sched_setaffinity() later to a non-nohz-full core.  Would
> we want to fail that call?  Seems heavy-handed.  Or we could
> then clear the task-isolation state and emit a console message.

If I were writing a program that used this feature, I think I'd want
to know early that it's not going to work so I can tell the admin very
loudly to fix it.  Maybe just failing the prctl would be enough.  If
someone turns on the prctl and then changes their affinity, maybe we
should treat it as though they're just asking for trouble and allow
it.

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ