Lines Matching full:origin
76 // | origin 1 |
84 // | origin 3 |
88 // | origin 2 |
109 // origin of the first taint byte at the low 32 bit.
177 // Return the origin of the first taint byte in the size bytes from the address
209 // from_init = true if this is the first chain of an origin tracking path.
217 // As an optimization the origin of an application byte is updated only when
219 // taint labels, it does not matter what origin a zero label has. This reduces
223 Printf(" DFSan found invalid origin invariant\n");
227 Origin o = Origin::FromRawId(id);
229 Origin chained = Origin::CreateChainedOrigin(o, stack);
246 // contiguous bytes share the same origin.
251 // Copy left unaligned origin if that memory is tainted.
262 // Copy right unaligned origin if that memory is tainted.
297 // Copy right unaligned origin if that memory is tainted.
325 // Copy left unaligned origin if that memory is tainted.
344 // If destination origin range overlaps with source origin range, move
346 // a normal order. The orders of origin transfer are consistent with the
356 // Set the size bytes from the addres dst to be the origin value.
357 static void SetOrigin(const void *dst, uptr size, u32 origin) {
361 // Origin mapping is 4 bytes per 4 bytes of application memory.
367 u64 origin64 = ((u64)origin << 32) | origin;
371 if (*(u32 *)beg != origin)
372 *(u32 *)beg = origin;
381 if (*(u32 *)(end - kOriginAlign) != origin)
382 *(u32 *)(end - kOriginAlign) = origin;
390 // Return a new origin chain with the previous ID id and the current stack
397 // Return a new origin chain with the previous ID id and the current stack
488 // Releases the pages within the origin address range.
548 void SetShadow(dfsan_label label, void *addr, uptr size, dfsan_origin origin) {
553 SetOrigin(addr, size, origin);
566 // origin chain with the previous ID o and the current stack trace. This is
578 dfsan_label label, dfsan_origin origin, void *addr, uptr size) {
579 __dfsan::SetShadow(label, addr, size, origin);
627 // This function is used if dfsan_get_origin is called when origin tracking is
656 dfsan_origin origin,
659 __dfsan_set_label(label, origin, addr, size);
670 dfsan_origin origin);
674 static void ConditionalCallback(dfsan_label label, dfsan_origin origin) {
696 conditional_callback(label, origin);
702 __dfsan_conditional_callback_origin(dfsan_label label, dfsan_origin origin) {
703 __dfsan::ConditionalCallback(label, origin);
724 dfsan_origin origin,
731 static void ReachesFunctionCallback(dfsan_label label, dfsan_origin origin,
753 reaches_function_callback(label, origin, file, line, function);
759 __dfsan_reaches_function_callback_origin(dfsan_label label, dfsan_origin origin,
762 __dfsan::ReachesFunctionCallback(label, origin, file, line, function);
785 const char *Origin() const { return Magenta(); }
793 " %sDFSan: origin tracking is not enabled. Did you specify the "
807 " %sTaint value 0x%x (at %p) has invalid origin tracking. This can "
812 void PrintInvalidOriginIdWarning(dfsan_origin origin) {
815 " %sOrigin Id %d has invalid origin tracking. This can "
817 d.Warning(), origin, d.Default());
820 bool PrintOriginTraceFramesToStr(Origin o, InternalScopedString *out) {
831 d.Origin(), origin_id, d.Default());
834 d.Origin(), origin_id, d.Default());
853 const dfsan_origin origin = *__dfsan::origin_for(addr);
855 out->AppendF(" %sTaint value 0x%x (at %p) origin tracking (%s)%s\n",
856 d.Origin(), label, addr, description ? description : "",
859 Origin o = Origin::FromRawId(origin);
921 dfsan_origin origin) {
926 Origin o = Origin::FromRawId(origin);
935 PrintInvalidOriginIdWarning(origin);
939 dfsan_origin origin, char *out_buf, uptr out_buf_size) {
946 Origin o = Origin::FromRawId(origin);
952 PrintInvalidOriginIdWarning(origin);
973 const dfsan_origin origin = *__dfsan::origin_for(addr);
975 Origin o = Origin::FromRawId(origin);
1082 if (type != MappingDesc::SHADOW && type != MappingDesc::ORIGIN)
1199 (init_origins && type == MappingDesc::ORIGIN);
1201 (!init_origins && type == MappingDesc::ORIGIN);