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: <fcee25f1-9459-6947-dc30-9bbe7d200dfb@mellanox.com>
Date:	Wed, 18 May 2016 12:35:40 -0400
From:	Chris Metcalf <cmetcalf@...lanox.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	Gilad Ben Yossef <giladb@...hip.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...nel.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>,
	Andy Lutomirski <luto@...capital.net>,
	"H. Peter Anvin" <hpa@...or.com>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v12 10/13] arch/x86: enable task isolation functionality

On 5/18/2016 12:23 PM, Peter Zijlstra wrote:
> On Tue, Apr 05, 2016 at 01:38:39PM -0400, Chris Metcalf wrote:
>> diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
>> index 06cbe25861f1..b02205085571 100644
>> --- a/arch/x86/kernel/traps.c
>> +++ b/arch/x86/kernel/traps.c
>> @@ -36,6 +36,7 @@
>>   #include <linux/mm.h>
>>   #include <linux/smp.h>
>>   #include <linux/io.h>
>> +#include <linux/isolation.h>
>>   
>>   #ifdef CONFIG_EISA
>>   #include <linux/ioport.h>
>> @@ -382,6 +383,7 @@ dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
>>   	case 2:	/* Bound directory has invalid entry. */
>>   		if (mpx_handle_bd_fault())
>>   			goto exit_trap;
>> +		task_isolation_exception("bounds check");
>>   		break; /* Success, it was handled */
>>   	case 1: /* Bound violation. */
>>   		info = mpx_generate_siginfo(regs);
>> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
>> index 5ce1ed02f7e8..025e9d2850c1 100644
>> --- a/arch/x86/mm/fault.c
>> +++ b/arch/x86/mm/fault.c
>> @@ -14,6 +14,7 @@
>>   #include <linux/prefetch.h>		/* prefetchw			*/
>>   #include <linux/context_tracking.h>	/* exception_enter(), ...	*/
>>   #include <linux/uaccess.h>		/* faulthandler_disabled()	*/
>> +#include <linux/isolation.h>		/* task_isolation_exception	*/
>>   
>>   #include <asm/cpufeature.h>		/* boot_cpu_has, ...		*/
>>   #include <asm/traps.h>			/* dotraplinkage, ...		*/
>> @@ -1259,6 +1260,7 @@ __do_page_fault(struct pt_regs *regs, unsigned long error_code,
>>   		local_irq_enable();
>>   		error_code |= PF_USER;
>>   		flags |= FAULT_FLAG_USER;
>> +		task_isolation_exception("page fault at %#lx", address);
>>   	} else {
>>   		if (regs->flags & X86_EFLAGS_IF)
>>   			local_irq_enable();
>
> That seems to miss a whole bunch of exceptions... what up?

We only need to do an explicit call in the case where the exception does NOT
result in a signal, since a signal is something that will be really obvious to
the application in any case.  So it's just stuff like handled page faults,
handled bounds checks for x86, handled unaligned load/store for tilegx, etc.

-- 
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ