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

libmstpm: add -mno-red-zone in CFLAGS #6

Merged

Conversation

gaojiaqi7
Copy link

From System V x86-64 abi, the 128-byte read zone area beyond the location pointed to by %rsp is considered to be reserved and shall not be modified by signal or interrupt handlers.

As the red area is enabled by default by gcc, the interrupt handler in the current implementation may disrupt the data within the area.

To avoid unpredictable behavior caused by this, disable the red zone by adding -mno-red-zone in CFLAGS for building openssl and ms-tpm-20-ref.

From System V x86-64 abi, the 128-byte read zone area beyond the location
pointed to by %rsp is considered to be reserved and shall not be modified
by signal or interrupt handlers.

As the red area is enabled by default by gcc, the interrupt handler in the
current implementation may disrupt the data within the area.

To avoid unpredictable behavior caused by this, disable the red zone by
adding `-mno-red-zone` in CFLAGS for building openssl and ms-tpm-20-ref.

Signed-off-by: Jiaqi Gao <[email protected]>
@gaojiaqi7 gaojiaqi7 force-pushed the 0703/set_mno_red_zone branch from 7a9e73c to 704a3a9 Compare July 5, 2024 15:36
@peterfang peterfang merged commit a39d666 into intel-staging:svsm-tdp-vtpm Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants