Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Issue 3084030: Add structs for TPM NV simplification (Closed)

Created:
10 years, 4 months ago by Randall Spangler
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, Randall Spangler, Bill Richardson, Luigi Semenzato
Base URL:
ssh://gitrw.chromium.org/vboot_reference.git
Visibility:
Public.

Description

Add structs for TPM NV simplification. Now uses only 2 NV spaces, one for firmware and one for kernel. Changed TlclRead / TlclWrite to take void* / const void* to reduce typecasts. Much restructuring of rollback_index.c. Fixed a version-packing bug in rollback_index.c (& --> |) BUG:chrome-os-partner:304 TEST:manual testing of all code flows on CRB

Patch Set 1 #

Patch Set 2 : Use new structs #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -344 lines) Patch
M firmware/lib/include/rollback_index.h View 1 4 chunks +46 lines, -30 lines 1 comment Download
M firmware/lib/rollback_index.c View 11 chunks +172 lines, -227 lines 6 comments Download
M firmware/lib/tpm_lite/include/tlcl.h View 1 chunk +2 lines, -2 lines 0 comments Download
M firmware/lib/tpm_lite/tlcl.c View 2 chunks +2 lines, -2 lines 0 comments Download
M firmware/lib/vboot_firmware.c View 1 chunk +3 lines, -8 lines 0 comments Download
M firmware/linktest/main.c View 1 chunk +1 line, -2 lines 0 comments Download
M firmware/version.c View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/Makefile View 1 chunk +1 line, -1 line 0 comments Download
D tests/rollback_index_mock.c View 1 chunk +0 lines, -71 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Luigi Semenzato
Good idea. Do we have to worry that the MSVC and GNU compilers will generate ...
10 years, 4 months ago (2010-08-09 20:58:16 UTC) #1
Luigi Semenzato
LGTM if you want to commit this separately. On 2010/08/09 20:58:16, Luigi Semenzato wrote: > ...
10 years, 4 months ago (2010-08-10 15:15:50 UTC) #2
Randall Spangler
Thanks. I think I'll reuse this CL for the code which uses the structs, to ...
10 years, 4 months ago (2010-08-10 15:41:31 UTC) #3
Luigi Semenzato
LGTM after considering comments and changing type *var to type* var if it pleases you. ...
10 years, 4 months ago (2010-08-12 01:12:30 UTC) #4
gauravsh
http://codereview.chromium.org/3084030/diff/5001/6002 File firmware/lib/rollback_index.c (right): http://codereview.chromium.org/3084030/diff/5001/6002#newcode73 firmware/lib/rollback_index.c:73: return TlclRead(FIRMWARE_NV_INDEX, rsf, sizeof(RollbackSpaceFirmware)); The style guide doesn't enforce ...
10 years, 4 months ago (2010-08-12 02:15:51 UTC) #5
Randall Spangler
10 years, 4 months ago (2010-08-12 20:00:47 UTC) #6
Fixed and submitting.  Thanks.

http://codereview.chromium.org/3084030/diff/5001/6002
File firmware/lib/rollback_index.c (right):

http://codereview.chromium.org/3084030/diff/5001/6002#newcode73
firmware/lib/rollback_index.c:73: return TlclRead(FIRMWARE_NV_INDEX, rsf,
sizeof(RollbackSpaceFirmware));
On 2010/08/12 01:12:30, Luigi Semenzato wrote:
> I think Google's convention is to put the star near the type, not the variable
> (wrong, but that's the convention).

Done.

http://codereview.chromium.org/3084030/diff/5001/6002#newcode125
firmware/lib/rollback_index.c:125: RETURN_ON_FAILURE(WriteSpaceKernel(rsk));
On 2010/08/12 01:12:30, Luigi Semenzato wrote:
> Let's see if I have this right.  You removed the TPM_IS_INITIALIZED_NV_INDEX
> because we can detect if the initializing write happened to the
KERNEL_NV_INDEX
> by the presence of the GRWL.  But now we have an ambiguity: is the GRWL not
> present because the initialization didn't complete, or because of an attack or
a
> bug?  It may not matter.

Either way, we'll need to fix it in recovery mode.

Powered by Google App Engine
This is Rietveld 408576698