Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1205877
| From | Borislav Petkov <bp@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [x86] copy_from{to}_user question |
| Date | 2015-08-12 12:10 +0200 |
| Message-ID | <pWB8R-1df-5@gated-at.bofh.it> (permalink) |
| References | <pWAcO-8hY-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Aug 12, 2015 at 05:01:14PM +0800, yalin wang wrote:
> hi x86 maintainers,
>
> i have a question about copy_from{to}_user() function,
> i find on other platforms like arm/ arm64 /hexagon,
> all copy_from{to}_user function only check source address for
> copy_from and only check to address for copy_to user function,
> never check both source and dest together,
>
> but on x86 platform, i see copy_from{to}_user use a generic function
> named copy_user_generic_unrolled() in arch/x86/lib/copy_user_64.S,
That one is the fallback and used only on machines which don't set
X86_FEATURE_REP_GOOD or X86_FEATURE_ERMS. Basically old P4 and K7 and
early K8s.
> it check source and dest address no matter it is copy_from user or
> copy_to_user , is it correct?
> for copy_from_user i think only need check source address is enough,
How else would we be able to use the same function in copy_to and
copy_from variants?
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[x86] copy_from{to}_user question yalin wang <yalin.wang2010@gmail.com> - 2015-08-12 11:10 +0200
Re: [x86] copy_from{to}_user question Borislav Petkov <bp@suse.de> - 2015-08-12 12:10 +0200
Re: [x86] copy_from{to}_user question yalin wang <yalin.wang2010@gmail.com> - 2015-08-13 12:10 +0200
Re: [x86] copy_from{to}_user question Borislav Petkov <bp@suse.de> - 2015-08-13 18:50 +0200
Re: [x86] copy_from{to}_user question yalin wang <yalin.wang2010@gmail.com> - 2015-08-17 05:30 +0200
Re: [x86] copy_from{to}_user question Borislav Petkov <bp@suse.de> - 2015-08-17 06:20 +0200
csiph-web