[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150812100738.GA14020@nazgul.tnic>
Date: Wed, 12 Aug 2015 12:07:38 +0200
From: Borislav Petkov <bp@...e.de>
To: yalin wang <yalin.wang2010@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, bp@...e.de,
open list <linux-kernel@...r.kernel.org>,
Will Deacon <will.deacon@....com>
Subject: Re: [x86] copy_from{to}_user question
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists