This repository was archived by the owner on Jan 26, 2024. It is now read-only.
get-report.c: fix compilation error with >= 6.4 kernels#41
Open
whitebrandy wants to merge 1 commit intoAMDESE:mainfrom
Open
get-report.c: fix compilation error with >= 6.4 kernels#41whitebrandy wants to merge 1 commit intoAMDESE:mainfrom
whitebrandy wants to merge 1 commit intoAMDESE:mainfrom
Conversation
Upstream Linux kernel commit 0144e3b85d7b (x86/sev: Change snp_guest_issue_request()'s fw_err argument) breaks up the fw_err error field in struct snp_guest_request_ioctl to two 32 bit fields to properly reflect the firmware error code which is the lower 32 bits only. Unfortunately, the commit also renamed fw_err to fw_error when splitting up the field. To prevent compilation failures for older kernels, keep relying on the 64 bit field which refers to the combined firmware and VM error code. But since this code was already relying on the 64 bit field to print error messages, this change keeps it consistent with old behavior. Reported-by: Zixi Chen <[email protected]> Signed-off-by: Bandan Das <[email protected]>
MOZGIII
approved these changes
Oct 22, 2023
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Upstream Linux kernel commit 0144e3b85d7b (x86/sev: Change snp_guest_issue_request()'s fw_err argument) breaks up the fw_err error field in struct snp_guest_request_ioctl to two 32 bit fields to properly reflect the firmware error code which is the lower 32 bits only.
Unfortunately, the commit also renamed fw_err to fw_error when splitting up the field. To prevent compilation failures for older kernels, keep relying on the 64 bit field which refers to the combined firmware and VM error code. But since this code was already relying on the 64 bit field to print error messages, this change keeps it consistent with old behavior.
Reported-by: Zixi Chen [email protected]