From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932107AbcERNoT (ORCPT ); Wed, 18 May 2016 09:44:19 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38064 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbcERNoR (ORCPT ); Wed, 18 May 2016 09:44:17 -0400 Date: Wed, 18 May 2016 15:44:06 +0200 From: Peter Zijlstra To: Chris Metcalf Cc: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Andrew Morton , Rik van Riel , Tejun Heo , Frederic Weisbecker , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , 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 Message-ID: <20160518134406.GI3193@twins.programming.kicks-ass.net> References: <1459877922-15512-1-git-send-email-cmetcalf@mellanox.com> <1459877922-15512-7-git-send-email-cmetcalf@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459877922-15512-7-git-send-email-cmetcalf@mellanox.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); > +}