-
Notifications
You must be signed in to change notification settings - Fork 6
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
Changes/fixes on top of v11 AMD patches for non-PSP case #138
base: linux-sl-master-9-12-24-v11-amd
Are you sure you want to change the base?
Changes/fixes on top of v11 AMD patches for non-PSP case #138
Conversation
When the inner for loop doesn't break upon finding a matching algorithm, it: - finds SHA1 ID and updates `alg_id_field` but not `dptr` - finds SHA256 ID and copies SHA1 and bytes that follow it as SHA256 - exits and outer loop gets to run again with `alg_id_field` pointing past the list of digests, this time likely doing nothing, leading to a PCR being extended with a semi-random hash Breaking isn't enough on its own because then alg_id_field might end up not being moved if corresponding TPM bank is off, so instead advance the pointer outside of the inner loop. Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
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.
It took me a while to wrap my head around how slr_entry_amd_info
gets located. Normally container_of()
macro is used for such things, but I guess it doesn't help when remapping is involved.
@@ -3348,16 +3348,14 @@ int __init amd_iommu_enable(void) | |||
if (ret) | |||
return ret; | |||
|
|||
#if IS_ENABLED(CONFIG_SECURE_LAUNCH) |
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.
Why is this removed? Won't it cause build failures with this option disabled?
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.
Removed the check as unnecessary, seems to build fine without slaunch. Since in coreboot this kind of changes is used to reduce number of places where things are compiled conditionally, I thought Linux likely does the same and grepping seemed to confirm that.
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.
Yes it causes 32b builds to fail (SL is only meant to be build at 64b). Earlier per Ard's request I changed this to use if () instead of #if () and the autobuilder for Linux reported an error. So we agreed to switch it back. Patch set v9 or v10 I think had the change in it.
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.
Not sure why 32bit would change the outcome, but reverted that part: https://github.com/TrenchBoot/linux/compare/257171792711fad05a8477be3beaf2cebff0830a..63ed6bb791786eab4b96d8510cbd23d4d87d356e
One more thing that was missed in target branch: Kconfig description of |
|
Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
* set SL_FLAG_ARCH_SKINIT in slaunch_setup_skinit() unconditionally * use slaunch_is_skinit_launch() in slaunch_cpu_setup_skinit() Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
2571717
to
63ed6bb
Compare
Most of the commits are meant to be squashed into other commits on the base branch later on.