[coreboot] New Defects reported by Coverity Scan for coreboot

scan-admin at coverity.com scan-admin at coverity.com
Tue Aug 1 14:28:18 CEST 2017


Hi,

Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.

3 new defect(s) introduced to coreboot found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)


** CID 1378783:  Control flow issues  (NO_EFFECT)
/3rdparty/arm-trusted-firmware/plat/compat/plat_topology_compat.c: 147 in plat_get_power_domain_tree_desc()


________________________________________________________________________________________________________
*** CID 1378783:  Control flow issues  (NO_EFFECT)
/3rdparty/arm-trusted-firmware/plat/compat/plat_topology_compat.c: 147 in plat_get_power_domain_tree_desc()
141     
142     	/*
143     	 * We assume that the platform allocates affinity instance ids from
144     	 * 0 onwards at each affinity level in the mpidr. FIRST_MPIDR = 0.0.0.0
145     	 */
146     	affmap_idx = 0;
>>>     CID 1378783:  Control flow issues  (NO_EFFECT)
>>>     "afflvl" is converted to an unsigned type because it's compared to an unsigned constant.
147     	for (afflvl = PLATFORM_MAX_AFFLVL; afflvl >= MPIDR_AFFLVL0; afflvl--) {
148     		affmap_idx = init_pwr_domain_tree_desc(FIRST_MPIDR,
149     					       affmap_idx,
150     					       PLATFORM_MAX_AFFLVL,
151     					       afflvl);
152     	}

** CID 1378782:  Integer handling issues  (NO_EFFECT)
/3rdparty/arm-trusted-firmware/lib/cpus/errata_report.c: 75 in errata_print_msg()


________________________________________________________________________________________________________
*** CID 1378782:  Integer handling issues  (NO_EFFECT)
/3rdparty/arm-trusted-firmware/lib/cpus/errata_report.c: 75 in errata_print_msg()
69     		[ERRATA_MISSING] = "missing!"
70     	};
71     	static const char *const __unused bl_str = BL_STRING;
72     	const char *msg __unused;
73     
74     
>>>     CID 1378782:  Integer handling issues  (NO_EFFECT)
>>>     This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "status >= 0U".
75     	assert(status >= 0 && status < ARRAY_SIZE(errata_status_str));
76     	assert(cpu);
77     	assert(id);
78     
79     	msg = errata_status_str[status];
80     

** CID 1378781:  Integer handling issues  (NO_EFFECT)
/3rdparty/arm-trusted-firmware/lib/xlat_tables/xlat_tables_common.c: 314 in init_xlation_table_inner()


________________________________________________________________________________________________________
*** CID 1378781:  Integer handling issues  (NO_EFFECT)
/3rdparty/arm-trusted-firmware/lib/xlat_tables/xlat_tables_common.c: 314 in init_xlation_table_inner()
308     
309     static mmap_region_t *init_xlation_table_inner(mmap_region_t *mm,
310     					uintptr_t base_va,
311     					uint64_t *table,
312     					int level)
313     {
>>>     CID 1378781:  Integer handling issues  (NO_EFFECT)
>>>     "level" is converted to an unsigned type because it's compared to an unsigned constant.
314     	assert(level >= XLAT_TABLE_LEVEL_MIN && level <= XLAT_TABLE_LEVEL_MAX);
315     
316     	unsigned int level_size_shift =
317     		       L0_XLAT_ADDRESS_SHIFT - level * XLAT_TABLE_ENTRIES_SHIFT;
318     	u_register_t level_size = (u_register_t)1 << level_size_shift;
319     	u_register_t level_index_mask =


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5Ylv4tSPRz9dBQ0aVP5djYUjybAUovJEE6WqBRJByP41C3mfY4xq57X8B74BWCYZYRyChm7HQNotV6VYhp30CbwoChyZJvcw5yO0NI-2BPN3WJerepOv8DfMcp10rahrV2L4HCKlKI-2BzTTAO9KwsiZFhjNSodFgf8-2BsDnPzwvJaM7uisQ8HsquRuJ5zYwLJYWTRw-3D

To manage Coverity Scan email notifications for "coreboot at coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4e-2BpBzwOa5gzBZa9dWpDbzfofODnVj1enK2UkK0-2BgCCqyeem8IVKvTxSaOFkteZFcnohwvb2rnYNjswGryEWCURnUk6WHU42sbOmtOjD-2Bx5c-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5Ylv4tSPRz9dBQ0aVP5djYU0NS5n6d-2B-2FbYWjWQDTCyZzX-2FD-2BcEW0Z135iaBQLaqZ7d6aZgL3eJoKelwd1x19Va7E0LuxKD7fxhVeKeeCxeHswkBfeTD6pvi2kog1yrA8wZ1OmGUnbUSS8cfaMAqFZ7bN-2F58V5FuScqE-2BSRLEJzFMm0GZY8PUBUpf8zeGlCM3z4-3D




More information about the coreboot mailing list