-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
arch/libcontext: arm64: Make TCB overlap configurable #720
Conversation
4689e60
to
71fb8b5
Compare
7e41918
to
f9213e1
Compare
f9213e1
to
4daf48c
Compare
Hey, @kubanrob! Thanks a lot for pointing this out! I have updated my PR accordingly. |
4daf48c
to
a3ae8b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stumbled over one more comment that might needs to be updated, otherwise I think the PR looks good!
a3ae8b0
to
66f0fbc
Compare
The Aarch64 ABI requires 16 bytes of space after the `tlsp` pointer as part of the TCB. However, this space is not expected by newer versions of the `musl` library. As such, this commit introduces a new Makefile rule by which a library can register whether this reserved space is not necessary. The rule sets a macro by which we can then decide to assume a 16-byte block space is reserved at the end of the TCB or not. This maintains backwards compatibility with previous versions of `musl`, since if the rule is not invoked, it is assumed that the library expects the `AARCH64_RESERVED` block of 16 bytes described by the ABI. Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
66f0fbc
to
b807df1
Compare
Hey, @kubanrob. Great catch, thanks! I've updated that comment, as well. |
✅ Checkpatch passed Beep boop! I ran Unikraft's
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thank you @eduardvintila!
Reviewed-by: Robert Kuban robert.kuban@opensynergy.com
There was a problem hiding this 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
The Aarch64 ABI requires 16 bytes of space after the `tlsp` pointer as part of the TCB. However, this space is not expected by newer versions of the `musl` library. As such, this commit introduces a new Makefile rule by which a library can register whether this reserved space is not necessary. The rule sets a macro by which we can then decide to assume a 16-byte block space is reserved at the end of the TCB or not. This maintains backwards compatibility with previous versions of `musl`, since if the rule is not invoked, it is assumed that the library expects the `AARCH64_RESERVED` block of 16 bytes described by the ABI. Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Robert Kuban <robert.kuban@opensynergy.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: unikraft#720
Prerequisite checklist
checkpatch.pl
on your commit series before opening this PR;Base target
aarch64
]kvm
]Additional configuration
Description of changes
The Aarch64 ABI requires 16 bytes of space after the
tlsp
pointer as part of the TCB. However, this space is not expected by newer versions of themusl
library.As such, this PR introduces a new Makefile rule by which a library can register whether this reserved space is not necessary. The rule sets a macro by which we can then decide to assume a 16-byte block space is reserved at the end of the TCB or not.
This maintains backwards compatibility with previous versions of
musl
, since if the rule is not invoked, it is assumed that the library expects theAARCH64_RESERVED
block of 16 bytes described by the ABI.Signed-off-by: Eduard Vintilă eduard.vintila47@gmail.com