/system/keymaster/ |
H A D | android_keymaster_messages.cpp | 37 const uint8_t* end) { 38 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size); 42 const uint8_t* end) { 46 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size, 60 uint8_t* KeymasterResponse::Serialize(uint8_t* buf, const uint8_t* end) const { 61 buf = append_uint32_to_buf(buf, end, static_cast<uint32_t>(error)); 63 buf = NonErrorSerialize(buf, end); 67 bool KeymasterResponse::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { argument 68 if (!copy_uint32_from_buf(buf_ptr, end, &error)) 72 return NonErrorDeserialize(buf_ptr, end); 36 serialize_key_blob(const keymaster_key_blob_t& key_blob, uint8_t* buf, const uint8_t* end) argument 41 deserialize_key_blob(keymaster_key_blob_t* key_blob, const uint8_t** buf_ptr, const uint8_t* end) argument 89 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 111 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 125 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 145 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 165 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 187 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 217 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 241 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 263 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 278 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 299 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 325 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 345 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 365 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 387 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument 406 NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) argument [all...] |
H A D | auth_encrypted_key_blob.cpp | 43 const uint8_t* end = key_blob->key_material + key_blob->key_material_size; local 46 buf = nonce.Serialize(buf, end); 47 buf = encrypted_key_material.Serialize(buf, end); 48 buf = tag.Serialize(buf, end); 49 buf = hw_enforced.Serialize(buf, end); 50 buf = sw_enforced.Serialize(buf, end); 64 const uint8_t* end = tmp + key_blob.key_material_size; local 69 if (!copy_from_buf(buf_ptr, end, nonce->peek_write(), OCB_NONCE_LENGTH) || 70 !encrypted_key_material->Deserialize(buf_ptr, end) || 71 !copy_from_buf(buf_ptr, end, ta 92 const uint8_t* end = tmp + key_blob.key_material_size; local [all...] |
H A D | serializable.cpp | 27 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len) { argument 31 if (buf + data_len <= end) { 38 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { argument 42 if (end < *buf_ptr + size) 49 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, argument 51 if (!copy_uint32_from_buf(buf_ptr, end, size)) 57 if (*buf_ptr + *size > end) 67 return copy_from_buf(buf_ptr, end, dest->get(), *size); 142 uint8_t* Buffer::Serialize(uint8_t* buf, const uint8_t* end) const { 143 return append_size_and_data_to_buf(buf, end, peek_rea 146 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument [all...] |
H A D | key_blob_test.cpp | 104 EXPECT_EQ(serialized_blob_.end(), std::search(serialized_blob_.begin(), serialized_blob_.end(), 105 key_material_.begin(), key_material_.end())); 106 EXPECT_NE(serialized_blob_.end(), std::search(serialized_blob_.begin(), serialized_blob_.end(), 107 ciphertext_.begin(), ciphertext_.end())); 143 std::search(serialized_blob_.begin(), serialized_blob_.end(), nonce_.begin(), nonce_.end()); 144 ASSERT_NE(nonce_ptr, serialized_blob_.end()); 145 EXPECT_EQ(serialized_blob_.end(), [all...] |
H A D | integrity_assured_key_blob.cpp | 96 p = key_material.Serialize(p, key_blob->end()); 97 p = hw_enforced.Serialize(p, key_blob->end()); 98 p = sw_enforced.Serialize(p, key_blob->end()); 109 const uint8_t* end = key_blob.end(); local 111 if (p > end || p + HMAC_SIZE > end) 120 if (CRYPTO_memcmp(key_blob.end() - HMAC_SIZE, computed_hmac, HMAC_SIZE) != 0) 127 if (!key_material->Deserialize(&p, end) || // 128 !hw_enforced->Deserialize(&p, end) || // [all...] |
H A D | authorization_set.cpp | 264 static uint8_t* serialize(const keymaster_key_param_t& param, uint8_t* buf, const uint8_t* end, argument 266 buf = append_uint32_to_buf(buf, end, param.tag); 272 buf = append_uint32_to_buf(buf, end, param.enumerated); 276 buf = append_uint32_to_buf(buf, end, param.integer); 280 buf = append_uint64_to_buf(buf, end, param.long_integer); 283 buf = append_uint64_to_buf(buf, end, param.date_time); 286 if (buf < end) 292 buf = append_uint32_to_buf(buf, end, param.blob.data_length); 293 buf = append_uint32_to_buf(buf, end, param.blob.data - indirect_base); 299 static bool deserialize(keymaster_key_param_t* param, const uint8_t** buf_ptr, const uint8_t* end, argument 371 DeserializeIndirectData(const uint8_t** buf_ptr, const uint8_t* end) argument 382 DeserializeElementsData(const uint8_t** buf_ptr, const uint8_t* end) argument 418 Deserialize(const uint8_t** buf_ptr, const uint8_t* end) argument [all...] |
/system/netd/server/ |
H A D | UidRanges.cpp | 24 auto iter = std::lower_bound(mRanges.begin(), mRanges.end(), Range(uid, uid)); 25 return (iter != mRanges.end() && iter->first == uid) || 48 // Unexpected end of string. 70 std::sort(mRanges.begin(), mRanges.end()); 75 auto middle = mRanges.insert(mRanges.end(), other.mRanges.begin(), other.mRanges.end()); 76 std::inplace_merge(mRanges.begin(), middle, mRanges.end()); 80 auto end = std::set_difference(mRanges.begin(), mRanges.end(), other.mRanges.begin(), local 81 other.mRanges.end(), mRange [all...] |
/system/core/run-as/ |
H A D | package.c | 280 /* Skip any space or tab character from 'p' until 'end' is reached. 284 skip_spaces(const char* p, const char* end) argument 286 while (p < end && is_space(*p)) 292 /* Skip any non-space and non-tab character from 'p' until 'end'. 296 skip_non_spaces(const char* p, const char* end) argument 298 while (p < end && !is_space(*p)) 304 /* Find the first occurence of 'ch' between 'p' and 'end' 305 * Return its position, or 'end' if none is found. 308 find_first(const char* p, const char* end, char ch) argument 310 while (p < end 323 compare_name(const char* p, const char* end, const char* name) argument 360 parse_spaces(const char** pp, const char* end) argument 384 parse_positive_decimal(const char** pp, const char* end) argument 461 const char* end = find_first(p, buffer_end, '\\n'); local [all...] |
/system/keymaster/include/keymaster/ |
H A D | serializable.h | 43 * written. Will not write past \p end, which should point to \p buf + size of the buffer 44 * (i.e. one past the end of the buffer). 46 virtual uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const = 0; 52 virtual bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0; 71 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len); 80 inline uint8_t* append_uint32_to_buf(uint8_t* buf, const uint8_t* end, T value) { argument 82 return append_to_buf(buf, end, &val, sizeof(val)); 88 inline uint8_t* append_uint64_to_buf(uint8_t* buf, const uint8_t* end, uint64_t value) { argument 89 return append_to_buf(buf, end, &value, sizeof(value)); 98 inline uint8_t* append_size_and_data_to_buf(uint8_t* buf, const uint8_t* end, cons argument 111 append_uint32_array_to_buf(uint8_t* buf, const uint8_t* end, const T* data, size_t count) argument 147 copy_uint32_from_buf(const uint8_t** buf_ptr, const uint8_t* end, T* value) argument 159 copy_uint64_from_buf(const uint8_t** buf_ptr, const uint8_t* end, uint64_t* value) argument 170 copy_uint32_array_from_buf(const uint8_t** buf_ptr, const uint8_t* end, UniquePtr<T[]>* data, size_t* count) argument 209 const uint8_t* end() const { return peek_read() + available_read(); } function in class:keymaster::Buffer [all...] |
H A D | android_keymaster_messages.h | 105 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override; 106 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override; 109 virtual uint8_t* NonErrorSerialize(uint8_t* buf, const uint8_t* end) const = 0; 110 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0; 120 uint8_t* Serialize(uint8_t* buf, const uint8_t* /* end */) const override { return buf; } 121 bool Deserialize(const uint8_t** /* buf_ptr */, const uint8_t* /* end */) override { 131 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override { 132 return append_uint32_to_buf(buf, end, algorithm); 134 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { 135 return copy_uint32_from_buf(buf_ptr, end, [all...] |
/system/extras/perfprofd/ |
H A D | perf_data_converter.cc | 11 RangeTarget(uint64 start, uint64 end, uint64 to) argument 12 : start(start), end(end), to(to) {} 17 } else if (end != r.end) { 18 return end < r.end; 24 uint64 end; member in struct:wireless_android_logging_awp::RangeTarget 66 uint64 end = event.branch_stack[i - 1].from.offset(); local 69 if (end < star 70 LOG(WARNING) << "Bogus LBR data: " << start << "->" << end; local [all...] |
/system/core/include/backtrace/ |
H A D | BacktraceMap.h | 37 uintptr_t end = 0; member in struct:backtrace_map_t 73 iterator end() { return maps_.end(); } function in class:BacktraceMap 77 const_iterator end() const { return maps_.end(); } function in class:BacktraceMap 82 return map.end > 0;
|
/system/core/libbacktrace/ |
H A D | BacktraceMap.cpp | 39 it != end(); ++it) { 40 if (addr >= it->start && addr < it->end) { 50 unsigned long int end; local 60 &start, &end, permissions, &name_pos) != 3) { 67 &start, &end, permissions, &name_pos) != 3) { 73 map->end = end; 93 ALOGV("Parsed map: start=%p, end=%p, flags=%x, name=%s", 94 reinterpret_cast<void*>(map->start), reinterpret_cast<void*>(map->end),
|
H A D | map_info.c | 37 unsigned long int end; local 41 &start, &end, permissions, &name_pos) != 3) { 51 mi->end = end; 57 ALOGV("Parsed map: start=0x%08x, end=0x%08x, " 59 mi->start, mi->end, 98 unsigned long int end; local 101 if (sscanf(line, "%lx-%lx %4s %*x %*x:%*x %*d%n", &start, &end, 118 mi->end = end; [all...] |
/system/core/libsparse/ |
H A D | simg_dump.py | 106 end=" ") 114 print("Raw data", end="") 119 % (data_sz), end="") 130 print("Don't care", end="") 134 % (data_sz), end="") 141 print("Unknown chunk type 0x%04X" % (chunk_type), end="") 163 print("There were %u bytes of extra data at the end of the file."
|
/system/gatekeeper/include/gatekeeper/ |
H A D | gatekeeper_messages.h | 93 uint32_t Serialize(uint8_t *payload, const uint8_t *end) const; 98 gatekeeper_error_t Deserialize(const uint8_t *payload, const uint8_t *end); 126 * Deserializes subclass specific data from payload without reading past end. 148 virtual gatekeeper_error_t nonErrorDeserialize(const uint8_t *payload, const uint8_t *end); 164 virtual gatekeeper_error_t nonErrorDeserialize(const uint8_t *payload, const uint8_t *end); 178 virtual gatekeeper_error_t nonErrorDeserialize(const uint8_t *payload, const uint8_t *end); 205 virtual gatekeeper_error_t nonErrorDeserialize(const uint8_t *payload, const uint8_t *end);
|
/system/gatekeeper/ |
H A D | gatekeeper_messages.cpp | 48 static inline gatekeeper_error_t read_from_buffer(const uint8_t **buffer, const uint8_t *end, argument 50 if (*buffer + sizeof(target->length) > end) return ERROR_INVALID; 56 if (buffer_end > end || buffer_end <= *buffer) return ERROR_INVALID; 79 uint32_t GateKeeperMessage::Serialize(uint8_t *buffer, const uint8_t *end) const { 81 if (buffer + GetSerializedSize() > end) { 87 if (buffer + sizeof(serial_header_t) > end) return 0; 96 if (buffer + sizeof(serial_header_t) + nonErrorSerializedSize() > end) 107 gatekeeper_error_t GateKeeperMessage::Deserialize(const uint8_t *payload, const uint8_t *end) { argument 108 if (payload + sizeof(uint32_t) > end) return ERROR_INVALID; 111 if (payload == end) retur 172 nonErrorDeserialize(const uint8_t *payload, const uint8_t *end) argument 225 nonErrorDeserialize(const uint8_t *payload, const uint8_t *end) argument 296 nonErrorDeserialize(const uint8_t *payload, const uint8_t *end) argument 355 nonErrorDeserialize(const uint8_t *payload, const uint8_t *end) argument [all...] |
/system/core/libutils/ |
H A D | Tokenizer.cpp | 117 const char* end = getEnd(); local 119 while (eol != end) { 133 const char* end = getEnd(); local 135 while (mCurrent != end) { 149 const char* end = getEnd(); local 150 while (mCurrent != end) { 163 const char* end = getEnd(); local 164 while (mCurrent != end) {
|
H A D | PropertyMap.cpp | 84 char* end; local 85 int value = strtol(stringValue.string(), & end, 10); 86 if (*end != '\0') { 101 char* end; local 102 float value = strtof(stringValue.string(), & end); 103 if (*end != '\0') { 198 ALOGE("%s: Expected end of line, got '%s'.",
|
/system/extras/simpleperf/ |
H A D | command.cpp | 44 std::sort(Commands().begin(), Commands().end(), CompareCommandByName); 53 for (auto it = Commands().begin(); it != Commands().end(); ++it) {
|
H A D | record.cpp | 43 if (it != record_type_names.end()) { 91 void SampleId::ReadFromBinaryFormat(const perf_event_attr& attr, const char* p, const char* end) { argument 112 CHECK_LE(p, end); 113 if (p < end) { 114 LOG(DEBUG) << "Record SampleId part has " << end - p << " bytes left\n"; 176 const char* end = reinterpret_cast<const char*>(pheader) + pheader->size; local 180 CHECK_LE(p, end); 181 sample_id.ReadFromBinaryFormat(attr, p, end); 204 const char* end = reinterpret_cast<const char*>(pheader) + pheader->size; local 208 CHECK_LE(p, end); 230 const char* end = reinterpret_cast<const char*>(pheader) + pheader->size; local 244 const char* end = reinterpret_cast<const char*>(pheader) + pheader->size; local 308 const char* end = reinterpret_cast<const char*>(pheader) + pheader->size; local [all...] |
/system/security/keystore/ |
H A D | operation.cpp | 38 if (mAppTokenMap.find(appToken) == mAppTokenMap.end()) { 53 if (entry == mMap.end()) { 69 auto lruEntry = std::find(mLru.begin(), mLru.end(), token); 70 if (lruEntry != mLru.end()) { 78 if (entry == mMap.end()) { 83 auto lruEntry = std::find(mLru.begin(), mLru.end(), token); 84 if (lruEntry != mLru.end()) { 93 if (appEntry == mAppTokenMap.end()) { 97 auto tokenEntry = std::find(appEntry->second.begin(), appEntry->second.end(), token); 123 if (entry == mMap.end()) { [all...] |
/system/core/logd/ |
H A D | LogWhiteBlackList.cpp | 59 for (it = mNice.begin(); it != mNice.end();) { 63 for (it = mNaughty.begin(); it != mNaughty.end();) { 72 for (it = mNice.begin(); it != mNice.end();) { 76 for (it = mNaughty.begin(); it != mNaughty.end();) { 144 while (it != list->end()) { 165 if (it == list->end()) { 194 for (it = mNice.begin(); it != mNice.end(); ++it) { 206 for (it = mNaughty.begin(); it != mNaughty.end(); ++it) { 225 for (it = mNaughty.begin(); it != mNaughty.end(); ++it) { 235 for (it = mNice.begin(); it != mNice.end(); [all...] |
/system/core/debuggerd/test/ |
H A D | dump_maps_test.cpp | 99 map.end = 0x123456789abdf000UL; 102 map.end = 0x1235000; 129 map.end = 0x123456789abdf000UL; 132 map.end = 0x1235000; 164 map.end = 0x123456789abdf000UL; 167 map.end = 0x1235000; 201 map.end = 0xa235000; 205 map.end = 0xa335000; 211 map.end = 0xa435000; 218 map.end [all...] |
/system/media/camera/tests/ |
H A D | camera_metadata_tests_fake_vendor.h | 163 unsigned int start, end; local 169 end = fakevendor_section_bounds[section][1]; 170 count += end - start; 177 unsigned int start, end, tag; local 182 end = fakevendor_section_bounds[section][1]; 183 for (tag = start; tag < end; tag++) {
|