Messages in this thread | | | Date | Thu, 5 Mar 2015 01:34:17 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH v2 07/15] x86/lib/copy_user_64.S: Convert to ALTERNATIVE_2 |
| |
* Borislav Petkov <bp@alien8.de> wrote:
> On Wed, Mar 04, 2015 at 08:13:24AM +0100, Ingo Molnar wrote: > > Btw., the x86 memset() variants are using this today, and I think this > > is the most optimal jump-patching variant, even if it means a small > > amount of code duplication between the copy_user variants. > > Yeah, the problem with that one was that we patch a huge amount of code, > see the dump below. > > The X86_FEATURE_REP_GOOD thing replaces a 172 bytes memset with the > 42 byte REP;STOSQ version and the X86_FEATURE_ERMS does the same > with REP;STOSB.
So I'd not patch in the large _orig variant, it's legacy mostly - but the two fast variants?
Thanks,
Ingo
| |