Skip to content

Conversation

@SergiiDmytruk
Copy link
Member

Significant number commits are meant to be squashed into other commits on the base branch later on.

Just use grub_divmod64() explicitly like all other code does.

Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
SergiiDmytruk and others added 24 commits November 29, 2024 19:48
The behaviour is implementation specific and in case of GCC 32-bit
pointers are **sign-extended** on conversions to a larger integer type,
thus producing invalid values.

The opposite isn't dangerous, but still generates compiler warnings.

Go through `grub_addr_t` in both cases.

https://gcc.gnu.org/onlinedocs/gcc/Arrays-and-pointers-implementation.html

Signed-off-by: Sergii Dmytruk <[email protected]>
Signed-off-by: Michał Żygowski <[email protected]>
Signed-off-by: Krystian Hebel <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Only the case of legacy boot has slparams->mle_start and
slparams->mle_mem different.  Other places are updated for consistency.

Signed-off-by: Sergii Dmytruk <[email protected]>
Make them more comprehensive and remove the `skl_size <
(8*GRUB_PAGE_SIZE)` one which doesn't make much sense.

Signed-off-by: Sergii Dmytruk <[email protected]>
Not all boot methods are Linux EFI boot methods.

Signed-off-by: Sergii Dmytruk <[email protected]>
GRUB_MULTIBOOT(get_mbi_size) returns an upper bound on MBI's size
instead of the actual size.  It could also be used for measurements
after zeroing unused parts of the buffer, but using an actual size seems
like a better option as the same MBI will always have the same hash
regardless of the amount of extra memory that follows it.

Signed-off-by: Sergii Dmytruk <[email protected]>
The code makes sure that MBI entry goes first in DRTM, so the payload
can measure it first on launch.  Then goes SLRT and other typical
entries, while MB2 modules are added at the end.

Signed-off-by: Michał Żygowski <[email protected]>
Signed-off-by: Tomasz Żyjewski <[email protected]>
Signed-off-by: Krystian Hebel <[email protected]>
Signed-off-by: Sergii Dmytruk <[email protected]>
Just return bool.

Signed-off-by: Sergii Dmytruk <[email protected]>
@SergiiDmytruk SergiiDmytruk force-pushed the grub-sl-2.12-v11-amd-no-psp branch from fdf1960 to 805d4f3 Compare November 29, 2024 19:06
Copy link
Member Author

@SergiiDmytruk SergiiDmytruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub: You need to leave a comment indicating the requested changes.
Me: Shut up and post my replies to outdated conversations.

P.S. Private browsing suggests that it did post them.

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.

4 participants