lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 2 May 2017 14:49:04 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     "the arch/x86 maintainers" <x86@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] x86_64: inline copy_page() at call site

On Sat, Apr 29, 2017 at 12:04 AM, Borislav Petkov <bp@...en8.de> wrote:
> On Wed, Apr 26, 2017 at 09:28:06PM +0300, Alexey Dobriyan wrote:

>> +static __always_inline void copy_page(void *to, void *from)
>> +{
>> +     alternative_call_2(
>
> Please align at the opening brace, like clear_page() above it:

Then I'd have to split clobber list and no lines will be saved.

>         alternative_call_2(copy_page_mov,
>                            copy_page_rep_movsq, X86_FEATURE_REP_GOOD,
>                            ...
>
>
>> +             copy_page_rep_movsb, X86_FEATURE_ERMS,
>> +             ASM_OUTPUT2("=D" (to), "=S" (from)),
>> +             "0" (to), "1" (from)
>> +             : "rax", "rcx", "rdx", "r8", "r9", "r10", "r11", "cc", "memory"
>> +     );
>> +}
>>  #endif       /* !__ASSEMBLY__ */
>>
>>  #ifdef CONFIG_X86_VSYSCALL_EMULATION
>
> ...
>
>>  ENTRY(copy_page_rep_movsb)
>>       mov     $4096, %ecx
>>       rep movsb
>>       ret
>>  ENDPROC(copy_page_rep_movsb)
>> +EXPORT_SYMBOL(copy_page_rep_movsb)
>>
>> -ENTRY(copy_page_regs)
>> +ENTRY(copy_page_mov)
>
> copy_page_regs() is a better name IMO. copy_page_mov() doesn't tell me
> anything - all three use "mov". copy_page_unrolled() sounds ok too.

It says unambiguously which instruction does the actual copying.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ