From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@suse.de>, yalin wang <yalin.wang2010@gmail.com>
Cc: 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: Thu, 20 Aug 2015 11:22:43 -0700 [thread overview]
Message-ID: <55D61AF3.4090004@zytor.com> (raw)
In-Reply-To: <20150817041634.GA9387@nazgul.tnic>
On 08/16/2015 09:16 PM, Borislav Petkov wrote:
> On Mon, Aug 17, 2015 at 11:27:01AM +0800, yalin wang wrote:
>> i just want the x86 copy_from{to,in}_user() function have
>> the same behaviour as other platforms.
>
> Back to the original question from 2 mails ago:
>
> How else would we be able to use the same function in copy_to and
> copy_from variants?
>
>> and can disclose potential BUGs in kernel, if do like this.
>
> Back to my other question:
>
> Do you have any real life examples where you can trigger such bugs or is
> this only "potential"?
>
> IOW, what I *think* you're trying to do sounds to me like unnecessary
> complication with no apparent gain *at* *all*. So show me why you want
> to do it: code it up, trigger a bug and show me why your version is
> better. No "but but it might be a good idea", no "potentially maybe",
> none of that maybe stuff. Write it, send it with instructions how
> someone else can apply it and trigger the issue. Ok?
>
There is a valid reason to do this, which is that currently
copy_{to,from}_user() effectively bypass SMAP as they don't verify that
the kernel pointer is actually a kernel pointer.
The /proc/kcore issue is a completely different ball of wax, however.
-hpa
next prev parent reply other threads:[~2015-08-20 18:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 9:01 [x86] copy_from{to}_user question 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 [this message]
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
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=55D61AF3.4090004@zytor.com \
--to=hpa@zytor.com \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
--cc=yalin.wang2010@gmail.com \
/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