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

switch to stable toolchain #755

Merged

Conversation

gaojiaqi7
Copy link
Member

@gaojiaqi7 gaojiaqi7 commented Dec 18, 2024

  • Remove naked interrupt handler:

An interrupt handler table is used to handle all 256 interrupts. They share common handler that saves the interrupt vector and context. If the interrupt is not an error, a zero is pushed to the stack to align with the error one.

Function generic_interrupt_handler is called to find and call the corresponding callback in the CALLBACK_TABLE.

For virtualization exception, when the CET shadow stack is enabled, we need to update the LIP value in the shadow stack. As shadow stack saves the latest two return address after interrupt entry and the SSP, the position of saved LIP value is the top address of shadow stack minus 0x18 bytes.

  • Disable default-features of x86_64 crate

Default features of x86_64 use unstable features of rust that depend on nightly toolchain.

  • Upgrade to latest stable toolchain 1.83.0 and update related scripts and docs.
  • Close compiler warnings.

@gaojiaqi7 gaojiaqi7 changed the title td-exception: use global asm to replace naked interrupt handler switch to stable toolchain Dec 18, 2024
@gaojiaqi7 gaojiaqi7 force-pushed the 1217/remove_naked_function branch 2 times, most recently from 21e6f5c to d825b05 Compare December 18, 2024 06:04
@gaojiaqi7 gaojiaqi7 force-pushed the 1217/remove_naked_function branch 7 times, most recently from 7187e49 to 802aabc Compare December 19, 2024 07:10
@gaojiaqi7
Copy link
Member Author

Integration test is disabled and tracked by a new issue #757

@gaojiaqi7 gaojiaqi7 marked this pull request as draft December 19, 2024 14:27
An interrupt handler table is used to handle all 256 interrupts. They
share common handler that saves the interrupt vector and context. If the
interrupt is not an error, a zero is pushed to the stack to align with
the error one.

Function `generic_interrupt_handler` is called to find and call the
corresponding callback in the `CALLBACK_TABLE`.

For virtualization exception, when the CET shadow stack is enabled, we
need to update the LIP value in the shadow stack. As shadow stack saves
the latest two return address after interrupt entry and the SSP, the
position of saved LIP value is the top address of shadow stack minus
0x18 bytes.

Signed-off-by: Jiaqi Gao <[email protected]>
Default features of `x86_64` use unstable feature which depends on
nightly toolchain.

Signed-off-by: Jiaqi Gao <[email protected]>
CI script, makefile and docs are updated.

Signed-off-by: Jiaqi Gao <[email protected]>
Integration test depends on `bootloader` crates which locks the `x86_64`
version which is not compatible with latest toolchain.

Signed-off-by: Jiaqi Gao <[email protected]>
@gaojiaqi7 gaojiaqi7 force-pushed the 1217/remove_naked_function branch from 802aabc to d23e202 Compare December 19, 2024 14:48
@gaojiaqi7 gaojiaqi7 marked this pull request as ready for review December 20, 2024 01:23
@jyao1 jyao1 merged commit 40314b0 into confidential-containers:main Dec 20, 2024
23 checks passed
@gaojiaqi7
Copy link
Member Author

Closes #749

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