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

libsrc/utils: Do not catch SIGILL signal #1435

Merged
merged 1 commit into from
Mar 2, 2022
Merged

libsrc/utils: Do not catch SIGILL signal #1435

merged 1 commit into from
Mar 2, 2022

Conversation

tuxuser
Copy link
Contributor

@tuxuser tuxuser commented Mar 1, 2022

Summary

libcrypto performs cpu feature checks on ARM platforms, by calling OPENSSL_cpuid_setup.
In there, it tries to call various instructions and traps illegal instructions aka. non-existing instructions itself.

However, as hyperion.ng also tries to trap all signals, the call inside libcrypto is propagated and hyperiond gets killed by itself.

This patch lets execution proceed, even when SIGILL occurs.

References:

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated (docs/docs/en)
  • Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

  • Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@hyperion-project
Copy link

Hello @tuxuser 👋

I'm the Hyperion Project Bot and I want to thank you for
contributing to Hyperion with your pull requests!

To help you and other users test your pull requests faster,
I'll create a link for you to your workflow artifacts.

🔗 https://github.com/hyperion-project/hyperion.ng/actions/runs/1918577284

Of course, if you make changes to your PR, I will create a new link.

Best regards,
Hyperion Project

@hyperion-project
Copy link

Hey @tuxuser I created a new link to your workflow artifacts:
🔗 https://github.com/hyperion-project/hyperion.ng/actions/runs/1918588705

@hyperion-project
Copy link

Hey @tuxuser I created a new link to your workflow artifacts:
🔗 https://github.com/hyperion-project/hyperion.ng/actions/runs/1919205336

libcrypto performs cpu feature checks on ARM platforms, by calling `OPENSSL_cpuid_setup`.
In there, it tries to call various instructions and traps `illegal instructions` aka. non-existing instructions itself.

However, as hyperion.ng also tries to trap all signals, the call inside libcrypto is propagated and hyperiond gets killed by itself.

This patch lets execution proceed, even when `SIGILL` occurs.

References:
- libcrypto OPENSSL_cpuid_setup: https://github.com/openssl/openssl/blob/954f45ba4c504570206ff5bed811e512cf92dc8e/crypto/armcap.c#L183
@Paulchen-Panther
Copy link
Member

Many thanks for your support. 🎉

@Paulchen-Panther Paulchen-Panther merged commit 14b6a11 into hyperion-project:master Mar 2, 2022
@tuxuser tuxuser deleted the patch-1 branch March 9, 2022 11:07
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.

2 participants