[coreboot-gerrit] Change in ...coreboot[master]: security{tpm, verified_boot, mboot}:Add measured and verified boot.

build bot (Jenkins) (Code Review) gerrit at coreboot.org
Fri Dec 14 12:28:38 CET 2018


build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30218 )

Change subject: security{tpm,verified_boot,mboot}:Add measured and verified boot.
......................................................................


Patch Set 1:

(157 comments)

https://review.coreboot.org/#/c/30218/1/src/lib/prog_loaders.c 
File src/lib/prog_loaders.c:

https://review.coreboot.org/#/c/30218/1/src/lib/prog_loaders.c@81 
PS1, Line 81: int __weak prog_locate_hook(struct prog *prog) {return 0;}
space required after that ';' (ctx:VxV)


https://review.coreboot.org/#/c/30218/1/src/security/include/cb_sha256.h 
File src/security/include/cb_sha256.h:

https://review.coreboot.org/#/c/30218/1/src/security/include/cb_sha256.h@19 
PS1, Line 19: uint8_t* cb_sha256(const uint8_t *data, uint64_t len, uint8_t *digest);
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/include/cb_sha256.h@20 
PS1, Line 20: uint8_t* cb_sha256_ex(const uint8_t *data, uint64_t len, uint8_t *digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/include/cb_sha512.h 
File src/security/include/cb_sha512.h:

https://review.coreboot.org/#/c/30218/1/src/security/include/cb_sha512.h@19 
PS1, Line 19: uint8_t* cb_sha512(const uint8_t *data, uint64_t len, uint8_t *digest);
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/include/cb_sha512.h@20 
PS1, Line 20: uint8_t* cb_sha512_ex(const uint8_t *data, uint64_t len, uint8_t *digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha1.c 
File src/security/lib/cb_sha1.c:

https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha1.c@18 
PS1, Line 18: uint8_t *cb_sha1(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha1.c@18 
PS1, Line 18: uint8_t *cb_sha1(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c 
File src/security/lib/cb_sha256.c:

https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c@18 
PS1, Line 18: uint8_t* cb_sha256_ex(const uint8_t* data, uint64_t len, uint8_t* digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c@18 
PS1, Line 18: uint8_t* cb_sha256_ex(const uint8_t* data, uint64_t len, uint8_t* digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c@18 
PS1, Line 18: uint8_t* cb_sha256_ex(const uint8_t* data, uint64_t len, uint8_t* digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c@22 
PS1, Line 22: 	const uint8_t* input_ptr;
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c@57 
PS1, Line 57: uint8_t* cb_sha256(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c@57 
PS1, Line 57: uint8_t* cb_sha256(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha256.c@57 
PS1, Line 57: uint8_t* cb_sha256(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c 
File src/security/lib/cb_sha512.c:

https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c@18 
PS1, Line 18: uint8_t* cb_sha512_ex(const uint8_t* data, uint64_t len, uint8_t* digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c@18 
PS1, Line 18: uint8_t* cb_sha512_ex(const uint8_t* data, uint64_t len, uint8_t* digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c@18 
PS1, Line 18: uint8_t* cb_sha512_ex(const uint8_t* data, uint64_t len, uint8_t* digest,
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c@22 
PS1, Line 22: 	const uint8_t* input_ptr;
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c@57 
PS1, Line 57: uint8_t* cb_sha512(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c@57 
PS1, Line 57: uint8_t* cb_sha512(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/lib/cb_sha512.c@57 
PS1, Line 57: uint8_t* cb_sha512(const uint8_t* data, uint64_t len, uint8_t* digest)
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h 
File src/security/mboot/mboot.h:

https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h@36 
PS1, Line 36: typedef struct tdTPM_DIGEST{
missing space after struct definition


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h@95 
PS1, Line 95: int is_zero_buffer(void  *, unsigned int);
function definition argument 'void  *' should also have an identifier name


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h@95 
PS1, Line 95: int is_zero_buffer(void  *, unsigned int);
function definition argument 'unsigned int' should also have an identifier name


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h@130 
PS1, Line 130: int log_event_tcg_20_format(TCG_PCR_EVENT2_HDR *, uint8_t *);
function definition argument 'TCG_PCR_EVENT2_HDR *' should also have an identifier name


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h@130 
PS1, Line 130: int log_event_tcg_20_format(TCG_PCR_EVENT2_HDR *, uint8_t *);
function definition argument 'uint8_t *' should also have an identifier name


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h@131 
PS1, Line 131: int log_event_tcg_12_format(TCG_PCR_EVENT2_HDR *, uint8_t *);
function definition argument 'TCG_PCR_EVENT2_HDR *' should also have an identifier name


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.h@131 
PS1, Line 131: int log_event_tcg_12_format(TCG_PCR_EVENT2_HDR *, uint8_t *);
function definition argument 'uint8_t *' should also have an identifier name


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c 
File src/security/mboot/mboot.c:

https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@45 
PS1, Line 45: 				if (!is_zero_buffer(
suspect code indent for conditional statements (32, 48)


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@52 
PS1, Line 52: 				tpmHashAlgorithmBitmap |= EFI_TCG2_BOOT_HASH_ALG_SHA256;
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@53 
PS1, Line 53: 				if (!is_zero_buffer(
suspect code indent for conditional statements (32, 48)


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@57 
PS1, Line 57: 							EFI_TCG2_BOOT_HASH_ALG_SHA256;
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@64 
PS1, Line 64: 					"reported - 0x%x\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@105 
PS1, Line 105: 				swab16(TpmCap.data.assignedPCR.pcrSelections[index].hash);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@109 
PS1, Line 109: 				TpmCap.data.assignedPCR.pcrSelections[index].sizeofSelect;
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@111 
PS1, Line 111: 				TpmCap.data.assignedPCR.pcrSelections[index].pcrSelect,
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@125 
PS1, Line 125:  * @param[in] flags		flags associated with hash data. Currently unused.
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@132 
PS1, Line 132:  * @retval TPM_SUCCESS  	Operation completed successfully.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@133 
PS1, Line 133:  * @retval TPM_E_IOERROR 	Unexpected device behavior.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@143 
PS1, Line 143: 	printk(BIOS_DEBUG, "%s: Hash Data Length: %zu bytes\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@146 
PS1, Line 146: 	if (invalid){
space required before the open brace '{'


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@170 
PS1, Line 170: 			printk(BIOS_DEBUG, "%s: SHA1 Hash Digest:\n", __FUNCTION__);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@170 
PS1, Line 170: 			printk(BIOS_DEBUG, "%s: SHA1 Hash Digest:\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@171 
PS1, Line 171: 			mboot_print_buffer (digest->digest.sha1, SHA1_DIGEST_SIZE);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@171 
PS1, Line 171: 			mboot_print_buffer (digest->digest.sha1, SHA1_DIGEST_SIZE);
space prohibited between function name and open parenthesis '('


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@185 
PS1, Line 185: 				cb_sha256(hashData, hashDataLen, digest->digest.sha256);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@190 
PS1, Line 190: 			printk(BIOS_DEBUG, "%s: SHA256 Hash Digest:\n", __FUNCTION__);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@190 
PS1, Line 190: 			printk(BIOS_DEBUG, "%s: SHA256 Hash Digest:\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@191 
PS1, Line 191: 			mboot_print_buffer(digest->digest.sha256, SHA256_DIGEST_SIZE);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@206 
PS1, Line 206: 		/* If SHA1 PCR bank is active, log the event in TCG 1.2 format tool */
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@213 
PS1, Line 213: 		printk(BIOS_DEBUG, "%s: returned 0x%x\n", __FUNCTION__, status);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@233 
PS1, Line 233: 	for (pcr=0; pcr < 8; pcr++) {
spaces required around that '=' (ctx:VxV)


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@234 
PS1, Line 234: 		printk(BIOS_DEBUG, "%s: Invalidating PCR %d\n", __FUNCTION__, pcr);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@234 
PS1, Line 234: 		printk(BIOS_DEBUG, "%s: Invalidating PCR %d\n", __FUNCTION__, pcr);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@246 
PS1, Line 246: 				" 0x%x\n", __FUNCTION__, pcr, status);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@300 
PS1, Line 300:  * @param[in] type 		data type of the cbfs file.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@302 
PS1, Line 302:  * @param[in] evenType	 	tcg event type.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@317 
PS1, Line 317: 	printk(BIOS_DEBUG, "%s: Measure %s\n", __FUNCTION__, name);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@321 
PS1, Line 321: 		printk(BIOS_DEBUG, "%s: CBFS locate fail: %s\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@324 
PS1, Line 324: 	} else {
else is not generally useful after a break or return


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@326 
PS1, Line 326: 			__FUNCTION__, name);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@362 
PS1, Line 362: 	printk(BIOS_DEBUG, "%s: tlcl_lib_init\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@365 
PS1, Line 365: 			__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@370 
PS1, Line 370: 		printk(BIOS_DEBUG, "%s: tlcl_resume\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@373 
PS1, Line 373: 		printk(BIOS_DEBUG, "%s: tlcl_startup\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@378 
PS1, Line 378: 		printk(BIOS_ERR, "%s: StartUp failed 0x%x!\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@399 
PS1, Line 399:  * @retval TPM_SUCCESS  		Operation completed successfully.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@400 
PS1, Line 400:  *  @retval TPM_E_IOERROR 	Unexpected device behavior.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@409 
PS1, Line 409: 		printk(BIOS_DEBUG, "%s: StartUp, successful!\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@413 
PS1, Line 413: 			__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@418 
PS1, Line 418: 				__FUNCTION__, status);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@423 
PS1, Line 423: 			"PCRs invalidated.\n", __FUNCTION__, status);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@444 
PS1, Line 444:  * @retval TPM_SUCCESS  	Operation completed successfully.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@445 
PS1, Line 445:  * @retval TPM_E_IOERROR 	Unexpected device behavior.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@457 
PS1, Line 457: 			__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@466 
PS1, Line 466: 			"can't be logged. ABORTING!!!\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@473 
PS1, Line 473: 			__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@476 
PS1, Line 476: 			" ABORTING!!!\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@487 
PS1, Line 487: 		if (status == TPM_SUCCESS)
that open brace { should be on the previous line


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@490 
PS1, Line 490: 				"%d.\n", __FUNCTION__, mb_log_list[i].cbfs_name,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@494 
PS1, Line 494: 				"ABORTING!!!\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@502 
PS1, Line 502: static const uint8_t crtm_version[] = CONFIG_CRTM_VERSION_STRING \
Avoid unnecessary line continuations


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@523 
PS1, Line 523:  * @retval TPM_E_IOERROR 	Unexpected device behavior.
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@532 
PS1, Line 532: 	printk(BIOS_DEBUG, "%s: Measure CRTM Version\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@537 
PS1, Line 537: 	printk(BIOS_DEBUG, "%s: EventSize - %u\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@560 
PS1, Line 560: 		__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@567 
PS1, Line 567: 	printk(BIOS_DEBUG, "%s: EventSize - %u\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/mboot/mboot.c@587 
PS1, Line 587: 		printk(BIOS_DEBUG, "%s: returned 0x%x\n", __FUNCTION__, status);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss.h 
File src/security/tpm/tss.h:

https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss.h@132 
PS1, Line 132: 		TPMS_CAPABILITY_DATA *CapabilityData );
space prohibited before that close parenthesis ')'


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c 
File src/security/tpm/tss/tcg-2.0/tss.c:

https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@216 
PS1, Line 216: 	printk(BIOS_SPEW, "%s: pcr = %d\n", __FUNCTION__, pcr_num );
space prohibited before that close parenthesis ')'


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@216 
PS1, Line 216: 	printk(BIOS_SPEW, "%s: pcr = %d\n", __FUNCTION__, pcr_num );
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@217 
PS1, Line 217: 	printk(BIOS_SPEW, "%s: in_digests->count = %d\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@224 
PS1, Line 224: 		memcpy(	(void *) pcr_ext_cmd.digests.digests[i].digest.sha256,
space prohibited after that open parenthesis '('


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@228 
PS1, Line 228: 		printk (BIOS_SPEW, "%s: in_digests[%d]->hash_alg = 0x%x\n",
space prohibited between function name and open parenthesis '('


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@229 
PS1, Line 229: 			__FUNCTION__, i, in_digests->digests[i].hashAlg);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@235 
PS1, Line 235: 	// Check if we are invalidating the pcrs, ignore the error if this is the case
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@239 
PS1, Line 239: 			if (in_digests->digests[0].digest.invalidate_pcrs == 1) {
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@246 
PS1, Line 246: 						 " expected\n", __func__ );
space prohibited before that close parenthesis ')'


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@290 
PS1, Line 290: 	printk(BIOS_SPEW, "%s: tlcl_init_done is %d\n", __FUNCTION__, done );
space prohibited before that close parenthesis ')'


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@290 
PS1, Line 290: 	printk(BIOS_SPEW, "%s: tlcl_init_done is %d\n", __FUNCTION__, done );
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@294 
PS1, Line 294: 	printk(BIOS_SPEW, "%s: calling tis_init\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@296 
PS1, Line 296: 		printk(BIOS_ERR, "%s: tis_init returned error\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@300 
PS1, Line 300: 	printk(BIOS_SPEW, "%s: calling tis_open\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@302 
PS1, Line 302: 		printk(BIOS_ERR, "%s: tis_open returned error\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@501 
PS1, Line 501: 			" yet\n", __func__ );
space prohibited before that close parenthesis ')'


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@504 
PS1, Line 504: 	response = tpm_process_command_ex(TPM2_GetCapability, &cmd, 0, &response_size, 1);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@507 
PS1, Line 507: 		printk(BIOS_ERR, "%s: Command Failed\n", __func__ );
space prohibited before that close parenthesis ')'


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@530 
PS1, Line 530: 	for (index = 0; index < sizeof(mHashInfo)/sizeof(mHashInfo[0]);
suspect code indent for conditional statements (8, 24)


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@530 
PS1, Line 530: 	for (index = 0; index < sizeof(mHashInfo)/sizeof(mHashInfo[0]);
Prefer ARRAY_SIZE(mHashInfo)


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@535 
PS1, Line 535: 	printk(BIOS_SPEW, "%s: unknown hash algorithm %d\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss.c@536 
PS1, Line 536: 		hashAlgo );
space prohibited before that close parenthesis ')'


https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss_structures.h 
File src/security/tpm/tss/tcg-2.0/tss_structures.h:

https://review.coreboot.org/#/c/30218/1/src/security/tpm/tss/tcg-2.0/tss_structures.h@269 
PS1, Line 269: 	TPMI_ALG_HASH 	hash;
please, no space before tabs


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c 
File src/security/verified_boot/vboot_check.c:

https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@32 
PS1, Line 32: 	uint8_t* signature = NULL;
"foo* bar" should be "foo *bar"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@62 
PS1, Line 62: 	cb_sha512_ex((const uint8_t*)CONFIG_OEM_MANIFEST_LOC,
"(foo*)" should be "(foo *)"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@65 
PS1, Line 65: 	cb_sha256_ex((const uint8_t*)CONFIG_OEM_MANIFEST_LOC,
"(foo*)" should be "(foo *)"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@69 
PS1, Line 69: 	signature = (uint8_t*)CONFIG_OEM_MANIFEST_LOC +
"(foo*)" should be "(foo *)"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@80 
PS1, Line 80: 		__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@123 
PS1, Line 123: 			(uint8_t*)event_msg, 0);
"(foo*)" should be "(foo *)"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@126 
PS1, Line 126: 				"%d.\n", __FUNCTION__, event_msg, pcr);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@129 
PS1, Line 129: 				"ABORTING!!!\n", __FUNCTION__, event_msg);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@143 
PS1, Line 143: 		,int32_t pcr
space required after that ',' (ctx:ExV)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@155 
PS1, Line 155: 		__FUNCTION__, name, start, (int) size);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@160 
PS1, Line 160: 		cb_sha512((const uint8_t*)start, size, digest);
"(foo*)" should be "(foo *)"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@162 
PS1, Line 162: 		cb_sha256((const uint8_t*)start, size, digest);
"(foo*)" should be "(foo *)"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@167 
PS1, Line 167: 			printk(BIOS_INFO, "%s: buffer hash\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@169 
PS1, Line 169: 			printk(BIOS_INFO, "%s: manifest hash\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@179 
PS1, Line 179: 					__FUNCTION__, name);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@199 
PS1, Line 199: 		,int32_t pcr
space required after that ',' (ctx:ExV)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@215 
PS1, Line 215: 		if ((type & VERIFIED_BOOT_COPY_BLOCK) && (buffer) && (*buffer)
suspect code indent for conditional statements (16, 32)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@219 
PS1, Line 219: 					"memory\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@225 
PS1, Line 225: 			printk(BIOS_INFO, "%s: done\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@231 
PS1, Line 231: 				,pcr
space required after that ',' (ctx:ExV)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@251 
PS1, Line 251: 		switch (list[i].type) {
switch and case should be at the same indent


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@258 
PS1, Line 258: 						,list[i].pcr
space required after that ',' (ctx:ExV)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@266 
PS1, Line 266: 						list[i].data.file.related_items);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@276 
PS1, Line 276: 					,list[i].pcr
space required after that ',' (ctx:ExV)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@297 
PS1, Line 297: 		switch (list[i].type) {
switch and case should be at the same indent


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@303 
PS1, Line 303: 						process_verify_list((verify_item_t *)list[i].data.file.related_items);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@313 
PS1, Line 313: 						,list[i].pcr
space required after that ',' (ctx:ExV)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@341 
PS1, Line 341: 	printk(BIOS_SPEW, "%s: processing bootblock items\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@344 
PS1, Line 344: 	printk(BIOS_SPEW, "%s: check the manifest\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@348 
PS1, Line 348: 	printk(BIOS_SPEW, "%s: process bootblock verify list\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@375 
PS1, Line 375: 	printk(BIOS_SPEW, "%s: processing early items\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@379 
PS1, Line 379: 	printk(BIOS_SPEW, "%s: check the manifest\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@384 
PS1, Line 384: 	printk(BIOS_SPEW, "%s: process early verify list\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@414 
PS1, Line 414: 		switch (list[i].type) {
switch and case should be at the same indent


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@422 
PS1, Line 422: 						,list[i].pcr
space required after that ',' (ctx:ExV)


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@428 
PS1, Line 428: 							__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@429 
PS1, Line 429: 						process_verify_list((verify_item_t *)list[i].data.oprom.related_items);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@432 
PS1, Line 432: 						"be started\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@438 
PS1, Line 438: 					" ROM LIST 0x%x\n", __FUNCTION__,
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@445 
PS1, Line 445: 		__FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@454 
PS1, Line 454: 		void *buffer = (void*) 0x01000000;
"(foo*)" should be "(foo *)"


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@455 
PS1, Line 455: 		printk(BIOS_SPEW, "%s: requesting %s\n", __FUNCTION__, prog->name);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@455 
PS1, Line 455: 		printk(BIOS_SPEW, "%s: requesting %s\n", __FUNCTION__, prog->name);
__func__ should be used instead of gcc specific __FUNCTION__


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@456 
PS1, Line 456: 		process_named_list(payload_verify_list, prog->name, &buffer, NULL);
line over 80 characters


https://review.coreboot.org/#/c/30218/1/src/security/verified_boot/vboot_check.c@457 
PS1, Line 457: 		printk(BIOS_SPEW, "%s: running allowed\n", __FUNCTION__);
__func__ should be used instead of gcc specific __FUNCTION__



-- 
To view, visit https://review.coreboot.org/c/coreboot/+/30218
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic1d5a21d40b6a31886777e8e9fe7b28c860f1a80
Gerrit-Change-Number: 30218
Gerrit-PatchSet: 1
Gerrit-Owner: Frans Hendriks <fhendriks at eltan.com>
Gerrit-Reviewer: Frans Hendriks <fhendriks at eltan.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-CC: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-Comment-Date: Fri, 14 Dec 2018 11:28:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181214/43d93cbd/attachment.html>


More information about the coreboot-gerrit mailing list