Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-24 Thread H. Peter Anvin
On 09/24/2012 01:43 PM, Kees Cook wrote: > > How about this... > > mem protection : nx smap smep > > Maybe the "why" of a cpu feature being missing from the "mem > protection" line can stay in printk? > Come to think about it, since we use setup_set/clear_cpu_cap we aready don't list the feat

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-24 Thread Kees Cook
On Mon, Sep 24, 2012 at 1:31 PM, H. Peter Anvin wrote: > On 09/22/2012 04:32 AM, Ingo Molnar wrote: >> >> * H. Peter Anvin wrote: >> >>> On 09/21/2012 03:08 PM, Dave Jones wrote: Perhaps add a printk somewhere to show that it's actually been enabled maybe ? Also, would i

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-24 Thread H. Peter Anvin
On 09/22/2012 04:32 AM, Ingo Molnar wrote: > > * H. Peter Anvin wrote: > >> On 09/21/2012 03:08 PM, Dave Jones wrote: >>> >>> Perhaps add a printk somewhere to show that it's actually been enabled >>> maybe ? >>> >>> Also, would it be feasible to add something like we have for test_nx ? >>> If

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-22 Thread Ingo Molnar
* H. Peter Anvin wrote: > On 09/21/2012 03:08 PM, Dave Jones wrote: > > > > Perhaps add a printk somewhere to show that it's actually been enabled > > maybe ? > > > > Also, would it be feasible to add something like we have for test_nx ? > > If this feature regresses in some way in the future

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread Eric W. Biederman
"H. Peter Anvin" writes: > On 09/21/2012 03:07 PM, Eric W. Biederman wrote: >> >> Have you tested kexec in this environment? >> >> This is the kind of cpu feature that when we enable it, frequently we >> have to do something on the kexec path. >> >> At a quick skim it looks like the kexec path

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread H. Peter Anvin
On 09/21/2012 03:07 PM, Eric W. Biederman wrote: > > Have you tested kexec in this environment? > > This is the kind of cpu feature that when we enable it, frequently we > have to do something on the kexec path. > > At a quick skim it looks like the kexec path is using kernel page table > entrie

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread H. Peter Anvin
On 09/21/2012 03:08 PM, Dave Jones wrote: > > Perhaps add a printk somewhere to show that it's actually been enabled maybe ? > > Also, would it be feasible to add something like we have for test_nx ? > If this feature regresses in some way in the future, I suspect we'd like > to know about it soo

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread Dave Jones
On Fri, Sep 21, 2012 at 12:43:04PM -0700, H. Peter Anvin wrote: > Supervisor Mode Access Prevention (SMAP) is a new security feature > disclosed by Intel in revision 014 of the Intel® Architecture > Instruction Set Extensions Programming Reference: > > http://software.intel.com/sites/default/

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread Eric W. Biederman
"H. Peter Anvin" writes: > Supervisor Mode Access Prevention (SMAP) is a new security feature > disclosed by Intel in revision 014 of the Intel® Architecture > Instruction Set Extensions Programming Reference: > > http://software.intel.com/sites/default/files/319433-014.pdf > > When SMAP is activ

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread H. Peter Anvin
On 09/21/2012 02:09 PM, Linus Torvalds wrote: > On Fri, Sep 21, 2012 at 2:03 PM, H. Peter Anvin wrote: >> >> A while ago I also did a mockup patch which switched %cr3 to >> swapper_pg_dir while entering the kernel (basically where the CLAC >> instructions go, plus the SYSCALL path; a restore was o

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread Linus Torvalds
On Fri, Sep 21, 2012 at 2:03 PM, H. Peter Anvin wrote: > > A while ago I also did a mockup patch which switched %cr3 to > swapper_pg_dir while entering the kernel (basically where the CLAC > instructions go, plus the SYSCALL path; a restore was obviously needed, > too.) The performance was atroci

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread H. Peter Anvin
On 09/21/2012 01:08 PM, Ingo Molnar wrote: > > * Linus Torvalds wrote: > >> On Fri, Sep 21, 2012 at 12:43 PM, H. Peter Anvin >> wrote: >> >>> Supervisor Mode Access Prevention (SMAP) is a new security >>> feature disclosed by Intel in revision 014 of the Intel® >>> Architecture Instruction S

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread Ingo Molnar
* Linus Torvalds wrote: > On Fri, Sep 21, 2012 at 12:43 PM, H. Peter Anvin wrote: > > > Supervisor Mode Access Prevention (SMAP) is a new security > > feature disclosed by Intel in revision 014 of the Intel® > > Architecture Instruction Set Extensions Programming > > Reference: > > Looks go

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread H. Peter Anvin
On 09/21/2012 12:54 PM, Linus Torvalds wrote: > On Fri, Sep 21, 2012 at 12:43 PM, H. Peter Anvin wrote: >> Supervisor Mode Access Prevention (SMAP) is a new security feature >> disclosed by Intel in revision 014 of the Intel® Architecture >> Instruction Set Extensions Programming Reference: > > L

Re: [PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread Linus Torvalds
On Fri, Sep 21, 2012 at 12:43 PM, H. Peter Anvin wrote: > Supervisor Mode Access Prevention (SMAP) is a new security feature > disclosed by Intel in revision 014 of the Intel® Architecture > Instruction Set Extensions Programming Reference: Looks good. Did this find any bugs, btw? We've had a fe

[PATCH 00/11] x86: Supervisor Mode Access Prevention

2012-09-21 Thread H. Peter Anvin
Supervisor Mode Access Prevention (SMAP) is a new security feature disclosed by Intel in revision 014 of the Intel® Architecture Instruction Set Extensions Programming Reference: http://software.intel.com/sites/default/files/319433-014.pdf When SMAP is active, the kernel cannot normally access pa