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
TBF: Add "Fixed Addresses" TLV #1845
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unsafe not needed for parsing, make it more official and clear.
If the process included fixed addresses in its header, make sure those are used, otherwise return an error. Note, this does not yet actually try to use the correct address (i.e. in ram) that the kernel could try to optimize for.
Allows processes to communicate to the kernel they need a very specific address.
bradjc
added
kernel
P-Significant
This is a substancial change that requires review from all core developers.
labels
May 12, 2020
jrvanwhy
reviewed
May 12, 2020
Updated. |
ppannuto
previously approved these changes
May 13, 2020
jrvanwhy
previously approved these changes
May 13, 2020
Co-authored-by: Pat Pannuto <pat.pannuto@gmail.com>
ppannuto
previously approved these changes
May 13, 2020
jrvanwhy
approved these changes
May 13, 2020
ppannuto
approved these changes
May 13, 2020
6 tasks
alistair23
approved these changes
May 14, 2020
Any other comments @tock/core-wg? |
hudson-ayers
approved these changes
May 18, 2020
bors r+ |
bors bot
added a commit
to tock/libtock-rs
that referenced
this pull request
Jul 7, 2020
208: linker: add sram origin symbol r=bradjc a=bradjc This allows elf2tab to determine what the start of RAM address is when generating a fixed address header in the TBF. See tock/elf2tab#23 and tock/tock#1845. Co-authored-by: Brad Campbell <bradjc5@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kernel
last-call
Final review period for a pull request.
P-Significant
This is a substancial change that requires review from all core developers.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
Part of: #1283 and #1465
This adds a new TLV header (
FixedAddresses
) for processes to specify the addresses in flash and ram they need (if they require fixed addresses, i.e. are not position independent. The kernel then checks these addresses when creating processes, and throws errors if they are not met. Note: this does not change the kernel to try to give a process its requested memory address.The main benefit of this is that non-PIC apps can use this header and the kernel can catch errors when loading processes. Right now misalignments cause other errors to pop up once a process is running, and these are difficult to debug.
I have related changes to elf2tab and tockloader in progress, but will wait to PR those until any changes are ironed out here.
Testing Strategy
Adding the headers to Hail and verifying that apps work when they match and an error is displayed when they do not.
TODO or Help Wanted
Documentation Updated
/docs
, or no updates are required.Formatting
make formatall
.