diff options
-rw-r--r-- | board/cr50/dcrypto/hmac_drbg.c | 2 | ||||
-rw-r--r-- | board/cr50/tpm2/aes.c | 2 | ||||
-rw-r--r-- | board/cr50/tpm2/endorsement.c | 4 | ||||
-rw-r--r-- | board/cr50/tpm2/virtual_nvmem.c | 2 | ||||
-rw-r--r-- | chip/g/dcrypto/hmac_drbg.c | 2 | ||||
-rw-r--r-- | chip/g/loader/launch.c | 4 | ||||
-rw-r--r-- | common/ap_ro_integrity_check.c | 4 | ||||
-rw-r--r-- | common/cmsg.c | 2 | ||||
-rw-r--r-- | common/keyboard_mkbp.c | 2 | ||||
-rw-r--r-- | common/nvmem.c | 2 | ||||
-rw-r--r-- | common/pinweaver.c | 2 | ||||
-rw-r--r-- | common/printf.c | 4 | ||||
-rw-r--r-- | common/rwsig.c | 2 | ||||
-rw-r--r-- | common/thermal.c | 2 | ||||
-rw-r--r-- | common/vboot/vb21_lib.c | 2 | ||||
-rw-r--r-- | common/vboot_hash.c | 4 | ||||
-rw-r--r-- | core/cortex-m/task.c | 2 | ||||
-rw-r--r-- | docs/packetized-console.md | 4 | ||||
-rw-r--r-- | include/config.h | 2 | ||||
-rw-r--r-- | include/host_command.h | 2 | ||||
-rw-r--r-- | test/timer_jump.py | 2 | ||||
-rwxr-xr-x | util/signer/bs | 2 |
22 files changed, 28 insertions, 28 deletions
diff --git a/board/cr50/dcrypto/hmac_drbg.c b/board/cr50/dcrypto/hmac_drbg.c index d5f4960013..1ef468e08b 100644 --- a/board/cr50/dcrypto/hmac_drbg.c +++ b/board/cr50/dcrypto/hmac_drbg.c @@ -359,7 +359,7 @@ static int cmd_hmac_drbg(int argc, char **argv) DECLARE_SAFE_CONSOLE_COMMAND(hmac_drbg, cmd_hmac_drbg, NULL, NULL); /* - * Sanity check to exercise random initialization. + * Validity check to exercise random initialization. */ static int cmd_hmac_drbg_rand(int argc, char **argv) { diff --git a/board/cr50/tpm2/aes.c b/board/cr50/tpm2/aes.c index 56e3cbbb3b..8aa80d1d6a 100644 --- a/board/cr50/tpm2/aes.c +++ b/board/cr50/tpm2/aes.c @@ -307,7 +307,7 @@ static void aes_command_handler(void *cmd_body, * We know that the receive buffer is at least this big, i.e. all the * preceding fields are guaranteed to fit. * - * Now is a good time to verify overall sanity of the received + * Now is a good time to verify overall validity of the received * payload: does the actual size match the added up sizes of the * pieces. */ diff --git a/board/cr50/tpm2/endorsement.c b/board/cr50/tpm2/endorsement.c index fe4434bbec..8d0ad2fdaa 100644 --- a/board/cr50/tpm2/endorsement.c +++ b/board/cr50/tpm2/endorsement.c @@ -563,7 +563,7 @@ enum manufacturing_status tpm_endorse(void) /* Unpack rsa cert struct. */ rsa_cert = (const struct ro_cert *) p; - /* Sanity check cert region contents. */ + /* Validity check cert region contents. */ if ((2 * sizeof(struct ro_cert)) + rsa_cert->cert_response.cert_len > RO_CERTS_REGION_SIZE) return mnf_bad_rsa_size; @@ -571,7 +571,7 @@ enum manufacturing_status tpm_endorse(void) /* Unpack ecc cert struct. */ ecc_cert = (const struct ro_cert *) (p + sizeof(struct ro_cert) + rsa_cert->cert_response.cert_len); - /* Sanity check cert region contents. */ + /* Validity check cert region contents. */ if ((2 * sizeof(struct ro_cert)) + rsa_cert->cert_response.cert_len + ecc_cert->cert_response.cert_len > RO_CERTS_REGION_SIZE) diff --git a/board/cr50/tpm2/virtual_nvmem.c b/board/cr50/tpm2/virtual_nvmem.c index 16a4028be9..196f4c0416 100644 --- a/board/cr50/tpm2/virtual_nvmem.c +++ b/board/cr50/tpm2/virtual_nvmem.c @@ -343,7 +343,7 @@ static const struct virtual_nv_index_cfg index_config[] = { GetRSUDevID) }; -/* Check sanity of above config. */ +/* Check validity check of above config. */ BUILD_ASSERT(VIRTUAL_NV_INDEX_END <= (VIRTUAL_NV_INDEX_MAX + 1)); BUILD_ASSERT((VIRTUAL_NV_INDEX_END - VIRTUAL_NV_INDEX_START) == ARRAY_SIZE(index_config)); diff --git a/chip/g/dcrypto/hmac_drbg.c b/chip/g/dcrypto/hmac_drbg.c index 2ca20e03ff..4c69a4a0a0 100644 --- a/chip/g/dcrypto/hmac_drbg.c +++ b/chip/g/dcrypto/hmac_drbg.c @@ -337,7 +337,7 @@ static int cmd_hmac_drbg(int argc, char **argv) DECLARE_SAFE_CONSOLE_COMMAND(hmac_drbg, cmd_hmac_drbg, NULL, NULL); /* - * Sanity check to exercise random initialization. + * Validity check to exercise random initialization. */ static int cmd_hmac_drbg_rand(int argc, char **argv) { diff --git a/chip/g/loader/launch.c b/chip/g/loader/launch.c index 077961fc67..7193f0f6b2 100644 --- a/chip/g/loader/launch.c +++ b/chip/g/loader/launch.c @@ -47,13 +47,13 @@ void tryLaunch(uint32_t adr, size_t max_size) memset(&hashes, 0, sizeof(hashes)); - /* Sanity check image header. */ + /* Validity check image header. */ if (hdr->magic != -1) return; if (hdr->image_size > max_size) return; - /* Sanity checks that image belongs at adr. */ + /* Validity checks that image belongs at adr. */ if (hdr->ro_base < adr) return; if (hdr->ro_max > adr + max_size) diff --git a/common/ap_ro_integrity_check.c b/common/ap_ro_integrity_check.c index 759b3bb022..13e136f297 100644 --- a/common/ap_ro_integrity_check.c +++ b/common/ap_ro_integrity_check.c @@ -53,7 +53,7 @@ * why they would need more than 32 ranges. */ #define APRO_MAX_NUM_RANGES 32 -/* Values used for sanity check of the flash_range structure fields. */ +/* Values used for validity check of the flash_range structure fields. */ #define MAX_SUPPORTED_FLASH_SIZE (32 * 1024 * 1024) #define MAX_SUPPORTED_RANGE_SIZE (4 * 1024 * 1024) @@ -102,7 +102,7 @@ struct gvd_descriptor { /* * Header added for storing of the AP RO check information in the H1 flash * page. The checksum is a 4 byte truncated sha256 of the saved payload, just - * a sanity check. + * a validity check. */ struct ap_ro_check_header { uint8_t version; diff --git a/common/cmsg.c b/common/cmsg.c index f14c13b262..af733e72ef 100644 --- a/common/cmsg.c +++ b/common/cmsg.c @@ -60,7 +60,7 @@ struct console_packet { * params: 1-8 of objects matching the format of the string indexed by * 'str_index' above. * - * CONSOLE_PACKET_END, as a sanity-check that we haven't dropped + * CONSOLE_PACKET_END, as a validity check that we haven't dropped * anything. A checksum or CRC would be kinda expensive for debug * data. Note that it is not present if data_len == 0. */ diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index cf3d0dcf33..aa8a518809 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -649,7 +649,7 @@ static void keyscan_copy_config(const struct ec_mkbp_config *src, uint8_t new_flags; if (valid_mask & EC_MKBP_VALID_FIFO_MAX_DEPTH) { - /* Sanity check for fifo depth */ + /* validity check for fifo depth */ dst->fifo_max_depth = MIN(src->fifo_max_depth, FIFO_DEPTH); } diff --git a/common/nvmem.c b/common/nvmem.c index 92e097077a..af0ba3ad4c 100644 --- a/common/nvmem.c +++ b/common/nvmem.c @@ -270,7 +270,7 @@ static int nvmem_get_partition_off(int user, uint32_t offset, uint32_t len, { uint32_t start_offset; - /* Sanity check for user */ + /* Validity check for user */ if (user >= NVMEM_NUM_USERS) return EC_ERROR_OVERFLOW; diff --git a/common/pinweaver.c b/common/pinweaver.c index 1443bebd7b..2c8c381d3b 100644 --- a/common/pinweaver.c +++ b/common/pinweaver.c @@ -18,7 +18,7 @@ #include <tpm_registers.h> #include <util.h> -/* Compile time sanity checks. */ +/* Compile time validity checks. */ /* Make sure the hash size is consistent with dcrypto. */ BUILD_ASSERT(PW_HASH_SIZE >= SHA256_DIGEST_SIZE); diff --git a/common/printf.c b/common/printf.c index baac4addf7..914d03b969 100644 --- a/common/printf.c +++ b/common/printf.c @@ -182,7 +182,7 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context, } } if (pad_width < 0 || pad_width > MAX_FORMAT) { - /* Sanity check for precision failed */ + /* Validity check for precision failed */ format = error_str; continue; } @@ -202,7 +202,7 @@ int vfnprintf(int (*addchar)(void *context, int c), void *context, } } if (precision < 0 || precision > MAX_FORMAT) { - /* Sanity check for precision failed */ + /* Validity check for precision failed */ format = error_str; continue; } diff --git a/common/rwsig.c b/common/rwsig.c index 5e57f4cab5..f6ad6d5ed2 100644 --- a/common/rwsig.c +++ b/common/rwsig.c @@ -161,7 +161,7 @@ int rwsig_check_signature(void) vb21_sig->sig_size != RSANUMBYTES || vb21_key->sig_alg != vb21_sig->sig_alg || vb21_key->hash_alg != vb21_sig->hash_alg || - /* Sanity check signature offset and data size. */ + /* Validity check signature offset and data size. */ vb21_sig->sig_offset < sizeof(vb21_sig) || (vb21_sig->sig_offset + RSANUMBYTES) > CONFIG_RW_SIG_SIZE || vb21_sig->data_size > (CONFIG_RW_SIZE - CONFIG_RW_SIG_SIZE)) { diff --git a/common/thermal.c b/common/thermal.c index f5988f7046..1ab47d743c 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -42,7 +42,7 @@ int thermal_fan_percent(int low, int high, int cur) } /* The logic below is hard-coded for only three thresholds: WARN, HIGH, HALT. - * This is just a sanity check to be sure we catch any changes in thermal.h + * This is just a validity check to be sure we catch any changes in thermal.h */ BUILD_ASSERT(EC_TEMP_THRESH_COUNT == 3); diff --git a/common/vboot/vb21_lib.c b/common/vboot/vb21_lib.c index c85ecbbd75..5aac6e1f04 100644 --- a/common/vboot/vb21_lib.c +++ b/common/vboot/vb21_lib.c @@ -33,7 +33,7 @@ int vb21_is_signature_valid(const struct vb21_signature *sig, return EC_ERROR_VBOOT_SIG_ALGORITHM; if (key->hash_alg != sig->hash_alg) return EC_ERROR_VBOOT_HASH_ALGORITHM; - /* Sanity check signature offset and data size. */ + /* Validity check signature offset and data size. */ if (sig->sig_offset < sizeof(*sig)) return EC_ERROR_VBOOT_SIG_OFFSET; if (sig->sig_offset + RSANUMBYTES > CONFIG_RW_SIG_SIZE) diff --git a/common/vboot_hash.c b/common/vboot_hash.c index 7b0012ff8e..f44565f9f0 100644 --- a/common/vboot_hash.c +++ b/common/vboot_hash.c @@ -395,7 +395,7 @@ static void fill_response(struct ec_response_vboot_hash *r, } /** - * Start computing a hash, with sanity checking on params. + * Start computing a hash, with validity checking on params. * * @return EC_RES_SUCCESS if success, or other result code on error. */ @@ -405,7 +405,7 @@ static int host_start_hash(const struct ec_params_vboot_hash *p) int size = p->size; int rv; - /* Sanity-check input params */ + /* Validity check input params */ if (p->hash_type != EC_VBOOT_HASH_TYPE_SHA256) return EC_RES_INVALID_PARAM; if (p->nonce_size > sizeof(p->nonce_data)) diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c index 2ec3960570..108ac989c2 100644 --- a/core/cortex-m/task.c +++ b/core/cortex-m/task.c @@ -125,7 +125,7 @@ static const struct { /* Contexts for all tasks */ static task_ tasks[TASK_ID_COUNT]; -/* Sanity checks about static task invariants */ +/* Validity checks about static task invariants */ BUILD_ASSERT(TASK_ID_COUNT <= sizeof(unsigned) * 8); BUILD_ASSERT(TASK_ID_COUNT < (1 << (sizeof(task_id_t) * 8))); diff --git a/docs/packetized-console.md b/docs/packetized-console.md index 8cbba5b725..b14404bf3e 100644 --- a/docs/packetized-console.md +++ b/docs/packetized-console.md @@ -136,7 +136,7 @@ struct console_packet { * params: 1-8 of objects matching the format of the string indexed by * 'str_index' above. * - * CONSOLE_PACKET_END, as a sanity-check that we haven't dropped + * CONSOLE_PACKET_END, as a validity check that we haven't dropped * anything. A checksum or CRC would be kinda expensive for debug * data. Note that it is not present if data_len == 0. */ @@ -177,4 +177,4 @@ are sent to the console. Data received out of packets is sent to the console directly and is displayed using a different color. This, among other things, allows to display text generated by early boot stages and in general support builds which do not yet -deploy packet mode.
\ No newline at end of file +deploy packet mode. diff --git a/include/config.h b/include/config.h index 9fd63f81d2..35ecb4dfae 100644 --- a/include/config.h +++ b/include/config.h @@ -4491,7 +4491,7 @@ #include "test_config.h" /* - * Sanity checks to make sure some of the configs above make sense. + * Validity checks to make sure some of the configs above make sense. */ #if (CONFIG_AUX_TIMER_PERIOD_MS) < ((HOOK_TICK_INTERVAL_MS) * 2) diff --git a/include/host_command.h b/include/host_command.h index 4744690875..761e72ef6b 100644 --- a/include/host_command.h +++ b/include/host_command.h @@ -230,7 +230,7 @@ void host_command_received(struct host_cmd_handler_args *args); /** * Return the expected host packet size given its header. * - * Also does some sanity checking on the host request. + * Also does some validity checking on the host request. * * @param r Host request header * @return The expected packet size, or 0 if error. diff --git a/test/timer_jump.py b/test/timer_jump.py index e367969cc8..d183fbf918 100644 --- a/test/timer_jump.py +++ b/test/timer_jump.py @@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # -# Timer test: check time sanity when jumping between images +# Timer test: check time validity when jumping between images # import time diff --git a/util/signer/bs b/util/signer/bs index 5fc5ff8d6d..9e937e24a7 100755 --- a/util/signer/bs +++ b/util/signer/bs @@ -93,7 +93,7 @@ tweak_manifest () { local rlz bid_params=( $(echo $CR50_BOARD_ID | sed 's/:/ /g') ) - # A very basic sanity check: it needs to consist of three colon separated + # A very basic validity check: it needs to consist of three colon separated # fields. if [[ ${#bid_params[@]} != 3 ]]; then echo "Wrong board ID string \"$CR50_BOARD_ID\"}" >&2 |