diff mbox series

[v2,3/4] x86: disable llvm-cov instrumentation

Message ID 20240905043245.1389509-4-wentaoz5@illinois.edu (mailing list archive)
State New
Headers show
Series [v2,1/4] llvm-cov: add Clang's Source-based Code Coverage support | expand

Commit Message

Wentao Zhang Sept. 5, 2024, 4:32 a.m. UTC
Disable instrumentation for arch/x86/crypto/curve25519-x86_64.c. Otherwise
compilation would fail with "error: inline assembly requires more registers
than available".

Similar behavior was reported with gcov as well. See c390c452ebeb ("crypto:
x86/curve25519 - disable gcov").

Signed-off-by: Wentao Zhang <wentaoz5@illinois.edu>
Reviewed-by: Chuck Wolber <chuck.wolber@boeing.com>
Tested-by: Chuck Wolber <chuck.wolber@boeing.com>
---
 arch/x86/crypto/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Nathan Chancellor Oct. 2, 2024, 1:17 a.m. UTC | #1
On Wed, Sep 04, 2024 at 11:32:44PM -0500, Wentao Zhang wrote:
> Disable instrumentation for arch/x86/crypto/curve25519-x86_64.c. Otherwise
> compilation would fail with "error: inline assembly requires more registers
> than available".
> 
> Similar behavior was reported with gcov as well. See c390c452ebeb ("crypto:
> x86/curve25519 - disable gcov").
> 
> Signed-off-by: Wentao Zhang <wentaoz5@illinois.edu>
> Reviewed-by: Chuck Wolber <chuck.wolber@boeing.com>
> Tested-by: Chuck Wolber <chuck.wolber@boeing.com>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

> ---
>  arch/x86/crypto/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
> index 53b4a2778..57f3d4921 100644
> --- a/arch/x86/crypto/Makefile
> +++ b/arch/x86/crypto/Makefile
> @@ -119,5 +119,6 @@ quiet_cmd_perlasm = PERLASM $@
>  $(obj)/%.S: $(src)/%.pl FORCE
>  	$(call if_changed,perlasm)
>  
> -# Disable GCOV in odd or sensitive code
> +# Disable GCOV and llvm-cov in odd or sensitive code
>  GCOV_PROFILE_curve25519-x86_64.o := n
> +LLVM_COV_PROFILE_curve25519-x86_64.o := n
> -- 
> 2.45.2
>
diff mbox series

Patch

diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
index 53b4a2778..57f3d4921 100644
--- a/arch/x86/crypto/Makefile
+++ b/arch/x86/crypto/Makefile
@@ -119,5 +119,6 @@  quiet_cmd_perlasm = PERLASM $@
 $(obj)/%.S: $(src)/%.pl FORCE
 	$(call if_changed,perlasm)
 
-# Disable GCOV in odd or sensitive code
+# Disable GCOV and llvm-cov in odd or sensitive code
 GCOV_PROFILE_curve25519-x86_64.o := n
+LLVM_COV_PROFILE_curve25519-x86_64.o := n