Skip to content

Comments

crypto/bio: fix build on UEFI#19738

Closed
liyi77 wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
liyi77:fix_b_print_uefi_erro
Closed

crypto/bio: fix build on UEFI#19738
liyi77 wants to merge 1 commit intoopenssl:OpenSSL_1_1_1-stablefrom
liyi77:fix_b_print_uefi_erro

Conversation

@liyi77
Copy link
Contributor

@liyi77 liyi77 commented Nov 23, 2022

Cherry-pick from: #17547

When compiling openssl for tianocore compiling abs_val() and pow_10()
fails with the following error because SSE support is disabled:

crypto/bio/bio_print.c:587:46: error: SSE register return with SSE disabled

Fix that by using EFIAPI calling convention when compiling for UEFI.

EDK2 not support openssl-3.0, need fix it in openssl-1.1.1 also.

Using floating point is not supported in UEFI and can cause build
problems, for example due to SSE being disabled and x64 calling
convention passing floats in SSE registers.

Avoid those problems by not compiling the formating code for floating
point numbers.

Signed-off-by: Gerd Hoffmann <[email protected]>
@liyi77 liyi77 force-pushed the fix_b_print_uefi_erro branch from 33936ba to 85dc3a6 Compare November 23, 2022 02:27
@slontis
Copy link
Member

slontis commented Nov 23, 2022

Maybe I am missing something here, but this doesn't look like a cherry pick to me.

@liyi77
Copy link
Contributor Author

liyi77 commented Nov 23, 2022

Maybe I am missing something here, but this doesn't look like a cherry pick to me.

Oh sorry for the misunderstanding.
This patch is a copy of #17547 with minor differences:

  1. b_print.c in 1.1.1 was renamed bio_print.c in 3.0, so the changes were moved here.
  2. Use opensslconf.h instead of configuration.h.

@slontis
Copy link
Member

slontis commented Nov 23, 2022

Why is there a #else that is not in the original PR?

@liyi77
Copy link
Contributor Author

liyi77 commented Nov 23, 2022

Why is there a #else that is not in the original PR?

PR link reference is wrong, update to #17547.

@t8m
Copy link
Member

t8m commented Nov 23, 2022

Unfortunately this is out of scope for 1.1.1 as that branch is for security fixes only now.

@t8m t8m added branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) triaged: bug The issue/pr is/fixes a bug labels Nov 23, 2022
@t8m
Copy link
Member

t8m commented Nov 23, 2022

@openssl/otc should we accept this into 1.1.1?

@t8m t8m added the hold: discussion The community needs to establish a consensus how to move forward with the issue or PR label Nov 23, 2022
@liyi77
Copy link
Contributor Author

liyi77 commented Nov 23, 2022

This problem will cause EDK2 to fail to enable X509 certificate time check, really hope it can be merged into 1.1.1......

https://bugzilla.tianocore.org/show_bug.cgi?id=4110

@mattcaswell
Copy link
Member

OTC: Removing the hold. It's up to the discretion of reviewers.

@mattcaswell mattcaswell removed the hold: discussion The community needs to establish a consensus how to move forward with the issue or PR label Nov 29, 2022
@hlandau hlandau added the approval: review pending This pull request needs review by a committer label Nov 29, 2022
@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/committers but the last update was 30 days ago

@openssl-machine
Copy link
Collaborator

This PR is in a state where it requires action by @openssl/committers but the last update was 61 days ago

@t8m t8m added approval: done This pull request has the required number of approvals tests: exempted The PR is exempt from requirements for testing and removed approval: review pending This pull request needs review by a committer labels Jan 30, 2023
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Jan 31, 2023
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@t8m
Copy link
Member

t8m commented Jan 31, 2023

Merged to 1.1.1 branch. Thank you.

@t8m t8m closed this Jan 31, 2023
openssl-machine pushed a commit that referenced this pull request Jan 31, 2023
Using floating point is not supported in UEFI and can cause build
problems, for example due to SSE being disabled and x64 calling
convention passing floats in SSE registers.

Avoid those problems by not compiling the formating code for floating
point numbers.

Signed-off-by: Gerd Hoffmann <[email protected]>

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from #19738)
a-kromm-rogii pushed a commit to a-kromm-rogii/openssl that referenced this pull request Mar 14, 2025
Using floating point is not supported in UEFI and can cause build
problems, for example due to SSE being disabled and x64 calling
convention passing floats in SSE registers.

Avoid those problems by not compiling the formating code for floating
point numbers.

Signed-off-by: Gerd Hoffmann <[email protected]>

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#19738)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: 1.1.1 Applies to OpenSSL_1_1_1-stable branch (EOL) tests: exempted The PR is exempt from requirements for testing triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants