-
Notifications
You must be signed in to change notification settings - Fork 26
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
Single source of truth for version information. #168
Conversation
msr_version.h #defines for major, minor, and patch versions of msr-safe as well as helper macros to generate _u32 and string representation. Makefile Removes CURRENT_VERSION and -DVERSION from build. msrsave now gets the version string from msr_version.h msrsave_main.c msr_entry.c Now #includes msr_version.h and uses MSR_SAFE_VERSION_STR msr_safe.h Repurposes a bit of struct padding to hold a _u32-format msr-safe version number. README.md Updates documentation of struct msr_batch_array to note the new version field. Explains how this will remain unused in the 1.x.y series. Version 2.x.y will begin checking this version field to make sure what the user compiled against is the same version as the loaded kernel module. This is necessary due to anticipated batch API changes in version 2.0.0. Tested on serif (Ubuntu 24.04.1 LTS, Linux 6.8.0, gcc 13.2.0)
msr_entry.c
Outdated
@@ -396,5 +396,5 @@ module_exit(msr_exit) | |||
|
|||
MODULE_AUTHOR("M. Fadden, K. Shoga, B. Rountree, H. P. Anvin"); | |||
MODULE_DESCRIPTION("x86 generic MSR driver (+LLNL Approved List)"); | |||
MODULE_VERSION("1.7"); | |||
MODULE_VERSION( MSR_SAFE_VERSION_STR ); |
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.
Remove extra spaces
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.
Fixed.
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.
One change
Fixes #167
msr_version.h
#defines for major, minor, and patch versions of msr-safe
as well as helper macros to generate _u32 and string
representation.
Makefile
Removes CURRENT_VERSION and -DVERSION from build.
msrsave now gets the version string from msr_version.h
msrsave_main.c
msr_entry.c
Now #includes msr_version.h and uses MSR_SAFE_VERSION_STR
msr_safe.h
Repurposes a bit of struct padding to hold a _u32-format
msr-safe version number.
README.md
Updates documentation of struct msr_batch_array to note
the new version field. Explains how this will remain
unused in the 1.x.y series. Version 2.x.y will begin
checking this version field to make sure what the user
compiled against is the same version as the loaded
kernel module. This is necessary due to anticipated
batch API changes in version 2.0.0.
Tested on serif (Ubuntu 24.04.1 LTS, Linux 6.8.0, gcc 13.2.0)