x86/asm: Annotate aliases

_key_expansion_128 is an alias to _key_expansion_256a, __memcpy to
memcpy, xen_syscall32_target to xen_sysenter_target, and so on. Annotate
them all using the new SYM_FUNC_START_ALIAS, SYM_FUNC_START_LOCAL_ALIAS,
and SYM_FUNC_END_ALIAS. This will make the tools generating the
debuginfo happy as it avoids nesting and double symbols.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Juergen Gross <jgross@suse.com> [xen parts]
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-arch@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Cc: xen-devel@lists.xenproject.org
Link: https://lkml.kernel.org/r/20191011115108.12392-10-jslaby@suse.cz
This commit is contained in:
Jiri Slaby 2019-10-11 13:50:49 +02:00 committed by Borislav Petkov
parent fa97220196
commit e9b9d020c4
5 changed files with 10 additions and 11 deletions

View File

@ -1757,8 +1757,7 @@ ENDPROC(aesni_gcm_finalize)
#endif #endif
.align 4 SYM_FUNC_START_LOCAL_ALIAS(_key_expansion_128)
_key_expansion_128:
SYM_FUNC_START_LOCAL(_key_expansion_256a) SYM_FUNC_START_LOCAL(_key_expansion_256a)
pshufd $0b11111111, %xmm1, %xmm1 pshufd $0b11111111, %xmm1, %xmm1
shufps $0b00010000, %xmm0, %xmm4 shufps $0b00010000, %xmm0, %xmm4
@ -1769,8 +1768,8 @@ SYM_FUNC_START_LOCAL(_key_expansion_256a)
movaps %xmm0, (TKEYP) movaps %xmm0, (TKEYP)
add $0x10, TKEYP add $0x10, TKEYP
ret ret
ENDPROC(_key_expansion_128)
SYM_FUNC_END(_key_expansion_256a) SYM_FUNC_END(_key_expansion_256a)
SYM_FUNC_END_ALIAS(_key_expansion_128)
SYM_FUNC_START_LOCAL(_key_expansion_192a) SYM_FUNC_START_LOCAL(_key_expansion_192a)
pshufd $0b01010101, %xmm1, %xmm1 pshufd $0b01010101, %xmm1, %xmm1

View File

@ -28,7 +28,7 @@
* Output: * Output:
* rax original destination * rax original destination
*/ */
ENTRY(__memcpy) SYM_FUNC_START_ALIAS(__memcpy)
ENTRY(memcpy) ENTRY(memcpy)
ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \ ALTERNATIVE_2 "jmp memcpy_orig", "", X86_FEATURE_REP_GOOD, \
"jmp memcpy_erms", X86_FEATURE_ERMS "jmp memcpy_erms", X86_FEATURE_ERMS
@ -42,7 +42,7 @@ ENTRY(memcpy)
rep movsb rep movsb
ret ret
ENDPROC(memcpy) ENDPROC(memcpy)
ENDPROC(__memcpy) SYM_FUNC_END_ALIAS(__memcpy)
EXPORT_SYMBOL(memcpy) EXPORT_SYMBOL(memcpy)
EXPORT_SYMBOL(__memcpy) EXPORT_SYMBOL(__memcpy)

View File

@ -26,7 +26,7 @@
*/ */
.weak memmove .weak memmove
ENTRY(memmove) SYM_FUNC_START_ALIAS(memmove)
ENTRY(__memmove) ENTRY(__memmove)
/* Handle more 32 bytes in loop */ /* Handle more 32 bytes in loop */
@ -208,6 +208,6 @@ ENTRY(__memmove)
13: 13:
retq retq
ENDPROC(__memmove) ENDPROC(__memmove)
ENDPROC(memmove) SYM_FUNC_END_ALIAS(memmove)
EXPORT_SYMBOL(__memmove) EXPORT_SYMBOL(__memmove)
EXPORT_SYMBOL(memmove) EXPORT_SYMBOL(memmove)

View File

@ -19,7 +19,7 @@
* *
* rax original destination * rax original destination
*/ */
ENTRY(memset) SYM_FUNC_START_ALIAS(memset)
ENTRY(__memset) ENTRY(__memset)
/* /*
* Some CPUs support enhanced REP MOVSB/STOSB feature. It is recommended * Some CPUs support enhanced REP MOVSB/STOSB feature. It is recommended
@ -43,8 +43,8 @@ ENTRY(__memset)
rep stosb rep stosb
movq %r9,%rax movq %r9,%rax
ret ret
ENDPROC(memset)
ENDPROC(__memset) ENDPROC(__memset)
SYM_FUNC_END_ALIAS(memset)
EXPORT_SYMBOL(memset) EXPORT_SYMBOL(memset)
EXPORT_SYMBOL(__memset) EXPORT_SYMBOL(__memset)

View File

@ -167,13 +167,13 @@ ENDPROC(xen_sysenter_target)
#else /* !CONFIG_IA32_EMULATION */ #else /* !CONFIG_IA32_EMULATION */
ENTRY(xen_syscall32_target) SYM_FUNC_START_ALIAS(xen_syscall32_target)
ENTRY(xen_sysenter_target) ENTRY(xen_sysenter_target)
lea 16(%rsp), %rsp /* strip %rcx, %r11 */ lea 16(%rsp), %rsp /* strip %rcx, %r11 */
mov $-ENOSYS, %rax mov $-ENOSYS, %rax
pushq $0 pushq $0
jmp hypercall_iret jmp hypercall_iret
ENDPROC(xen_syscall32_target)
ENDPROC(xen_sysenter_target) ENDPROC(xen_sysenter_target)
SYM_FUNC_END_ALIAS(xen_syscall32_target)
#endif /* CONFIG_IA32_EMULATION */ #endif /* CONFIG_IA32_EMULATION */