-
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
kvm/x86: Add pristine ECTX check #897
kvm/x86: Add pristine ECTX check #897
Conversation
✅ 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.
Thanks, @mschlumpp. I tested it, it works. I looked through the code and commits. Everything is OK.
Reviewed-by: Razvan Deaconescu razvand@unikraft.io
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 tested it and it works here too. Thanks!
Reviewed-by: Rares Miculescu miculescur@gmail.com
This can be used in situtations where the executed code must not touch the extended registers. For example, interrupt handlers in Unikraft do save these and therefore also cannot modify them. Doing so is usually breaking the interrupted code. Signed-off-by: Marco Schlumpp <marco@unikraft.io>
This checks that the extended registers were not modified within the interrupt service routine. This is not free and therefore can be toggled via a KConfig option. Signed-off-by: Marco Schlumpp <marco@unikraft.io>
6498935
to
e8c8342
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.
Approved-by: Simon Kuenzer simon@unikraft.io
This checks that the extended registers were not modified within the interrupt service routine. This is not free and therefore can be toggled via a KConfig option. Signed-off-by: Marco Schlumpp <marco@unikraft.io> Reviewed-by: Razvan Deaconescu <razvand@unikraft.io> Approved-by: Simon Kuenzer <simon@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #897
Prerequisite checklist
checkpatch.pl
on your commit series before opening this PR;Base target
x86_64
kvm
Additional configuration
CONFIG_UKPLAT_ISR_ECTX_ASSERTIONS=y
Description of changes
Currently, interrupt handlers could silently modify the values of extended context registers. More recent compilers are more likely to generate vectorized machine code that utilizes these registers. This happened in the past and usually caused hard to find bugs.
This pull request implements a check on x86/kvm, but can be extended for other architectures/platforms.