Skip to content

Commit 6dcc562

Browse files
Jiri Slabysuryasaimadhu
authored andcommitted
x86/asm: Change all ENTRY+ENDPROC to SYM_FUNC_*
These are all functions which are invoked from elsewhere, so annotate them as global using the new SYM_FUNC_START and their ENDPROC's by SYM_FUNC_END. Make sure ENTRY/ENDPROC is not defined on X86_64, given these were the last users. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> [hibernate] Reviewed-by: Boris Ostrovsky <[email protected]> [xen bits] Acked-by: Herbert Xu <[email protected]> [crypto] Cc: Allison Randal <[email protected]> Cc: Andrey Ryabinin <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Armijn Hemel <[email protected]> Cc: Cao jin <[email protected]> Cc: Darren Hart <[email protected]> Cc: Dave Hansen <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Enrico Weigelt <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Herbert Xu <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jim Mattson <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Kate Stewart <[email protected]> Cc: "Kirill A. Shutemov" <[email protected]> Cc: kvm ML <[email protected]> Cc: Len Brown <[email protected]> Cc: [email protected] Cc: [email protected] Cc: linux-efi <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Mark Rutland <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Cc: "Radim Krčmář" <[email protected]> Cc: Sean Christopherson <[email protected]> Cc: Stefano Stabellini <[email protected]> Cc: "Steven Rostedt (VMware)" <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Vitaly Kuznetsov <[email protected]> Cc: Wanpeng Li <[email protected]> Cc: Wei Huang <[email protected]> Cc: x86-ml <[email protected]> Cc: [email protected] Cc: Xiaoyao Li <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent bc7b11c commit 6dcc562

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+379
-375
lines changed

arch/x86/boot/compressed/efi_thunk_64.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
.code64
2525
.text
26-
ENTRY(efi64_thunk)
26+
SYM_FUNC_START(efi64_thunk)
2727
push %rbp
2828
push %rbx
2929

@@ -97,7 +97,7 @@ ENTRY(efi64_thunk)
9797
pop %rbx
9898
pop %rbp
9999
ret
100-
ENDPROC(efi64_thunk)
100+
SYM_FUNC_END(efi64_thunk)
101101

102102
SYM_FUNC_START_LOCAL(efi_exit32)
103103
movq func_rt_ptr(%rip), %rax

arch/x86/boot/compressed/head_64.S

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
__HEAD
4747
.code32
48-
ENTRY(startup_32)
48+
SYM_FUNC_START(startup_32)
4949
/*
5050
* 32bit entry is 0 and it is ABI so immutable!
5151
* If we come here directly from a bootloader,
@@ -222,11 +222,11 @@ ENTRY(startup_32)
222222

223223
/* Jump from 32bit compatibility mode into 64bit mode. */
224224
lret
225-
ENDPROC(startup_32)
225+
SYM_FUNC_END(startup_32)
226226

227227
#ifdef CONFIG_EFI_MIXED
228228
.org 0x190
229-
ENTRY(efi32_stub_entry)
229+
SYM_FUNC_START(efi32_stub_entry)
230230
add $0x4, %esp /* Discard return address */
231231
popl %ecx
232232
popl %edx
@@ -245,7 +245,7 @@ ENTRY(efi32_stub_entry)
245245
movl %eax, efi_config(%ebp)
246246

247247
jmp startup_32
248-
ENDPROC(efi32_stub_entry)
248+
SYM_FUNC_END(efi32_stub_entry)
249249
#endif
250250

251251
.code64
@@ -447,7 +447,7 @@ SYM_CODE_END(startup_64)
447447
#ifdef CONFIG_EFI_STUB
448448

449449
/* The entry point for the PE/COFF executable is efi_pe_entry. */
450-
ENTRY(efi_pe_entry)
450+
SYM_FUNC_START(efi_pe_entry)
451451
movq %rcx, efi64_config(%rip) /* Handle */
452452
movq %rdx, efi64_config+8(%rip) /* EFI System table pointer */
453453

@@ -496,10 +496,10 @@ fail:
496496
movl BP_code32_start(%esi), %eax
497497
leaq startup_64(%rax), %rax
498498
jmp *%rax
499-
ENDPROC(efi_pe_entry)
499+
SYM_FUNC_END(efi_pe_entry)
500500

501501
.org 0x390
502-
ENTRY(efi64_stub_entry)
502+
SYM_FUNC_START(efi64_stub_entry)
503503
movq %rdi, efi64_config(%rip) /* Handle */
504504
movq %rsi, efi64_config+8(%rip) /* EFI System table pointer */
505505

@@ -508,7 +508,7 @@ ENTRY(efi64_stub_entry)
508508

509509
movq %rdx, %rsi
510510
jmp handover_entry
511-
ENDPROC(efi64_stub_entry)
511+
SYM_FUNC_END(efi64_stub_entry)
512512
#endif
513513

514514
.text

arch/x86/boot/compressed/mem_encrypt.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
.text
1717
.code32
18-
ENTRY(get_sev_encryption_bit)
18+
SYM_FUNC_START(get_sev_encryption_bit)
1919
xor %eax, %eax
2020

2121
#ifdef CONFIG_AMD_MEM_ENCRYPT
@@ -65,10 +65,10 @@ ENTRY(get_sev_encryption_bit)
6565
#endif /* CONFIG_AMD_MEM_ENCRYPT */
6666

6767
ret
68-
ENDPROC(get_sev_encryption_bit)
68+
SYM_FUNC_END(get_sev_encryption_bit)
6969

7070
.code64
71-
ENTRY(set_sev_encryption_mask)
71+
SYM_FUNC_START(set_sev_encryption_mask)
7272
#ifdef CONFIG_AMD_MEM_ENCRYPT
7373
push %rbp
7474
push %rdx
@@ -90,7 +90,7 @@ ENTRY(set_sev_encryption_mask)
9090

9191
xor %rax, %rax
9292
ret
93-
ENDPROC(set_sev_encryption_mask)
93+
SYM_FUNC_END(set_sev_encryption_mask)
9494

9595
.data
9696

arch/x86/crypto/aegis128-aesni-asm.S

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ SYM_FUNC_END(__store_partial)
186186
/*
187187
* void crypto_aegis128_aesni_init(void *state, const void *key, const void *iv);
188188
*/
189-
ENTRY(crypto_aegis128_aesni_init)
189+
SYM_FUNC_START(crypto_aegis128_aesni_init)
190190
FRAME_BEGIN
191191

192192
/* load IV: */
@@ -226,13 +226,13 @@ ENTRY(crypto_aegis128_aesni_init)
226226

227227
FRAME_END
228228
ret
229-
ENDPROC(crypto_aegis128_aesni_init)
229+
SYM_FUNC_END(crypto_aegis128_aesni_init)
230230

231231
/*
232232
* void crypto_aegis128_aesni_ad(void *state, unsigned int length,
233233
* const void *data);
234234
*/
235-
ENTRY(crypto_aegis128_aesni_ad)
235+
SYM_FUNC_START(crypto_aegis128_aesni_ad)
236236
FRAME_BEGIN
237237

238238
cmp $0x10, LEN
@@ -378,7 +378,7 @@ ENTRY(crypto_aegis128_aesni_ad)
378378
.Lad_out:
379379
FRAME_END
380380
ret
381-
ENDPROC(crypto_aegis128_aesni_ad)
381+
SYM_FUNC_END(crypto_aegis128_aesni_ad)
382382

383383
.macro encrypt_block a s0 s1 s2 s3 s4 i
384384
movdq\a (\i * 0x10)(SRC), MSG
@@ -402,7 +402,7 @@ ENDPROC(crypto_aegis128_aesni_ad)
402402
* void crypto_aegis128_aesni_enc(void *state, unsigned int length,
403403
* const void *src, void *dst);
404404
*/
405-
ENTRY(crypto_aegis128_aesni_enc)
405+
SYM_FUNC_START(crypto_aegis128_aesni_enc)
406406
FRAME_BEGIN
407407

408408
cmp $0x10, LEN
@@ -493,13 +493,13 @@ ENTRY(crypto_aegis128_aesni_enc)
493493
.Lenc_out:
494494
FRAME_END
495495
ret
496-
ENDPROC(crypto_aegis128_aesni_enc)
496+
SYM_FUNC_END(crypto_aegis128_aesni_enc)
497497

498498
/*
499499
* void crypto_aegis128_aesni_enc_tail(void *state, unsigned int length,
500500
* const void *src, void *dst);
501501
*/
502-
ENTRY(crypto_aegis128_aesni_enc_tail)
502+
SYM_FUNC_START(crypto_aegis128_aesni_enc_tail)
503503
FRAME_BEGIN
504504

505505
/* load the state: */
@@ -533,7 +533,7 @@ ENTRY(crypto_aegis128_aesni_enc_tail)
533533

534534
FRAME_END
535535
ret
536-
ENDPROC(crypto_aegis128_aesni_enc_tail)
536+
SYM_FUNC_END(crypto_aegis128_aesni_enc_tail)
537537

538538
.macro decrypt_block a s0 s1 s2 s3 s4 i
539539
movdq\a (\i * 0x10)(SRC), MSG
@@ -556,7 +556,7 @@ ENDPROC(crypto_aegis128_aesni_enc_tail)
556556
* void crypto_aegis128_aesni_dec(void *state, unsigned int length,
557557
* const void *src, void *dst);
558558
*/
559-
ENTRY(crypto_aegis128_aesni_dec)
559+
SYM_FUNC_START(crypto_aegis128_aesni_dec)
560560
FRAME_BEGIN
561561

562562
cmp $0x10, LEN
@@ -647,13 +647,13 @@ ENTRY(crypto_aegis128_aesni_dec)
647647
.Ldec_out:
648648
FRAME_END
649649
ret
650-
ENDPROC(crypto_aegis128_aesni_dec)
650+
SYM_FUNC_END(crypto_aegis128_aesni_dec)
651651

652652
/*
653653
* void crypto_aegis128_aesni_dec_tail(void *state, unsigned int length,
654654
* const void *src, void *dst);
655655
*/
656-
ENTRY(crypto_aegis128_aesni_dec_tail)
656+
SYM_FUNC_START(crypto_aegis128_aesni_dec_tail)
657657
FRAME_BEGIN
658658

659659
/* load the state: */
@@ -697,13 +697,13 @@ ENTRY(crypto_aegis128_aesni_dec_tail)
697697

698698
FRAME_END
699699
ret
700-
ENDPROC(crypto_aegis128_aesni_dec_tail)
700+
SYM_FUNC_END(crypto_aegis128_aesni_dec_tail)
701701

702702
/*
703703
* void crypto_aegis128_aesni_final(void *state, void *tag_xor,
704704
* u64 assoclen, u64 cryptlen);
705705
*/
706-
ENTRY(crypto_aegis128_aesni_final)
706+
SYM_FUNC_START(crypto_aegis128_aesni_final)
707707
FRAME_BEGIN
708708

709709
/* load the state: */
@@ -744,4 +744,4 @@ ENTRY(crypto_aegis128_aesni_final)
744744

745745
FRAME_END
746746
ret
747-
ENDPROC(crypto_aegis128_aesni_final)
747+
SYM_FUNC_END(crypto_aegis128_aesni_final)

arch/x86/crypto/aes_ctrby8_avx-x86_64.S

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,11 @@ ddq_add_8:
544544
* aes_ctr_enc_128_avx_by8(void *in, void *iv, void *keys, void *out,
545545
* unsigned int num_bytes)
546546
*/
547-
ENTRY(aes_ctr_enc_128_avx_by8)
547+
SYM_FUNC_START(aes_ctr_enc_128_avx_by8)
548548
/* call the aes main loop */
549549
do_aes_ctrmain KEY_128
550550

551-
ENDPROC(aes_ctr_enc_128_avx_by8)
551+
SYM_FUNC_END(aes_ctr_enc_128_avx_by8)
552552

553553
/*
554554
* routine to do AES192 CTR enc/decrypt "by8"
@@ -557,11 +557,11 @@ ENDPROC(aes_ctr_enc_128_avx_by8)
557557
* aes_ctr_enc_192_avx_by8(void *in, void *iv, void *keys, void *out,
558558
* unsigned int num_bytes)
559559
*/
560-
ENTRY(aes_ctr_enc_192_avx_by8)
560+
SYM_FUNC_START(aes_ctr_enc_192_avx_by8)
561561
/* call the aes main loop */
562562
do_aes_ctrmain KEY_192
563563

564-
ENDPROC(aes_ctr_enc_192_avx_by8)
564+
SYM_FUNC_END(aes_ctr_enc_192_avx_by8)
565565

566566
/*
567567
* routine to do AES256 CTR enc/decrypt "by8"
@@ -570,8 +570,8 @@ ENDPROC(aes_ctr_enc_192_avx_by8)
570570
* aes_ctr_enc_256_avx_by8(void *in, void *iv, void *keys, void *out,
571571
* unsigned int num_bytes)
572572
*/
573-
ENTRY(aes_ctr_enc_256_avx_by8)
573+
SYM_FUNC_START(aes_ctr_enc_256_avx_by8)
574574
/* call the aes main loop */
575575
do_aes_ctrmain KEY_256
576576

577-
ENDPROC(aes_ctr_enc_256_avx_by8)
577+
SYM_FUNC_END(aes_ctr_enc_256_avx_by8)

0 commit comments

Comments
 (0)