Home
last modified time | relevance | path

Searched refs:end (Results 1 – 25 of 975) sorted by relevance

12345678910>>...39

/system/keymaster/android_keymaster/
Dandroid_keymaster_messages.cpp39 const uint8_t* end) { in serialize_key_blob() argument
40 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size); in serialize_key_blob()
44 const uint8_t* end) { in deserialize_key_blob() argument
48 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size, in deserialize_key_blob()
67 uint8_t* serialize_blob(const keymaster_blob_t& blob, uint8_t* buf, const uint8_t* end) { in serialize_blob() argument
68 return append_size_and_data_to_buf(buf, end, blob.data, blob.data_length); in serialize_blob()
71 bool deserialize_blob(keymaster_blob_t* blob, const uint8_t** buf_ptr, const uint8_t* end) { in deserialize_blob() argument
75 if (!copy_size_and_data_from_buf(buf_ptr, end, &blob->data_length, &deserialized_blob)) in deserialize_blob()
96 const uint8_t* end) { in serialize_chain() argument
97 buf = append_uint32_to_buf(buf, end, certificate_chain.entry_count); in serialize_chain()
[all …]
Dserializable.cpp25 bool __buffer_bound_check(const uint8_t* buf, const uint8_t* end, size_t len) { in __buffer_bound_check() argument
28 return (!overflow_occurred) && (buf_next <= __pval(end)); in __buffer_bound_check()
31 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len) { in append_to_buf() argument
32 if (__buffer_bound_check(buf, end, data_len)) { in append_to_buf()
40 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { in copy_from_buf() argument
41 if (__buffer_bound_check(*buf_ptr, end, size)) { in copy_from_buf()
50 bool copy_size_and_data_from_buf(const uint8_t** buf_ptr, const uint8_t* end, size_t* size, in copy_size_and_data_from_buf() argument
52 if (!copy_uint32_from_buf(buf_ptr, end, size)) return false; in copy_size_and_data_from_buf()
59 if (__buffer_bound_check(*buf_ptr, end, *size)) { in copy_size_and_data_from_buf()
64 return copy_from_buf(buf_ptr, end, dest->get(), *size); in copy_size_and_data_from_buf()
[all …]
/system/keymaster/include/keymaster/
Dandroid_keymaster_messages.h181 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override;
182 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override;
185 virtual uint8_t* NonErrorSerialize(uint8_t* buf, const uint8_t* end) const = 0;
186 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
225 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override { in Serialize()
226 return append_uint32_to_buf(buf, end, algorithm); in Serialize()
228 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
229 return copy_uint32_from_buf(buf_ptr, end, &algorithm); in Deserialize()
250 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override { in Serialize()
251 buf = append_uint32_to_buf(buf, end, algorithm); in Serialize()
[all …]
Dserializable.h48 virtual uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const = 0;
54 virtual bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
81 bool __buffer_bound_check(const uint8_t* buf, const uint8_t* end, size_t len);
90 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len);
99 inline uint8_t* append_uint32_to_buf(uint8_t* buf, const uint8_t* end, T value) { in append_uint32_to_buf() argument
101 return append_to_buf(buf, end, &val, sizeof(val)); in append_uint32_to_buf()
107 inline uint8_t* append_uint64_to_buf(uint8_t* buf, const uint8_t* end, uint64_t value) { in append_uint64_to_buf() argument
108 return append_to_buf(buf, end, &value, sizeof(value)); in append_uint64_to_buf()
117 inline uint8_t* append_size_and_data_to_buf(uint8_t* buf, const uint8_t* end, const void* data, in append_size_and_data_to_buf() argument
119 buf = append_uint32_to_buf(buf, end, data_len); in append_size_and_data_to_buf()
[all …]
/system/memory/libmemunreachable/
DHeapWalker.cpp45 bool HeapWalker::Allocation(uintptr_t begin, uintptr_t end) { in Allocation() argument
46 if (end == begin) { in Allocation()
47 end = begin + 1; in Allocation()
50 end = UntagAddress(end); in Allocation()
51 Range range{begin, end}; in Allocation()
52 if (valid_mappings_range_.end != 0 && in Allocation()
53 (begin < valid_mappings_range_.begin || end > valid_mappings_range_.end)) { in Allocation()
55 reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end), in Allocation()
57 reinterpret_cast<void*>(valid_mappings_range_.end)); in Allocation()
62 valid_allocations_range_.end = std::max(valid_allocations_range_.end, end); in Allocation()
[all …]
DHeapWalker.h33 uintptr_t end; member
35 size_t size() const { return end - begin; }; in size()
37 return this->begin == other.begin && this->end == other.end;
44 bool operator()(const Range& a, const Range& b) const { return a.end <= b.begin; } in operator()
61 valid_allocations_range_.end = 0;
62 valid_allocations_range_.begin = ~valid_allocations_range_.end;
63 valid_mappings_range_.end = 0;
64 valid_mappings_range_.begin = ~valid_allocations_range_.end;
77 bool Allocation(uintptr_t begin, uintptr_t end);
78 void Mapping(uintptr_t begin, uintptr_t end);
[all …]
/system/libvintf/
DFQName.cpp75 static const char* eatIdent(const char* l, const char* end) { in eatIdent() argument
76 if (!(l < end && isIdentStart(*l++))) return nullptr; in eatIdent()
77 while (l < end && isIdentBody(*l)) l++; in eatIdent()
82 static const char* eatPackage(const char* l, const char* end) { in eatPackage() argument
83 if ((l = eatIdent(l, end)) == nullptr) return nullptr; in eatPackage()
85 while (l < end && *l == '.') { in eatPackage()
87 if ((l = eatIdent(l, end)) == nullptr) return nullptr; in eatPackage()
93 static const char* eatNumber(const char* l, const char* end) { in eatNumber() argument
94 if (!(l < end)) return nullptr; in eatNumber()
97 while (l < end && isDigit(*l)) l++; in eatNumber()
[all …]
/system/sepolicy/tools/sepolicy-analyze/
Dneverallow.c20 static int read_typeset(policydb_t *policydb, char **ptr, char *end, in read_typeset() argument
35 while (p < end && isspace(*p)) in read_typeset()
38 if (p == end) in read_typeset()
46 while (p < end && isspace(*p)) in read_typeset()
48 if (p == end) in read_typeset()
87 while (p < end && *p != '\n') in read_typeset()
93 … while (p < end && !isspace(*p) && *p != ':' && *p != ';' && *p != '{' && *p != '}' && *p != '#') in read_typeset()
138 } while (p < end && openparens); in read_typeset()
140 if (p == end) in read_typeset()
182 static int read_classperms(policydb_t *policydb, char **ptr, char *end, in read_classperms() argument
[all …]
/system/gatekeeper/
Dgatekeeper_messages.cpp33 static inline bool fitsBuffer(const uint8_t* begin, const uint8_t* end, uint32_t field_size) { in fitsBuffer() argument
36 && dummy <= reinterpret_cast<uintptr_t>(end); in fitsBuffer()
69 static inline gatekeeper_error_t read_from_buffer(const uint8_t **buffer, const uint8_t *end, in read_from_buffer() argument
72 if (!fitsBuffer(*buffer, end, sizeof(uint32_t))) return ERROR_INVALID; in read_from_buffer()
84 if (!fitsBuffer(*buffer, end, length)) return ERROR_INVALID; in read_from_buffer()
110 uint32_t GateKeeperMessage::Serialize(uint8_t *buffer, const uint8_t *end) const { in Serialize()
112 if (!fitsBuffer(buffer, end, GetSerializedSize())) { in Serialize()
117 if (!fitsBuffer(buffer, end, sizeof(serial_header_t))) return 0; in Serialize()
123 if (!fitsBuffer(buffer, end, sizeof(retry_timeout))) return 0; in Serialize()
128 if (!fitsBuffer(buffer, end, serialized_size)) return 0; in Serialize()
[all …]
/system/timezone/input_tools/android/tzlookup_generator/src/main/java/com/android/libcore/timezone/tzlookup/zonetree/
DZoneOffsetPeriod.java34 private final Instant end; field in ZoneOffsetPeriod
42 private ZoneOffsetPeriod(Instant start, Instant end, int rawOffsetMillis, int dstOffsetMillis, in ZoneOffsetPeriod() argument
45 this.end = end; in ZoneOffsetPeriod()
60 Instant end; in create() local
64 end = maxTime; in create()
70 end = Instant.ofEpochMilli(endTimeMillis); in create()
74 end = maxTime; in create()
81 return new ZoneOffsetPeriod(minTime, end, offsets[0], offsets[1], longName); in create()
90 || !partitionInstant.isBefore(toSplit.end)) { in splitAtTime()
92 + toSplit.start + " and " + toSplit.end); in splitAtTime()
[all …]
/system/extras/simpleperf/
Dread_symbol_map.cpp39 size_t end = content_ref.find_first_of(" \t", begin + 1); in ConsumeWord() local
40 if (end == content_ref.npos) { in ConsumeWord()
41 end = content_ref.size(); in ConsumeWord()
44 auto res = content_ref.substr(begin, end - begin); in ConsumeWord()
45 content_ref.remove_prefix(end); in ConsumeWord()
95 size_t end = content.find_first_of("\n\r", begin); in ReadSymbolMapFromString() local
97 if (end == content.npos) { in ReadSymbolMapFromString()
99 std::sort(symbols.begin(), symbols.end(), Symbol::CompareValueByAddr); in ReadSymbolMapFromString()
103 ReadSymbol({content.c_str() + begin, end - begin}, &symbols); in ReadSymbolMapFromString()
104 begin = end + 1; in ReadSymbolMapFromString()
Drecord.cpp35 #define CHECK_SIZE(p, end, size) \ argument
37 if (UNLIKELY((end) - (p) < (size))) { \
42 #define CHECK_SIZE_U64(p, end, u64_count) \ argument
44 if (UNLIKELY(((end) - (p)) / sizeof(uint64_t) < (u64_count))) { \
78 if (it != record_type_names.end()) { in RecordTypeToString()
102 bool SampleId::ReadFromBinaryFormat(const perf_event_attr& attr, const char* p, const char* end) { in ReadFromBinaryFormat() argument
109 CHECK_SIZE_U64(p, end, __builtin_popcountll(sample_type & sample_id_mask)); in ReadFromBinaryFormat()
129 if (UNLIKELY(p < end)) { in ReadFromBinaryFormat()
130 LOG(DEBUG) << "Record SampleId part has " << end - p << " bytes left\n"; in ReadFromBinaryFormat()
209 bool Record::ParseHeader(char*& p, char*& end) { in ParseHeader() argument
[all …]
/system/keymaster/key_blob_utils/
Dintegrity_assured_key_blob.cpp90 p = key_material.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
91 p = hw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
92 p = sw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
103 const uint8_t* end = key_blob.end(); in DeserializeIntegrityAssuredBlob() local
105 if (p > end || p + HMAC_SIZE > end) return KM_ERROR_INVALID_KEY_BLOB; in DeserializeIntegrityAssuredBlob()
112 if (CRYPTO_memcmp(key_blob.end() - HMAC_SIZE, computed_hmac, HMAC_SIZE) != 0) in DeserializeIntegrityAssuredBlob()
124 const uint8_t* end = key_blob.end() - HMAC_SIZE; in DeserializeIntegrityAssuredBlob_NoHmacCheck() local
126 if (p > end) return KM_ERROR_INVALID_KEY_BLOB; in DeserializeIntegrityAssuredBlob_NoHmacCheck()
131 if (!key_material->Deserialize(&p, end) || // in DeserializeIntegrityAssuredBlob_NoHmacCheck()
132 !hw_enforced->Deserialize(&p, end) || // in DeserializeIntegrityAssuredBlob_NoHmacCheck()
[all …]
Dauth_encrypted_key_blob.cpp72 const uint8_t* end = info.peek_write() + info.available_write(); in BuildDerivationInfo() local
73 buf = hidden.Serialize(buf, end); in BuildDerivationInfo()
74 buf = hw_enforced.Serialize(buf, end); in BuildDerivationInfo()
75 buf = sw_enforced.Serialize(buf, end); in BuildDerivationInfo()
78 buf = secure_deletion_data.factory_reset_secret.Serialize(buf, end); in BuildDerivationInfo()
79 buf = secure_deletion_data.secure_deletion_secret.Serialize(buf, end); in BuildDerivationInfo()
81 buf = append_uint32_to_buf(buf, end, secure_deletion_data.key_slot); in BuildDerivationInfo()
84 if (!buf || buf != end || !info.advance_write(buf - info.peek_write())) { in BuildDerivationInfo()
223 const uint8_t* end = retval.end(); in SerializeAuthEncryptedBlob() local
226 buf = encrypted_key.nonce.Serialize(buf, end); in SerializeAuthEncryptedBlob()
[all …]
/system/libprocinfo/include/procinfo/
Dprocess_map.h35 uint64_t end; member
42 MapInfo(uint64_t start, uint64_t end, uint16_t flags, uint64_t pgoff, ino_t inode, in MapInfo()
45 end(end), in MapInfo()
54 end(params.end), in MapInfo()
63 typedef std::function<void(uint64_t start, uint64_t end, uint16_t flags, uint64_t pgoff,
101 char* end; in ParseMapsFileLine() local
103 start_addr = strtoull(p, &end, 16); in ParseMapsFileLine()
104 if (end == p || *end != '-') { in ParseMapsFileLine()
107 p = end + 1; in ParseMapsFileLine()
109 end_addr = strtoull(p, &end, 16); in ParseMapsFileLine()
[all …]
/system/libcppbor/src/
Dcppbor_parse.cpp45 std::tuple<bool, uint64_t, const uint8_t*> parseLength(const uint8_t* pos, const uint8_t* end, in parseLength() argument
47 if (pos + sizeof(T) > end) { in parseLength()
48 parseClient->error(pos - 1, insufficientLengthString(sizeof(T), end - pos, "length field")); in parseLength()
60 std::tuple<const uint8_t*, ParseClient*> parseRecursively(const uint8_t* begin, const uint8_t* end,
100 const uint8_t* valueBegin, const uint8_t* end, in handleString() argument
104 if (end - valueBegin < signed_length || signed_length < 0) { in handleString()
105 parseClient->error(hdrBegin, insufficientLengthString(length, end - valueBegin, errLabel)); in handleString()
207 const uint8_t* pos, const uint8_t* end, in handleEntries() argument
213 if (pos == end) { in handleEntries()
217 std::tie(pos, parseClient) = parseRecursively(pos, end, emitViews, parseClient); in handleEntries()
[all …]
Dcppbor.cpp224 std::find(mapKeysToNotPrint.begin(), mapKeysToNotPrint.end(), in prettyPrintInternal()
225 map_key->asTstr()->value()) != mapKeysToNotPrint.end()) { in prettyPrintInternal()
268 uint8_t* encodeHeader(MajorType type, uint64_t addlInfo, uint8_t* pos, const uint8_t* end) { in encodeHeader() argument
270 if (end - pos < static_cast<ssize_t>(sz)) return nullptr; in encodeHeader()
381 uint8_t* Bstr::encode(uint8_t* pos, const uint8_t* end) const { in encode()
382 pos = encodeHeader(mValue.size(), pos, end); in encode()
383 if (!pos || end - pos < static_cast<ptrdiff_t>(mValue.size())) return nullptr; in encode()
384 return std::copy(mValue.begin(), mValue.end(), pos); in encode()
393 uint8_t* ViewBstr::encode(uint8_t* pos, const uint8_t* end) const { in encode()
394 pos = encodeHeader(mView.size(), pos, end); in encode()
[all …]
/system/core/trusty/coverage/
Dcoverage.cpp184 volatile uint8_t* end = nullptr; in ResetCounts() local
185 GetRawCounts(&begin, &end); in ResetCounts()
187 for (volatile uint8_t* x = begin; x < end; x++) { in ResetCounts()
194 volatile uintptr_t* end = nullptr; in ResetPCs() local
195 GetRawPCs(&begin, &end); in ResetPCs()
197 for (volatile uintptr_t* x = begin; x < end; x++) { in ResetPCs()
223 void CoverageRecord::GetRawData(volatile void** begin, volatile void** end) { in GetRawData() argument
227 *end = (uint8_t*)(*begin) + record_len_; in GetRawData()
230 void CoverageRecord::GetRawCounts(volatile uint8_t** begin, volatile uint8_t** end) { in GetRawCounts() argument
234 *end = 0; in GetRawCounts()
[all …]
/system/tools/hidl/utils/
DFQName.cpp86 static const char* eatIdent(const char* l, const char* end) { in eatIdent() argument
87 if (!(l < end && isIdentStart(*l++))) return nullptr; in eatIdent()
88 while (l < end && isIdentBody(*l)) l++; in eatIdent()
93 static const char* eatPackage(const char* l, const char* end) { in eatPackage() argument
94 if ((l = eatIdent(l, end)) == nullptr) return nullptr; in eatPackage()
96 while (l < end && *l == '.') { in eatPackage()
98 if ((l = eatIdent(l, end)) == nullptr) return nullptr; in eatPackage()
104 static const char* eatNumber(const char* l, const char* end) { in eatNumber() argument
105 if (!(l < end)) return nullptr; in eatNumber()
108 while (l < end && isDigit(*l)) l++; in eatNumber()
[all …]
/system/libufdt/utils/src/
Dmkdtimg_cfg_create.c43 char *end = line; in trim_line() local
44 while (*end != '\0' && *end != '#') { in trim_line()
45 end++; in trim_line()
48 end--; in trim_line()
49 } while (end >= line && isspace(*end)); in trim_line()
51 *(end + 1) = '\0'; in trim_line()
128 goto end; in process_command_cfg_create()
136 goto end; in process_command_cfg_create()
142 goto end; in process_command_cfg_create()
151 end: in process_command_cfg_create()
/system/libufdt/tests/src/
Dufdt_overlay_test_app.c37 goto end; in apply_overlay_files()
44 goto end; in apply_overlay_files()
50 goto end; in apply_overlay_files()
55 clock_t end = clock(); in apply_overlay_files() local
59 goto end; in apply_overlay_files()
64 goto end; in apply_overlay_files()
68 double cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC; in apply_overlay_files()
72 end: in apply_overlay_files()
/system/chre/apps/test/chqts/src/shared/
Dnano_endian.cc22 for (size_t front = 0, end = size - 1; front < end; front++, end--) { in swapBytes() local
24 bytes[front] = bytes[end]; in swapBytes()
25 bytes[end] = tmp; in swapBytes()
/system/core/healthd/
DAnimationParser.cpp62 int start = 0, end = 0; in parse_text_field() local
64 if (sscanf(in, "c c %d %d %d %d %n%*s%n", r, g, b, a, &start, &end) == 4) { in parse_text_field()
67 } else if (sscanf(in, "c %d %d %d %d %d %n%*s%n", y, r, g, b, a, &start, &end) == 5) { in parse_text_field()
69 } else if (sscanf(in, "%d c %d %d %d %d %n%*s%n", x, r, g, b, a, &start, &end) == 5) { in parse_text_field()
71 } else if (sscanf(in, "%d %d %d %d %d %d %n%*s%n", x, y, r, g, b, a, &start, &end) != 6) { in parse_text_field()
75 if (end == 0) return false; in parse_text_field()
77 field->font_file.assign(&in[start], end - start); in parse_text_field()
97 int start = 0, end = 0; in parse_animation_desc() local
99 &start, &end) != 2 || in parse_animation_desc()
100 end == 0) { in parse_animation_desc()
[all …]
/system/core/trusty/fuzz/
Dcounters.cpp52 volatile uint8_t* end = NULL; in ExtraCounters() local
53 record_->GetRawCounts(&begin, &end); in ExtraCounters()
54 assert(end - begin <= sizeof(counters)); in ExtraCounters()
76 volatile uint8_t* end = NULL; in Flush() local
78 record_->GetRawCounts(&begin, &end); in Flush()
79 if (!begin || !end) { in Flush()
84 size_t num_counters = end - begin; in Flush()
/system/netd/server/
DUidRanges.cpp69 auto iter = std::lower_bound(mRanges.begin(), mRanges.end(), makeUidRangeParcel(intUid, intUid), in hasUid()
71 return (iter != mRanges.end() && iter->start == intUid) || in hasUid()
116 std::sort(mRanges.begin(), mRanges.end(), compUidRangeParcel); in parseFrom()
122 std::sort(mRanges.begin(), mRanges.end(), compUidRangeParcel); in UidRanges()
126 auto middle = mRanges.insert(mRanges.end(), other.mRanges.begin(), other.mRanges.end()); in add()
127 std::inplace_merge(mRanges.begin(), middle, mRanges.end(), compUidRangeParcel); in add()
131 auto end = std::set_difference(mRanges.begin(), mRanges.end(), other.mRanges.begin(), in remove() local
132 other.mRanges.end(), mRanges.begin(), compUidRangeParcel); in remove()
133 mRanges.erase(end, mRanges.end()); in remove()

12345678910>>...39