Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asymm & symm perfs: fix build errors & minor coding style issues #728

Merged
merged 5 commits into from
Feb 21, 2024

Conversation

etienne-lms
Copy link
Contributor

No description provided.

@etienne-lms
Copy link
Contributor Author

I've updated the series to fix another issue reported on 64bit platforms.

@jforissier
Copy link
Contributor

About the QEMUv8 CI error: #729

@etienne-lms
Copy link
Contributor Author

Thanks. I'll rebase once #729 is merged.

@etienne-lms
Copy link
Contributor Author

Rebased, CI tests look OK. Thanks.

Copy link
Contributor

@jenswi-linaro jenswi-linaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Jens Wiklander <[email protected]>

@etienne-lms
Copy link
Contributor Author

@yuzexiyzx, @omasse-linaro, @clementfaure, are you ok with these changes in the crypto perf tools merged from #714 (and #706)?

Fix build warning in crypto_perf TA as shown in below build trace
messages:

ta_crypto_perf.c:704:42: warning: unused parameter ‘params’ [-Wunused-parameter]
  704 |                                TEE_Param params[TEE_NUM_PARAMS])
      |                                ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
ta_crypto_perf.c: In function ‘cmd_asym_process_keypair’:
ta_crypto_perf.c:745:1: warning: label ‘out’ defined but not used [-Wunused-label]
  745 | out:
      | ^~~
ta_crypto_perf.c: In function ‘cmd_asym_process_rsa_ecc’:
ta_crypto_perf.c:796:1: warning: label ‘out’ defined but not used [-Wunused-label]
  796 | out:
      | ^~~

Fixes: 14a2b2a ("ta: crypto_perf: add asymmetric crypto perf tests")
Acked-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
Fix build error in crypto_perf TA as shown in below build trace
messages when built for a 64bit target:

ta_crypto_perf.c: In function 'cmd_asym_process_rsa_ecc':
ta_crypto_perf.c:772:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, uint32_t,  void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, unsigned int,  void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, size_t,  void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, long unsigned int,  void *, long unsigned int *)'} [-Wincompatible-pointer-types]
  772 |                         do_asym = TEE_AsymmetricEncrypt;
      |                                 ^
ta_crypto_perf.c:774:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, uint32_t,  void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, unsigned int,  void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, size_t,  void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, long unsigned int,  void *, long unsigned int *)'} [-Wincompatible-pointer-types]
  774 |                         do_asym = TEE_AsymmetricDecrypt;
      |                                 ^
ta_crypto_perf.c:776:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, uint32_t,  void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, unsigned int,  void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t,  const void *, size_t,  void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int,  const void *, long unsigned int,  void *, long unsigned int *)'} [-Wincompatible-pointer-types]
  776 |                         do_asym = TEE_AsymmetricSignDigest;
      |                                 ^
ta_crypto_perf.c:784:64: warning: passing argument 7 of 'do_asym' from incompatible pointer type [-Wincompatible-pointer-types]
  784 |                                       params[2].memref.buffer, &dummy_size);
      |                                                                ^~~~~~~~~~~
      |                                                                |
      |                                                                size_t * {aka long unsigned int *}
ta_crypto_perf.c:784:64: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'size_t *' {aka 'long unsigned int *'}
ta_crypto_perf.c: At top level:

Fixes: 14a2b2a ("ta: crypto_perf: add asymmetric crypto perf tests")
Acked-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
Sort out some coding style issues that are better being fixed for the
consistency of the implementation of the test TAs. No functional changes.

Fixes: 14a2b2a ("ta: crypto_perf: add asymmetric crypto perf tests")
Acked-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
Sort out some coding style issue that are better being fixed for
test TAs implementation consistency. No functional changes.

Fixes: e18381f ("xtest: combine aes_perf and hash_perf TAs into crypto_perf")
Acked-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
Fix a minor indentation issue in asym_test.c.

Fixes: bcd5583 ("xtest: add asymmetric cipher perf test")
Acked-by: Jens Wiklander <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
@etienne-lms
Copy link
Contributor Author

Review tag applied.

@jforissier jforissier merged commit ac200fe into OP-TEE:master Feb 21, 2024
2 checks passed
@etienne-lms
Copy link
Contributor Author

thanks

@etienne-lms etienne-lms deleted the fix branch February 21, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants