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

Fix linking and loading for binaries by monitor, and fix TLS bugs #174

Merged
merged 12 commits into from
Apr 19, 2024

Conversation

dbittman
Copy link
Contributor

@dbittman dbittman commented Apr 3, 2024

This PR:

  1. Fixes a number of missing symbol errors that crop up for binaries
  2. Works around a kernel bug that will be fixed during an upcoming PR to rework the page-fault code to interact with the pager.
  3. Fixes a number of TLS bugs, getting TLS to work for compartments.

@dbittman dbittman self-assigned this Apr 3, 2024
@dbittman dbittman added bug Something isn't working enhancement New feature or request kernel Internal kernel issues labels Apr 3, 2024
@dbittman dbittman changed the title Fix linking and loading for binaries, and fix TLS bugs Fix linking and loading for binaries by monitor, and fix TLS bugs Apr 3, 2024
@dbittman dbittman marked this pull request as ready for review April 3, 2024 18:09
@dbittman dbittman requested a review from gvnn3 as a code owner April 3, 2024 18:09
@dbittman dbittman requested a review from PandaZ3D April 17, 2024 19:45
Copy link
Contributor

@PandaZ3D PandaZ3D left a comment

Choose a reason for hiding this comment

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

We should have some sort of standard code formatting as part of the project. Some of these changes are seem like refactors. It makes it hard to understand changes.

@@ -22,7 +24,7 @@ impl DebugRuntime for ReferenceRuntime {
}

fn get_exeid(&self) -> Option<twizzler_runtime_api::LibraryId> {
get_comp_config().root_library_id
Some(twizzler_runtime_api::LibraryId(3))
Copy link
Contributor

Choose a reason for hiding this comment

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

I get that this is the debug library, but is this meant to be here? Are we guaranteed that this is always 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will address.


let runtime = twizzler_runtime_api::get_runtime();

let (text_handle, data_handle) = runtime
.map_two_objects(
text_id,
text_id.as_u128(),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is going to need to change due to #176

@dbittman dbittman force-pushed the dbittman-secgate-cut4 branch from 257d9b6 to d080633 Compare April 18, 2024 18:44
@dbittman dbittman requested a review from PandaZ3D April 18, 2024 18:44
@dbittman dbittman merged commit 0969efc into main Apr 19, 2024
1 check passed
@dbittman dbittman deleted the dbittman-secgate-cut4 branch April 19, 2024 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request kernel Internal kernel issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants