Home
last modified time | relevance | path

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

12345678910>>...19

/system/keymaster/
Dandroid_keymaster_messages.cpp37 const uint8_t* end) { in serialize_key_blob() argument
38 return append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size); in serialize_key_blob()
42 const uint8_t* end) { in deserialize_key_blob() argument
46 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob->key_material_size, in deserialize_key_blob()
60 uint8_t* KeymasterResponse::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
61 buf = append_uint32_to_buf(buf, end, static_cast<uint32_t>(error)); in Serialize()
63 buf = NonErrorSerialize(buf, end); in Serialize()
67 bool KeymasterResponse::Deserialize(const uint8_t** buf_ptr, const uint8_t* end) { in Deserialize() argument
68 if (!copy_uint32_from_buf(buf_ptr, end, &error)) in Deserialize()
72 return NonErrorDeserialize(buf_ptr, end); in Deserialize()
[all …]
Dauth_encrypted_key_blob.cpp43 const uint8_t* end = key_blob->key_material + key_blob->key_material_size; in SerializeAuthEncryptedBlob() local
46 buf = nonce.Serialize(buf, end); in SerializeAuthEncryptedBlob()
47 buf = encrypted_key_material.Serialize(buf, end); in SerializeAuthEncryptedBlob()
48 buf = tag.Serialize(buf, end); in SerializeAuthEncryptedBlob()
49 buf = hw_enforced.Serialize(buf, end); in SerializeAuthEncryptedBlob()
50 buf = sw_enforced.Serialize(buf, end); in SerializeAuthEncryptedBlob()
64 const uint8_t* end = tmp + key_blob.key_material_size; in DeserializeUnversionedBlob() local
69 if (!copy_from_buf(buf_ptr, end, nonce->peek_write(), OCB_NONCE_LENGTH) || in DeserializeUnversionedBlob()
70 !encrypted_key_material->Deserialize(buf_ptr, end) || in DeserializeUnversionedBlob()
71 !copy_from_buf(buf_ptr, end, tag->peek_write(), OCB_TAG_LENGTH) || in DeserializeUnversionedBlob()
[all …]
Dkey_blob_test.cpp104 EXPECT_EQ(serialized_blob_.end(), std::search(serialized_blob_.begin(), serialized_blob_.end(), in TEST_F()
105 key_material_.begin(), key_material_.end())); in TEST_F()
106 EXPECT_NE(serialized_blob_.end(), std::search(serialized_blob_.begin(), serialized_blob_.end(), in TEST_F()
107 ciphertext_.begin(), ciphertext_.end())); in TEST_F()
143 std::search(serialized_blob_.begin(), serialized_blob_.end(), nonce_.begin(), nonce_.end()); in TEST_F()
144 ASSERT_NE(nonce_ptr, serialized_blob_.end()); in TEST_F()
145 EXPECT_EQ(serialized_blob_.end(), in TEST_F()
146 std::search(nonce_ptr + 1, serialized_blob_.end(), nonce_.begin(), nonce_.end())); in TEST_F()
160 std::search(serialized_blob_.begin(), serialized_blob_.end(), tag_.begin(), tag_.end()); in TEST_F()
161 ASSERT_NE(tag_ptr, serialized_blob_.end()); in TEST_F()
[all …]
Dintegrity_assured_key_blob.cpp96 p = key_material.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
97 p = hw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
98 p = sw_enforced.Serialize(p, key_blob->end()); in SerializeIntegrityAssuredBlob()
109 const uint8_t* end = key_blob.end(); in DeserializeIntegrityAssuredBlob() local
111 if (p > end || p + HMAC_SIZE > end) in DeserializeIntegrityAssuredBlob()
120 if (CRYPTO_memcmp(key_blob.end() - HMAC_SIZE, computed_hmac, HMAC_SIZE) != 0) in DeserializeIntegrityAssuredBlob()
132 const uint8_t* end = key_blob.end() - HMAC_SIZE; in DeserializeIntegrityAssuredBlob_NoHmacCheck() local
134 if (p > end) in DeserializeIntegrityAssuredBlob_NoHmacCheck()
141 if (!key_material->Deserialize(&p, end) || // in DeserializeIntegrityAssuredBlob_NoHmacCheck()
142 !hw_enforced->Deserialize(&p, end) || // in DeserializeIntegrityAssuredBlob_NoHmacCheck()
[all …]
Dserializable.cpp27 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len) { in append_to_buf() argument
31 if (buf + data_len <= end) { in append_to_buf()
38 bool copy_from_buf(const uint8_t** buf_ptr, const uint8_t* end, void* dest, size_t size) { in copy_from_buf() argument
42 if (end < *buf_ptr + size) in copy_from_buf()
49 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
51 if (!copy_uint32_from_buf(buf_ptr, end, size)) in copy_size_and_data_from_buf()
57 if (*buf_ptr + *size > end) in copy_size_and_data_from_buf()
67 return copy_from_buf(buf_ptr, end, dest->get(), *size); in copy_size_and_data_from_buf()
142 uint8_t* Buffer::Serialize(uint8_t* buf, const uint8_t* end) const { in Serialize()
143 return append_size_and_data_to_buf(buf, end, peek_read(), available_read()); in Serialize()
[all …]
Dauthorization_set.cpp305 static uint8_t* serialize(const keymaster_key_param_t& param, uint8_t* buf, const uint8_t* end, in serialize() argument
307 buf = append_uint32_to_buf(buf, end, param.tag); in serialize()
313 buf = append_uint32_to_buf(buf, end, param.enumerated); in serialize()
317 buf = append_uint32_to_buf(buf, end, param.integer); in serialize()
321 buf = append_uint64_to_buf(buf, end, param.long_integer); in serialize()
324 buf = append_uint64_to_buf(buf, end, param.date_time); in serialize()
327 if (buf < end) in serialize()
333 buf = append_uint32_to_buf(buf, end, param.blob.data_length); in serialize()
334 buf = append_uint32_to_buf(buf, end, param.blob.data - indirect_base); in serialize()
340 static bool deserialize(keymaster_key_param_t* param, const uint8_t** buf_ptr, const uint8_t* end, in deserialize() argument
[all …]
/system/keymaster/include/keymaster/
Dserializable.h46 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;
79 uint8_t* append_to_buf(uint8_t* buf, const uint8_t* end, const void* data, size_t data_len);
88 inline uint8_t* append_uint32_to_buf(uint8_t* buf, const uint8_t* end, T value) { in append_uint32_to_buf() argument
90 return append_to_buf(buf, end, &val, sizeof(val)); in append_uint32_to_buf()
96 inline uint8_t* append_uint64_to_buf(uint8_t* buf, const uint8_t* end, uint64_t value) { in append_uint64_to_buf() argument
97 return append_to_buf(buf, end, &value, sizeof(value)); in append_uint64_to_buf()
106 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
108 buf = append_uint32_to_buf(buf, end, data_len); in append_size_and_data_to_buf()
109 return append_to_buf(buf, end, data, data_len); in append_size_and_data_to_buf()
[all …]
Dandroid_keymaster_messages.h111 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override;
112 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override;
115 virtual uint8_t* NonErrorSerialize(uint8_t* buf, const uint8_t* end) const = 0;
116 virtual bool NonErrorDeserialize(const uint8_t** buf_ptr, const uint8_t* end) = 0;
136 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override { in Serialize()
137 return append_uint32_to_buf(buf, end, algorithm); in Serialize()
139 bool Deserialize(const uint8_t** buf_ptr, const uint8_t* end) override { in Deserialize()
140 return copy_uint32_from_buf(buf_ptr, end, &algorithm); in Deserialize()
161 uint8_t* Serialize(uint8_t* buf, const uint8_t* end) const override { in Serialize()
162 buf = append_uint32_to_buf(buf, end, algorithm); in Serialize()
[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()
185 static int read_classperms(policydb_t *policydb, char **ptr, char *end, in read_classperms() argument
[all …]
/system/core/run-as/
Dpackage.c288 skip_spaces(const char* p, const char* end) in skip_spaces() argument
290 while (p < end && is_space(*p)) in skip_spaces()
300 skip_non_spaces(const char* p, const char* end) in skip_non_spaces() argument
302 while (p < end && !is_space(*p)) in skip_non_spaces()
312 find_first(const char* p, const char* end, char ch) in find_first() argument
314 while (p < end && *p != ch) in find_first()
327 compare_name(const char* p, const char* end, const char* name) in compare_name() argument
330 if (name == NULL || name[0] == '\0' || p == end) in compare_name()
338 if (p >= end || is_space(*p)) in compare_name()
349 if (p < end && !is_space(*p)) in compare_name()
[all …]
/system/core/libmemunreachable/
DHeapWalker.cpp31 bool HeapWalker::Allocation(uintptr_t begin, uintptr_t end) { in Allocation() argument
32 if (end == begin) { in Allocation()
33 end = begin + 1; in Allocation()
35 Range range{begin, end}; in Allocation()
39 valid_allocations_range_.end = std::max(valid_allocations_range_.end, end); in Allocation()
47 reinterpret_cast<void*>(end), in Allocation()
49 reinterpret_cast<void*>(overlap.end)); in Allocation()
62 if (value >= valid_allocations_range_.begin && value < valid_allocations_range_.end) { in WordContainsAllocationPtr()
64 if (it != allocations_.end()) { in WordContainsAllocationPtr()
88 void HeapWalker::Root(uintptr_t begin, uintptr_t end) { in Root() argument
[all …]
DHeapWalker.h31 uintptr_t end; member
33 size_t size() const { return end - begin; }; in size()
35 return this->begin == other.begin && this->end == other.end;
45 return a.end <= b.begin; in operator()
55 valid_allocations_range_.end = 0; in HeapWalker()
56 valid_allocations_range_.begin = ~valid_allocations_range_.end; in HeapWalker()
65 bool Allocation(uintptr_t begin, uintptr_t end);
66 void Root(uintptr_t begin, uintptr_t end);
112 for (uintptr_t i = begin; i < range.end; i += sizeof(uintptr_t)) { in ForEachPtrInRange()
/system/netd/server/
DUidRanges.cpp28 auto iter = std::lower_bound(mRanges.begin(), mRanges.end(), Range(uid, uid)); in hasUid()
29 return (iter != mRanges.end() && iter->first == uid) || in hasUid()
74 std::sort(mRanges.begin(), mRanges.end()); in parseFrom()
80 std::transform(ranges.begin(), ranges.end(), mRanges.begin(), in UidRanges()
84 std::sort(mRanges.begin(), mRanges.end()); in UidRanges()
88 auto middle = mRanges.insert(mRanges.end(), other.mRanges.begin(), other.mRanges.end()); in add()
89 std::inplace_merge(mRanges.begin(), middle, mRanges.end()); in add()
93 auto end = std::set_difference(mRanges.begin(), mRanges.end(), other.mRanges.begin(), in remove() local
94 other.mRanges.end(), mRanges.begin()); in remove()
95 mRanges.erase(end, mRanges.end()); in remove()
/system/extras/perfprofd/
Dperf_data_converter.cc11 RangeTarget(uint64 start, uint64 end, uint64 to) in RangeTarget()
12 : start(start), end(end), to(to) {} in RangeTarget()
17 } else if (end != r.end) { in operator <()
18 return end < r.end; in operator <()
24 uint64 end; member
66 uint64 end = event.branch_stack[i - 1].from.offset(); in RawPerfDataToAndroidPerfProfile() local
69 if (end < start || end - start > (1 << 20)) { in RawPerfDataToAndroidPerfProfile()
70 LOG(WARNING) << "Bogus LBR data: " << start << "->" << end; in RawPerfDataToAndroidPerfProfile()
74 RangeTarget(start, end, to)]++; in RawPerfDataToAndroidPerfProfile()
86 for (auto iter = name_id_map.begin(); iter != name_id_map.end(); ++iter) { in RawPerfDataToAndroidPerfProfile()
[all …]
Dconfigreader.cc131 if (u_entries.find(ks) != u_entries.end() || in addUnsignedEntry()
132 s_entries.find(ks) != s_entries.end()) { in addUnsignedEntry()
146 if (u_entries.find(ks) != u_entries.end() || in addStringEntry()
147 s_entries.find(ks) != s_entries.end()) { in addStringEntry()
162 assert(it != u_entries.end()); in getUnsignedValue()
170 assert(it != s_entries.end()); in getStringValue()
178 assert(it != u_entries.end()); in overrideUnsignedEntry()
181 assert(iit != u_info.end()); in overrideUnsignedEntry()
202 if (uit != u_entries.end()) { in parseLine()
209 assert(iit != u_info.end()); in parseLine()
[all …]
/system/core/base/include/android-base/
Dparseint.h36 char* end; variable
37 unsigned long long int result = strtoull(s, &end, base);
38 if (errno != 0 || s == end || *end != '\0') {
58 char* end; variable
59 long long int result = strtoll(s, &end, base);
60 if (errno != 0 || s == end || *end != '\0') {
/system/core/libbacktrace/
DBacktraceMap.cpp39 it != end(); ++it) { in FillIn()
40 if (addr >= it->start && addr < it->end) { in FillIn()
50 unsigned long int end; local
60 &start, &end, permissions, &name_pos) != 3) {
67 &start, &end, permissions, &name_pos) != 3) {
73 map->end = end;
91 reinterpret_cast<void*>(map->start), reinterpret_cast<void*>(map->end),
147 backtrace_map->maps_.insert(backtrace_map->maps_.begin(), maps.begin(), maps.end());
148 std::sort(backtrace_map->maps_.begin(), backtrace_map->maps_.end(),
/system/gatekeeper/
Dgatekeeper_messages.cpp48 static inline gatekeeper_error_t read_from_buffer(const uint8_t **buffer, const uint8_t *end, in read_from_buffer() argument
50 if (*buffer + sizeof(target->length) > end) return ERROR_INVALID; in read_from_buffer()
56 if (buffer_end > end || buffer_end <= *buffer) return ERROR_INVALID; in read_from_buffer()
79 uint32_t GateKeeperMessage::Serialize(uint8_t *buffer, const uint8_t *end) const { in Serialize()
81 if (buffer + GetSerializedSize() > end) { in Serialize()
87 if (buffer + sizeof(serial_header_t) > end) return 0; in Serialize()
96 if (buffer + sizeof(serial_header_t) + nonErrorSerializedSize() > end) in Serialize()
107 gatekeeper_error_t GateKeeperMessage::Deserialize(const uint8_t *payload, const uint8_t *end) { in Deserialize() argument
108 if (payload + sizeof(uint32_t) > end) return ERROR_INVALID; in Deserialize()
111 if (payload == end) return ERROR_INVALID; in Deserialize()
[all …]
/system/security/keystore/
Doperation.cpp36 if (mAppTokenMap.find(appToken) == mAppTokenMap.end()) { in addOperation()
51 if (entry == mMap.end()) { in getOperation()
67 auto lruEntry = std::find(mLru.begin(), mLru.end(), token); in updateLru()
68 if (lruEntry != mLru.end()) { in updateLru()
76 if (entry == mMap.end()) { in removeOperation()
81 auto lruEntry = std::find(mLru.begin(), mLru.end(), token); in removeOperation()
82 if (lruEntry != mLru.end()) { in removeOperation()
91 if (appEntry == mAppTokenMap.end()) { in removeOperationTracking()
95 auto tokenEntry = std::find(appEntry->second.begin(), appEntry->second.end(), token); in removeOperationTracking()
121 if (entry == mMap.end()) { in getOperationAuthToken()
[all …]
/system/update_engine/payload_generator/
Dextent_ranges.cc71 uint64_t end = std::max(first.start_block() + first.num_blocks(), in UnionOverlappingExtents() local
73 return ExtentForRange(start, end - start); in UnionOverlappingExtents()
82 ExtentSet::iterator begin_del = extent_set_.end(); in AddExtent()
83 ExtentSet::iterator end_del = extent_set_.end(); in AddExtent()
85 for (ExtentSet::iterator it = extent_set_.begin(), e = extent_set_.end(); in AddExtent()
91 if (begin_del == extent_set_.end()) in AddExtent()
125 ExtentSet::iterator begin_del = extent_set_.end(); in SubtractExtent()
126 ExtentSet::iterator end_del = extent_set_.end(); in SubtractExtent()
129 for (ExtentSet::iterator it = extent_set_.begin(), e = extent_set_.end(); in SubtractExtent()
134 if (begin_del == extent_set_.end()) in SubtractExtent()
[all …]
/system/core/libutils/
DTokenizer.cpp117 const char* end = getEnd(); in peekRemainderOfLine() local
119 while (eol != end) { in peekRemainderOfLine()
133 const char* end = getEnd(); in nextToken() local
135 while (mCurrent != end) { in nextToken()
149 const char* end = getEnd(); in nextLine() local
150 while (mCurrent != end) { in nextLine()
163 const char* end = getEnd(); in skipDelimiters() local
164 while (mCurrent != end) { in skipDelimiters()
/system/core/debuggerd/test/
Dtombstone_test.cpp101 map.end = 0x123456789abdf000UL; in TEST_F()
104 map.end = 0x1235000; in TEST_F()
133 map.end = 0x123456789abdf000UL; in TEST_F()
136 map.end = 0x1235000; in TEST_F()
170 map.end = 0x123456789abdf000UL; in TEST_F()
173 map.end = 0x1235000; in TEST_F()
209 map.end = 0xa235000; in TEST_F()
213 map.end = 0xa335000; in TEST_F()
219 map.end = 0xa435000; in TEST_F()
226 map.end = 0xa535000; in TEST_F()
[all …]
/system/core/include/backtrace/
DBacktraceMap.h38 uintptr_t end = 0; member
76 iterator end() { return maps_.end(); } in end() function
80 const_iterator end() const { return maps_.end(); } in end() function
85 return map.end > 0; in IsValid()
/system/core/logd/
DLogBuffer.cpp159 while((it != mLogElements.end())) { in init()
183 while(times != mTimes.end()) { in init()
235 LogBufferElementCollection::iterator it = mLogElements.end(); in log()
245 if (last == mLogElements.end()) { in log()
248 uint64_t end = 1; in log() local
255 while(times != mTimes.end()) { in log()
262 if (!end_set || (end <= entry->mEnd)) { in log()
263 end = entry->mEnd; in log()
271 || (end_set && (end >= (*last)->getSequence()))) { in log()
319 if ((found != mLastWorstUid[id].end()) in erase()
[all …]
DLogWhiteBlackList.cpp59 for (it = mNice.begin(); it != mNice.end();) { in ~PruneList()
62 for (it = mNaughty.begin(); it != mNaughty.end();) { in ~PruneList()
71 for (it = mNice.begin(); it != mNice.end();) { in init()
74 for (it = mNaughty.begin(); it != mNaughty.end();) { in init()
186 while (it != list->end()) { in init()
207 if (it == list->end()) { in init()
234 for (it = mNice.begin(); it != mNice.end(); ++it) { in format()
241 for (it = mNaughty.begin(); it != mNaughty.end(); ++it) { in format()
255 for (it = mNaughty.begin(); it != mNaughty.end(); ++it) { in naughty()
265 for (it = mNice.begin(); it != mNice.end(); ++it) { in nice()

12345678910>>...19