lkml.org 
[lkml]   [2015]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [x86] copy_from{to}_user question
From
Date

> On Aug 22, 2015, at 17:05, Borislav Petkov <bp@suse.de> wrote:
>
> On Fri, Aug 21, 2015 at 02:06:16PM -0700, H. Peter Anvin wrote:
>> What I'm saying is that we do do STAC, which *disables* SMAP. We have
>> to do that because one pointer is known to be a user space pointer.
>>
>> However, we currently don't verify that the *other* pointer is kernel
>> space, which it is supposed to be (if not, we should be using
>> copy_in_user). We have to do this manually since we have to STAC which
>> means SMAP doesn't do anything at all. I believe it would be a good
>> idea to add such checks (and they would even benefit non-SMAP hardware.)
>
> Ah, ok, so we're on the same page.
>
> And yep, Linus gave the probe_kernel_read() suggestion in another mail.
>
i am not clear about what is STAC / SMAP ?
could you give me a link for understanding ?

Linus suggest to use probe_kernel_read() , but also said it is
not efficient to use it, because we need copy the data 2 times by this method.

my patch suggests to use copy_in_user() ,
but seems not a generic(portable) function on all architectures.

Thanks

\
 
 \ /
  Last update: 2015-08-24 10:21    [W:0.133 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site