Patch Set 2:

Patch Set 2:

(3 comments)

This change is ready for review.

Fat finger - needs changes first.

Eugene,
Thank you for the review. I've uploaded patch set 3 with your feedback. I also updated the SMRAM layout map (described on top of smm_load_module). STM stays as is. Moved stacks to the start of SMRAM since stacks grow downward and they can't corrupt any SMM code. SMM GDT (global descriptor table) is set for flat code and flat data, so there are no protections. By having stacks on top, in theory they could grow downward enough to corrupt code and data, though we have a canary in place, it could still cause problems. That is my reasoning for moving stacks to the bottom for better protection (unless we change the descriptor for stack segment and make it bound, then it can be anywhere in SMRAM).

View Change

18 comments:

To view, visit change 41829. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I78bd74c11ca42fb430f63711b5ec87d4bfe6ca2a
Gerrit-Change-Number: 41829
Gerrit-PatchSet: 3
Gerrit-Owner: Rocky Phagura
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Eugene Myers <cedarhouse1@comcast.net>
Gerrit-Reviewer: Eugene Myers <cedarhouse@comcast.net>
Gerrit-Reviewer: Jonathan Zhang <jonzhang@fb.com>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Naresh Solanki <naresh.solanki.2011@gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Ron Minnich <rminnich@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Thu, 04 Jun 2020 16:52:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Eugene Myers <cedarhouse1@comcast.net>
Comment-In-Reply-To: Paul Menzel <paulepanter@users.sourceforge.net>
Comment-In-Reply-To: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-MessageType: comment