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 in ChainOrigin()
219 // taint labels, it does not matter what origin a zero label has. This reduces in ChainOrigin()
223 Printf(" DFSan found invalid origin invariant\n"); in ChainOrigin()
227 Origin o = Origin::FromRawId(id); in ChainOrigin()
229 Origin chained = Origin::CreateChainedOrigin(o, stack); in ChainOrigin()
246 // contiguous bytes share the same origin.
251 // Copy left unaligned origin if that memory is tainted. in CopyOrigin()
262 // Copy right unaligned origin if that memory is tainted. in CopyOrigin()
297 // Copy right unaligned origin if that memory is tainted. in ReverseCopyOrigin()
325 // Copy left unaligned origin if that memory is tainted. in ReverseCopyOrigin()
344 // If destination origin range overlaps with source origin range, move in MoveOrigin()
346 // a normal order. The orders of origin transfer are consistent with the in MoveOrigin()
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) { in SetOrigin() argument
361 // Origin mapping is 4 bytes per 4 bytes of application memory. in SetOrigin()
367 u64 origin64 = ((u64)origin << 32) | origin; in SetOrigin()
371 if (*(u32 *)beg != origin) in SetOrigin()
372 *(u32 *)beg = origin; in SetOrigin()
381 if (*(u32 *)(end - kOriginAlign) != origin) in SetOrigin()
382 *(u32 *)(end - kOriginAlign) = origin; in SetOrigin()
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) { in SetShadow() argument
553 SetOrigin(addr, size, origin); in SetShadow()
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) { in __dfsan_set_label() argument
579 __dfsan::SetShadow(label, addr, size, origin); in __dfsan_set_label()
627 // This function is used if dfsan_get_origin is called when origin tracking is
656 dfsan_origin origin, in dfsan_set_label_origin() argument
659 __dfsan_set_label(label, origin, addr, size); in dfsan_set_label_origin()
670 dfsan_origin origin);
674 static void ConditionalCallback(dfsan_label label, dfsan_origin origin) { in ConditionalCallback() argument
696 conditional_callback(label, origin); in ConditionalCallback()
702 __dfsan_conditional_callback_origin(dfsan_label label, dfsan_origin origin) { in __dfsan_conditional_callback_origin() argument
703 __dfsan::ConditionalCallback(label, origin); in __dfsan_conditional_callback_origin()
724 dfsan_origin origin,
731 static void ReachesFunctionCallback(dfsan_label label, dfsan_origin origin, in ReachesFunctionCallback() argument
753 reaches_function_callback(label, origin, file, line, function); in ReachesFunctionCallback()
759 __dfsan_reaches_function_callback_origin(dfsan_label label, dfsan_origin origin, in __dfsan_reaches_function_callback_origin() argument
762 __dfsan::ReachesFunctionCallback(label, origin, file, line, function); in __dfsan_reaches_function_callback_origin()
785 const char *Origin() const { return Magenta(); } in Origin() function in Decorator
793 " %sDFSan: origin tracking is not enabled. Did you specify the " in PrintNoOriginTrackingWarning()
807 " %sTaint value 0x%x (at %p) has invalid origin tracking. This can " in PrintInvalidOriginWarning()
812 void PrintInvalidOriginIdWarning(dfsan_origin origin) { in PrintInvalidOriginIdWarning() argument
815 " %sOrigin Id %d has invalid origin tracking. This can " in PrintInvalidOriginIdWarning()
817 d.Warning(), origin, d.Default()); in PrintInvalidOriginIdWarning()
820 bool PrintOriginTraceFramesToStr(Origin o, InternalScopedString *out) { in PrintOriginTraceFramesToStr()
831 d.Origin(), origin_id, d.Default()); in PrintOriginTraceFramesToStr()
834 d.Origin(), origin_id, d.Default()); in PrintOriginTraceFramesToStr()
853 const dfsan_origin origin = *__dfsan::origin_for(addr); in PrintOriginTraceToStr() local
855 out->AppendF(" %sTaint value 0x%x (at %p) origin tracking (%s)%s\n", in PrintOriginTraceToStr()
856 d.Origin(), label, addr, description ? description : "", in PrintOriginTraceToStr()
859 Origin o = Origin::FromRawId(origin); in PrintOriginTraceToStr()
921 dfsan_origin origin) { in dfsan_print_origin_id_trace() argument
926 Origin o = Origin::FromRawId(origin); in dfsan_print_origin_id_trace()
935 PrintInvalidOriginIdWarning(origin); in dfsan_print_origin_id_trace()
939 dfsan_origin origin, char *out_buf, uptr out_buf_size) { in dfsan_sprint_origin_id_trace() argument
946 Origin o = Origin::FromRawId(origin); in dfsan_sprint_origin_id_trace()
952 PrintInvalidOriginIdWarning(origin); in dfsan_sprint_origin_id_trace()
973 const dfsan_origin origin = *__dfsan::origin_for(addr); in dfsan_get_init_origin() local
975 Origin o = Origin::FromRawId(origin); in dfsan_get_init_origin()
1082 if (type != MappingDesc::SHADOW && type != MappingDesc::ORIGIN) in dfsan_flush()
1199 (init_origins && type == MappingDesc::ORIGIN); in InitShadow()
1201 (!init_origins && type == MappingDesc::ORIGIN); in InitShadow()