lib/crypto: x86/sha512: Drop unnecessary ANNOTATE_NOENDBR
Subsystems (2)
Eric Biggers
maintainerPATCH 1/1 lib/crypto: x86/sha512: Drop unnecessary ANNOTATE_NOENDBR
When migrating the x86 SHA-512 assembly code to lib/crypto/, I replaced SYM_TYPED_FUNC_START with ANNOTATE_NOENDBR. This was intended to match a change in the caller from an indirect call to a static call, like what I did for SHA-256. However, for SHA-512 I actually decided to bring the static call up a level; see DEFINE_X86_SHA512_FN in lib/crypto/x86/sha512.h. Therefore, now the assembly functions are just called via normal direct calls. At least for SHA this seems to be the better way to do it, and it means using ANNOTATE_NOENDBR is unnecessary.
---
This patch is targeting libcrypto-next.
lib/crypto/x86/sha512-avx-asm.S | 2 -- lib/crypto/x86/sha512-avx2-asm.S | 2 -- lib/crypto/x86/sha512-ssse3-asm.S | 2 -- 3 files changed, 6 deletions(-)
lib/crypto/x86/sha512-avx-asm.S +0 -2
@@ -46,11 +46,10 @@ # and search for that title. # ######################################################################## #include <linux/linkage.h> -#include <linux/objtool.h> .text # Virtual Registers # ARG1
@@ -274,11 +273,10 @@ frame_size = frame_WK + WK_SIZE # The size of the message pointed to by "data" must be an integer multiple # of SHA512 message blocks. # "nblocks" is the message length in SHA512 blocks. Must be >= 1. ######################################################################## SYM_FUNC_START(sha512_transform_avx) - ANNOTATE_NOENDBR # since this is called only via static_call # Save GPRs push %rbx push %r12 push %r13
lib/crypto/x86/sha512-avx2-asm.S +0 -2
@@ -48,11 +48,10 @@ ######################################################################## # This code schedules 1 blocks at a time, with 4 lanes per block ######################################################################## #include <linux/linkage.h> -#include <linux/objtool.h> .text # Virtual Registers Y_0 = %ymm4
@@ -566,11 +565,10 @@ frame_size = frame_CTX + CTX_SIZE # The size of the message pointed to by "data" must be an integer multiple # of SHA512 message blocks. # "nblocks" is the message length in SHA512 blocks. Must be >= 1. ######################################################################## SYM_FUNC_START(sha512_transform_rorx) - ANNOTATE_NOENDBR # since this is called only via static_call # Save GPRs push %rbx push %r12 push %r13
lib/crypto/x86/sha512-ssse3-asm.S +0 -2
@@ -46,11 +46,10 @@ # and search for that title. # ######################################################################## #include <linux/linkage.h> -#include <linux/objtool.h> .text # Virtual Registers # ARG1
@@ -273,11 +272,10 @@ frame_size = frame_WK + WK_SIZE # The size of the message pointed to by "data" must be an integer multiple # of SHA512 message blocks. # "nblocks" is the message length in SHA512 blocks. Must be >= 1. ######################################################################## SYM_FUNC_START(sha512_transform_ssse3) - ANNOTATE_NOENDBR # since this is called only via static_call # Save GPRs push %rbx push %r12 push %r13
base-commit: d74152ec2b5106263c2a502380acfaf5954f9898
Signature · 1 line
2.50.0
Quoted 12 lines · Eric Biggers
When migrating the x86 SHA-512 assembly code to
lib/crypto/, I replacedSYM_TYPED_FUNC_STARTwithANNOTATE_NOENDBR. This was intended to match a change in the caller from an indirect call to a static call, like what I did for SHA-256. However, for SHA-512 I actually decided to bring the static call up a level; seeDEFINE_X86_SHA512_FNinlib/crypto/x86/sha512.h. Therefore, now the assembly functions are just called via normal direct calls. At least for SHA this seems to be the better way to do it, and it means usingANNOTATE_NOENDBRis unnecessary.Fixes b82535bf96da ("lib/crypto: x86/sha512: Migrate optimized SHA-512 code to library")Signed-off-by Eric Biggers <[email protected]>
Quoted 9 lines
---
This patch is targeting libcrypto-next.
lib/crypto/x86/sha512-avx-asm.S | 2 -- lib/crypto/x86/sha512-avx2-asm.S | 2 -- lib/crypto/x86/sha512-ssse3-asm.S | 2 -- 3 files changed, 6 deletions(-)
Quoted 89 lines
lib/crypto/x86/sha512-avx-asm.S +0
-2@@ -46,11 +46,10 @@ # and search for that title. # ######################################################################## #include <linux/linkage.h> -#include <linux/objtool.h> .text # Virtual Registers # ARG1@@ -274,11 +273,10 @@ frame_size = frame_WK + WK_SIZE # The size of the message pointed to by "data" must be an integer multiple # of SHA512 message blocks. # "nblocks" is the message length in SHA512 blocks. Must be >= 1. ######################################################################## SYM_FUNC_START(sha512_transform_avx) - ANNOTATE_NOENDBR # since this is called only via static_call # Save GPRs push %rbx push %r12 push %r13lib/crypto/x86/sha512-avx2-asm.S +0
-2@@ -48,11 +48,10 @@ ######################################################################## # This code schedules 1 blocks at a time, with 4 lanes per block ######################################################################## #include <linux/linkage.h> -#include <linux/objtool.h> .text # Virtual Registers Y_0 = %ymm4@@ -566,11 +565,10 @@ frame_size = frame_CTX + CTX_SIZE # The size of the message pointed to by "data" must be an integer multiple # of SHA512 message blocks. # "nblocks" is the message length in SHA512 blocks. Must be >= 1. ######################################################################## SYM_FUNC_START(sha512_transform_rorx) - ANNOTATE_NOENDBR # since this is called only via static_call # Save GPRs push %rbx push %r12 push %r13lib/crypto/x86/sha512-ssse3-asm.S +0
-2@@ -46,11 +46,10 @@ # and search for that title. # ######################################################################## #include <linux/linkage.h> -#include <linux/objtool.h> .text # Virtual Registers # ARG1@@ -273,11 +272,10 @@ frame_size = frame_WK + WK_SIZE # The size of the message pointed to by "data" must be an integer multiple # of SHA512 message blocks. # "nblocks" is the message length in SHA512 blocks. Must be >= 1. ######################################################################## SYM_FUNC_START(sha512_transform_ssse3) - ANNOTATE_NOENDBR # since this is called only via static_call # Save GPRs push %rbx push %r12 push %r13base-commit:
d74152ec2b5106263c2a502380acfaf5954f9898--
2.50.0