• Home
  • Raw
  • Download

Lines Matching refs:rv

39 	int rv;  in vb2_read_resource_object()  local
44 rv = vb2ex_read_resource(ctx, index, offset, &c, sizeof(c)); in vb2_read_resource_object()
45 if (rv) in vb2_read_resource_object()
46 return rv; in vb2_read_resource_object()
54 rv = vb2ex_read_resource(ctx, index, offset, buf, c.total_size); in vb2_read_resource_object()
55 if (rv) { in vb2_read_resource_object()
57 return rv; in vb2_read_resource_object()
76 int rv; in vb2_load_fw_keyblock() local
86 rv = vb2ex_read_resource(ctx, VB2_RES_GBB, sd->gbb_rootkey_offset, in vb2_load_fw_keyblock()
88 if (rv) in vb2_load_fw_keyblock()
89 return rv; in vb2_load_fw_keyblock()
92 rv = vb2_unpack_key(&root_key, key_data, key_size); in vb2_load_fw_keyblock()
93 if (rv) in vb2_load_fw_keyblock()
94 return rv; in vb2_load_fw_keyblock()
100 rv = vb2_read_resource_object(ctx, VB2_RES_FW_VBLOCK, 0, &wb, in vb2_load_fw_keyblock()
102 if (rv) in vb2_load_fw_keyblock()
103 return rv; in vb2_load_fw_keyblock()
106 rv = vb2_verify_keyblock(kb, kb->c.total_size, &root_key, &wb); in vb2_load_fw_keyblock()
107 if (rv) { in vb2_load_fw_keyblock()
108 vb2_fail(ctx, VB2_RECOVERY_FW_KEYBLOCK, rv); in vb2_load_fw_keyblock()
109 return rv; in vb2_load_fw_keyblock()
119 rv = VB2_ERROR_FW_KEYBLOCK_VERSION_RANGE; in vb2_load_fw_keyblock()
120 if (!rv && packed_key->key_version < (sd->fw_version_secdata >> 16)) in vb2_load_fw_keyblock()
121 rv = VB2_ERROR_FW_KEYBLOCK_VERSION_ROLLBACK; in vb2_load_fw_keyblock()
122 if (rv) { in vb2_load_fw_keyblock()
123 vb2_fail(ctx, VB2_RECOVERY_FW_KEY_ROLLBACK, rv); in vb2_load_fw_keyblock()
124 return rv; in vb2_load_fw_keyblock()
165 int rv; in vb2_load_fw_preamble() local
173 rv = vb2_unpack_key(&data_key, key_data, key_size); in vb2_load_fw_preamble()
174 if (rv) in vb2_load_fw_preamble()
175 return rv; in vb2_load_fw_preamble()
178 rv = vb2_read_resource_object(ctx, VB2_RES_FW_VBLOCK, in vb2_load_fw_preamble()
181 if (rv) in vb2_load_fw_preamble()
182 return rv; in vb2_load_fw_preamble()
187 rv = vb2_verify_fw_preamble(pre, pre->c.total_size, &data_key, &wb); in vb2_load_fw_preamble()
188 if (rv) { in vb2_load_fw_preamble()
189 vb2_fail(ctx, VB2_RECOVERY_FW_PREAMBLE, rv); in vb2_load_fw_preamble()
190 return rv; in vb2_load_fw_preamble()
205 rv = VB2_ERROR_FW_PREAMBLE_VERSION_RANGE; in vb2_load_fw_preamble()
208 if (!rv && sd->fw_version < sd->fw_version_secdata) in vb2_load_fw_preamble()
209 rv = VB2_ERROR_FW_PREAMBLE_VERSION_ROLLBACK; in vb2_load_fw_preamble()
210 if (rv) { in vb2_load_fw_preamble()
211 vb2_fail(ctx, VB2_RECOVERY_FW_ROLLBACK, rv); in vb2_load_fw_preamble()
212 return rv; in vb2_load_fw_preamble()
225 rv = vb2_secdata_set(ctx, VB2_SECDATA_VERSIONS, sd->fw_version); in vb2_load_fw_preamble()
226 if (rv) in vb2_load_fw_preamble()
227 return rv; in vb2_load_fw_preamble()