<p><a href="https://review.coreboot.org/27769">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://review.coreboot.org/#/c/27769/1/src/security/tpm/tspi/log.c">File src/security/tpm/tspi/log.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/27769/1/src/security/tpm/tspi/log.c@24">Patch Set #1, Line 24:</a> <code style="font-family:monospace,monospace">static</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Does this build correctly for x86 verstage? I guess it might get optimized out. Still, I think it's safer to use MAYBE_STATIC (and explicitly initialize to NULL) so correctness is not dependent on such details.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/27769/1/src/security/tpm/tspi/log.c@31">Patch Set #1, Line 31:</a> <code style="font-family:monospace,monospace">NULL</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Doesn't this need to be 'return ce'?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/27769/1/src/security/tpm/tspi/log.c@57">Patch Set #1, Line 57:</a> <code style="font-family:monospace,monospace">                printk(BIOS_ERR, "ERROR: No TCPA log table found\n");</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Now you'll have the problem Furquan fixed again. I think you probably just want to move this error message back into tcpa_log_init() and only print it for the cbmem_add() failure (which is the only real error, all other code paths are WAI).</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://review.coreboot.org/#/c/27769/1/src/security/tpm/tspi/log.c@68">Patch Set #1, Line 68:</a> <code style="font-family:monospace,monospace">TCPA_PCR_HASH_NAME</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You need to subtract 1 here or you might not write the null terminator and get weird output in cbmem. (Or you can fix the cbmem implementation to not read more than TCPA_PCR_HASH_NAME chars from this, which I don't think it currently checks for.)</p></li></ul></li></ul><p>To view, visit <a href="https://review.coreboot.org/27769">change 27769</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/27769"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I215d79eed7ad17c6ab87f0c4b14a282e519ef07d </div>
<div style="display:none"> Gerrit-Change-Number: 27769 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Julius Werner <jwerner@chromium.org> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 01 Aug 2018 05:02:22 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>