All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: Chris Metcalf <cmetcalf-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Gilad Ben Yossef <giladb-d5a29ZRxExrQT0dZR+AlfA@public.gmane.org>,
	Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
	Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	Rik van Riel <riel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Frederic Weisbecker
	<fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	"Paul E. McKenney"
	<paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>,
	Viresh Kumar
	<viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
	linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v12 06/13] task_isolation: support PR_TASK_ISOLATION_STRICT mode
Date: Wed, 18 May 2016 15:44:06 +0200	[thread overview]
Message-ID: <20160518134406.GI3193@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1459877922-15512-7-git-send-email-cmetcalf-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On Tue, Apr 05, 2016 at 01:38:35PM -0400, Chris Metcalf wrote:
> +void task_isolation_interrupt(struct task_struct *task, const char *buf)
> +{
> +	siginfo_t info = {};
> +	int sig;
> +
> +	pr_warn("%s/%d: task_isolation strict mode violated by %s\n",
> +		task->comm, task->pid, buf);
> +

So the function name suggests this is called for interrupts, except its
purpose is to deliver a signal.

Now, in case of exceptions the violation isn't necessarily _by_ the task
itself. You might want to change that to report the exception
type/number instead of the affected task.

> +	/* Get the signal number to use. */
> +	sig = PR_TASK_ISOLATION_GET_SIG(task->task_isolation_flags);
> +	if (sig == 0)
> +		sig = SIGKILL;
> +	info.si_signo = sig;
> +
> +	/*
> +	 * Turn off task isolation mode entirely to avoid spamming
> +	 * the process with signals.  It can re-enable task isolation
> +	 * mode in the signal handler if it wants to.
> +	 */
> +	task_isolation_set_flags(task, 0);
> +
> +	send_sig_info(sig, &info, task);
> +}

WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org>
To: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Gilad Ben Yossef <giladb@ezchip.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>, Tejun Heo <tj@kernel.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Andy Lutomirski <luto@amacapital.net>,
	linux-doc@vger.kernel.org, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12 06/13] task_isolation: support PR_TASK_ISOLATION_STRICT mode
Date: Wed, 18 May 2016 15:44:06 +0200	[thread overview]
Message-ID: <20160518134406.GI3193@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1459877922-15512-7-git-send-email-cmetcalf@mellanox.com>

On Tue, Apr 05, 2016 at 01:38:35PM -0400, Chris Metcalf wrote:
> +void task_isolation_interrupt(struct task_struct *task, const char *buf)
> +{
> +	siginfo_t info = {};
> +	int sig;
> +
> +	pr_warn("%s/%d: task_isolation strict mode violated by %s\n",
> +		task->comm, task->pid, buf);
> +

So the function name suggests this is called for interrupts, except its
purpose is to deliver a signal.

Now, in case of exceptions the violation isn't necessarily _by_ the task
itself. You might want to change that to report the exception
type/number instead of the affected task.

> +	/* Get the signal number to use. */
> +	sig = PR_TASK_ISOLATION_GET_SIG(task->task_isolation_flags);
> +	if (sig == 0)
> +		sig = SIGKILL;
> +	info.si_signo = sig;
> +
> +	/*
> +	 * Turn off task isolation mode entirely to avoid spamming
> +	 * the process with signals.  It can re-enable task isolation
> +	 * mode in the signal handler if it wants to.
> +	 */
> +	task_isolation_set_flags(task, 0);
> +
> +	send_sig_info(sig, &info, task);
> +}

  parent reply	other threads:[~2016-05-18 13:44 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05 17:38 [PATCH v12 00/13] support "task_isolation" mode Chris Metcalf
2016-04-05 17:38 ` Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 01/13] vmstat: add quiet_vmstat_sync function Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 02/13] vmstat: add vmstat_idle function Chris Metcalf
2016-04-05 17:38   ` Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 03/13] lru_add_drain_all: factor out lru_add_drain_needed Chris Metcalf
2016-04-05 17:38   ` Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 04/13] task_isolation: add initial support Chris Metcalf
2016-04-05 17:38   ` Chris Metcalf
2016-05-18 13:34   ` Peter Zijlstra
2016-05-18 13:34     ` Peter Zijlstra
2016-05-18 16:34     ` Chris Metcalf
2016-05-18 16:34       ` Chris Metcalf
2016-05-18 17:09       ` Peter Zijlstra
2016-05-18 17:09         ` Peter Zijlstra
2016-04-05 17:38 ` [PATCH v12 05/13] task_isolation: support CONFIG_TASK_ISOLATION_ALL Chris Metcalf
2016-05-18 13:35   ` Peter Zijlstra
2016-05-18 16:34     ` Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 06/13] task_isolation: support PR_TASK_ISOLATION_STRICT mode Chris Metcalf
2016-04-05 17:38   ` Chris Metcalf
     [not found]   ` <1459877922-15512-7-git-send-email-cmetcalf-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-18 13:44     ` Peter Zijlstra [this message]
2016-05-18 13:44       ` Peter Zijlstra
2016-05-18 16:34       ` Chris Metcalf
2016-05-18 16:34         ` Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 07/13] task_isolation: add debug boot flag Chris Metcalf
2016-05-18 13:56   ` Peter Zijlstra
2016-05-18 16:36     ` Chris Metcalf
     [not found]     ` <684587d7-3653-7570-215f-37d3e9e786bc@mellanox.com>
2016-05-18 17:06       ` Peter Zijlstra
2016-05-19 15:12         ` Chris Metcalf
     [not found]         ` <b22cf841-9555-fff3-435b-646c4fd95bdc@mellanox.com>
2016-05-19 17:54           ` Peter Zijlstra
2016-05-19 18:05             ` Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 08/13] task_isolation: add PR_TASK_ISOLATION_ONE_SHOT flag Chris Metcalf
2016-04-05 17:38   ` Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 09/13] arm, tile: turn off timer tick for oneshot_stopped state Chris Metcalf
2016-04-07 16:58   ` Daniel Lezcano
2016-04-05 17:38 ` [PATCH v12 10/13] arch/x86: enable task isolation functionality Chris Metcalf
2016-05-18 16:23   ` Peter Zijlstra
2016-05-18 16:35     ` Chris Metcalf
2016-05-18 17:10       ` Peter Zijlstra
2016-04-05 17:38 ` [PATCH v12 11/13] arch/tile: " Chris Metcalf
2016-04-05 17:38 ` [PATCH v12 12/13] arm64: factor work_pending state machine to C Chris Metcalf
2016-04-05 17:38   ` Chris Metcalf
2016-07-08 15:43   ` [PATCH]: " Chris Metcalf
2016-07-08 15:43     ` Chris Metcalf
2016-07-08 15:49     ` Will Deacon
2016-07-08 15:49       ` Will Deacon
2016-07-08 16:11       ` Chris Metcalf
2016-07-08 16:11         ` Chris Metcalf
2016-07-11 11:42       ` Will Deacon
2016-07-11 11:42         ` Will Deacon
2016-07-11 12:19         ` Mark Rutland
2016-07-11 12:19           ` Mark Rutland
2016-07-29 18:16           ` Chris Metcalf
2016-07-29 18:16             ` Chris Metcalf
2016-08-09 10:21             ` Will Deacon
2016-08-09 10:21               ` Will Deacon
2016-04-05 17:38 ` [PATCH v12 13/13] arch/arm64: enable task isolation functionality Chris Metcalf
2016-04-05 17:38   ` Chris Metcalf
2016-05-12 18:26 ` [PATCH v12 00/13] support "task_isolation" mode Chris Metcalf
2016-05-12 18:26   ` Chris Metcalf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160518134406.GI3193@twins.programming.kicks-ass.net \
    --to=peterz-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=cmetcalf-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=giladb-d5a29ZRxExrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=riel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.