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

plat/common: Align TLS sections to PAGE_SIZE #1050

Closed

Conversation

mogasergiu
Copy link
Member

@mogasergiu mogasergiu commented Aug 14, 2023

mkbootinfo.py takes each ELF segment and aligns it to PAGE_SIZE to convert it to a struct ukplat_memregion_desc. However, this ends up generating overlapping memregion descriptors in the case of the ELF segment corresponding to the TLS sections.

To solve this, simply ensure that the TLS sections are already aligned by PAGE_SIZE.

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.uk on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): [e.g. x86_64 or N/A]
  • Platform(s): [e.g. kvm, xen or N/A]
  • Application(s): [e.g. app-python3 or N/A]

Additional configuration

Description of changes

@mogasergiu mogasergiu requested a review from a team as a code owner August 14, 2023 15:41
@unikraft-bot unikraft-bot added area/plat Unikraft Patform plat/common Common to all platforms labels Aug 14, 2023
@razvand razvand requested review from mschlumpp and michpappas and removed request for a team and vladandrew August 14, 2023 16:29
@razvand razvand assigned razvand and unassigned nderjung Aug 14, 2023
@razvand razvand added this to the v0.14.0 (Prometheus) milestone Aug 14, 2023
`mkbootinfo.py` takes each ELF segment and aligns it to PAGE_SIZE to
convert it to a `struct ukplat_memregion_desc`. However, this ends up
generating overlapping memregion descriptors in the case of the ELF
segment corresponding to the TLS sections.

To solve this, simply ensure that the TLS sections are already aligned
by PAGE_SIZE.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Copy link
Member

@michpappas michpappas left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Michalis Pappas michalis@unikraft.io

@unikraft-bot
Copy link
Member

Checkpatch passed

Beep boop! I ran Unikraft's checkpatch.pl support script on your pull request and it all looks good!

SHA commit checkpatch
db9814a plat/common: Align TLS sections to PAGE_SIZE

Copy link
Member

@mschlumpp mschlumpp left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Marco Schlumpp marco@unikraft.io

Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

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

Approved-by: Razvan Deaconescu razvand@unikraft.io

@unikraft-bot unikraft-bot added the ci/merged Merged by CI label Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plat Unikraft Patform ci/merged Merged by CI plat/common Common to all platforms
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

6 participants