Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38734 )
Change subject: cpu/x86: Put guard around align for smm_save_state_size
......................................................................
Patch Set 3:
(2 comments)
https://review.coreboot.org/c/coreboot/+/38734/3/src/cpu/x86/mp_init.c
File src/cpu/x86/mp_init.c:
PS3:
So is this an Intel-only tech? If so, the changes to this file should be
moved to the .get_smm_info and .relocation_handler callbacks.
https://review.coreboot.org/c/coreboot/+/38734/3/src/cpu/x86/mp_init.c@1056
PS3, Line 1056: * value of 0x400 for this value.
Patrick Rudolph noted in a previous comment: "It looks like coreboot assumes 0x400 as safe value fo […]
You have to be careful what code you read. smmhandler.S, smmhandler.c,
smmrelocate.S are for non-TSEG (very old) platforms. For TSEG platforms,
focus on mp_init.c, and smm/smm_*.
I don't think it's the alignment that breaks things, it's the absolute size.
Have a look at smm_module_setup_stub(). It uses SMM_DEFAULT_SIZE. I guess
that should be made a parameter. I would start by adding an overflow check
before line 205.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/38734
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia584f7e9b86405a12eb6cbedc3a2615a8727f69e
Gerrit-Change-Number: 38734
Gerrit-PatchSet: 3
Gerrit-Owner: cedarhouse1@comcast.net
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Patrick Rudolph
siro@das-labor.org
Gerrit-Reviewer: Philipp Deppenwiese
zaolin.daisuki@gmail.com
Gerrit-Reviewer: Stefan Reinauer
stefan.reinauer@coreboot.org
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Reviewer: cedarhouse1@comcast.net
Gerrit-Reviewer: ron minnich
rminnich@gmail.com
Gerrit-CC: 9elements QA
hardwaretestrobot@gmail.com
Gerrit-CC: Jonathan Zhang
jonzhang@fb.com
Gerrit-CC: Kevin Paul Herbert
kph@meraki.net
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Thu, 06 Feb 2020 22:01:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: cedarhouse1@comcast.net
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Gerrit-MessageType: comment