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

Improve pk_wrap calling convention and check for remaning ECP dependencies in PK files #7460

Closed
1 of 3 tasks
valeriosetti opened this issue Apr 19, 2023 · 7 comments · Fixed by #7461, #7463 or #7465
Closed
1 of 3 tasks
Assignees
Labels
priority-high High priority - will be reviewed soon size-m Estimated task size: medium (~1w)

Comments

@valeriosetti
Copy link
Contributor

valeriosetti commented Apr 19, 2023

Following the comments in #7073 and discussion on slack, here is the to do list to be addressed before starting #7073 and #7074:

Note for reviewers/gatekeepers

All the points mentioned above will be addressed by separate PRs, so please wait for all of them to be addressed before closing this issue.

@valeriosetti valeriosetti added the size-m Estimated task size: medium (~1w) label Apr 19, 2023
@valeriosetti valeriosetti self-assigned this Apr 19, 2023
@valeriosetti valeriosetti added the priority-high High priority - will be reviewed soon label Apr 19, 2023
@tom-cosgrove-arm
Copy link
Contributor

@valeriosetti Any chance of a title that gives some idea as to what the issue is about, please, so that everyone doesn't have to read the description (or two other issues) before they know if they need to look at this further or not?

@valeriosetti valeriosetti changed the title Prerequisites for #7073 and #7074 Improve pk_wrap calling convention and check for remaning ECP dependencies in PK files Apr 19, 2023
@mpg
Copy link
Contributor

mpg commented Apr 20, 2023

grep for remaining mbedtls_ecp functions in PK files

Actually, on second thought, grepping the source is not going to be very helpful, as it will return a lot of calls from the !defined(MBEDTLS_USE_PSA_CRYPTO) path. Perhaps what we want to do instead is build with MBEDTLS_USE_PSA_CRYPTO and look for external dependencies on mbedtls_ecp_ functions in the object file, similarly to what docs/architecture/psa-migration/syms.sh instead we'd do it with pk.o, pkwrite.o, pkparse.o instead of libmbedx509.a and libmbedtls.a.

@gilles-peskine-arm
Copy link
Contributor

grepping the source is not going to be very helpful, as it will return a lot of calls from the !defined(MBEDTLS_USE_PSA_CRYPTO) path

Run through cpp or unifdef?

@mpg
Copy link
Contributor

mpg commented Apr 21, 2023

I remember trying cpp, and IIRC the problem is we get many false positives from #include directives. I remember considering unifdef but I don't remember why I didn't end up using it and finally found it more convenient to just look for unresolved symbols in the object files.

@mpg mpg closed this as completed in #7465 Apr 24, 2023
@AndrzejKurek
Copy link
Contributor

I believe that only one of three points has been addressed so far.

@AndrzejKurek AndrzejKurek reopened this Apr 24, 2023
@valeriosetti
Copy link
Contributor Author

valeriosetti commented Apr 24, 2023

I believe that only one of three points has been addressed so far.

Yes, I didn't notice this! Thanks!
Perhaps it's my fault that I already ticked the check-boxes after PRs' creation. Now I will select only the merged ones, to avoid confusion ;)

@AndrzejKurek
Copy link
Contributor

I believe that only one of three points has been addressed so far.

Yes, I didn't notice this! Thanks! Perhaps it's my fault that I already ticked the check-boxes after PRs' creation. Now I will select only the merged ones, to avoid confusion ;)

I think that the problem was writing resolves xxx in the merged PR :) Even though there was "partially" before "resolves", github doesn't understand that and picks it up as a resolution for the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-high High priority - will be reviewed soon size-m Estimated task size: medium (~1w)
Projects
None yet
5 participants