From: yalin wang <yalin.wang2010@gmail.com>
To: Borislav Petkov <bp@suse.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
mingo@redhat.com, x86@kernel.org,
open list <linux-kernel@vger.kernel.org>,
Will Deacon <will.deacon@arm.com>
Subject: Re: [x86] copy_from{to}_user question
Date: Mon, 24 Aug 2015 15:52:11 +0800 [thread overview]
Message-ID: <C3E28135-6482-4B67-96CD-8E92788D64C4@gmail.com> (raw)
In-Reply-To: <20150822090519.GA2812@nazgul.tnic>
> 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
next prev parent reply other threads:[~2015-08-24 7:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 9:01 yalin wang
2015-08-12 10:07 ` Borislav Petkov
2015-08-13 10:04 ` yalin wang
2015-08-13 16:43 ` Borislav Petkov
2015-08-17 3:27 ` yalin wang
2015-08-17 4:16 ` Borislav Petkov
2015-08-20 8:58 ` yalin wang
2015-08-20 18:22 ` H. Peter Anvin
2015-08-21 4:35 ` Borislav Petkov
2015-08-21 21:06 ` H. Peter Anvin
2015-08-22 9:05 ` Borislav Petkov
2015-08-24 7:52 ` yalin wang [this message]
2015-08-24 12:05 ` Jeff Epler
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=C3E28135-6482-4B67-96CD-8E92788D64C4@gmail.com \
--to=yalin.wang2010@gmail.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®