FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/limits.h>
#include <sys/systm.h>
#include <machine/_inttypes.h>
#include <machine/stdarg.h>
Go to the source code of this file.
Data Structures | |
struct | CSourceLocation |
struct | CTypeDescriptor |
struct | COverflowData |
struct | CUnreachableData |
struct | CCFICheckFailData |
struct | CDynamicTypeCacheMissData |
struct | CFunctionTypeMismatchData |
struct | CInvalidBuiltinData |
struct | CInvalidValueData |
struct | CNonNullArgData |
struct | CNonNullReturnData |
struct | COutOfBoundsData |
struct | CPointerOverflowData |
struct | CShiftOutOfBoundsData |
struct | CTypeMismatchData |
struct | CTypeMismatchData_v1 |
struct | CVLABoundData |
struct | CFloatCastOverflowData |
struct | CAlignmentAssumptionData |
Macros | |
#define | ASSERT(x) KASSERT(x, ("%s: " __STRING(x) " failed", __func__)) |
#define | __arraycount(x) nitems(x) |
#define | ISSET(x, y) ((x) & (y)) |
#define | __BIT(x) ((uintmax_t)1 << (uintmax_t)(x)) |
#define | __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask)) |
#define | __SHIFTOUT(__x, __mask) (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask)) |
#define | REINTERPRET_CAST(__dt, __st) ((__dt)(__st)) |
#define | STATIC_CAST(__dt, __st) ((__dt)(__st)) |
#define | ACK_REPORTED __BIT(31) |
#define | MUL_STRING "*" |
#define | PLUS_STRING "+" |
#define | MINUS_STRING "-" |
#define | DIVREM_STRING "divrem" |
#define | CFI_VCALL 0 |
#define | CFI_NVCALL 1 |
#define | CFI_DERIVEDCAST 2 |
#define | CFI_UNRELATEDCAST 3 |
#define | CFI_ICALL 4 |
#define | CFI_NVMFCALL 5 |
#define | CFI_VMFCALL 6 |
#define | NUMBER_MAXLEN 128 |
#define | LOCATION_MAXLEN (PATH_MAX + 32 /* ':LINE:COLUMN' */) |
#define | WIDTH_8 8 |
#define | WIDTH_16 16 |
#define | WIDTH_32 32 |
#define | WIDTH_64 64 |
#define | WIDTH_80 80 |
#define | WIDTH_96 96 |
#define | WIDTH_128 128 |
#define | NUMBER_SIGNED_BIT 1U |
#define | KIND_INTEGER 0 |
#define | KIND_FLOAT 1 |
#define | KIND_UNKNOWN UINT16_MAX |
Typedefs | |
typedef int64_t | longest |
typedef uint64_t | ulongest |
Functions | |
__FBSDID ("$FreeBSD$") | |
static void | Report (bool isFatal, const char *pFormat,...) __printflike(2 |
static void static bool | isAlreadyReported (struct CSourceLocation *pLocation) |
static size_t | zDeserializeTypeWidth (struct CTypeDescriptor *pType) |
static void | DeserializeLocation (char *pBuffer, size_t zBUfferLength, struct CSourceLocation *pLocation) |
static void | DeserializeNumberSigned (char *pBuffer, size_t zBUfferLength, struct CTypeDescriptor *pType, longest L) |
static void | DeserializeNumberUnsigned (char *pBuffer, size_t zBUfferLength, struct CTypeDescriptor *pType, ulongest L) |
static longest | llliGetNumber (char *szLocation, struct CTypeDescriptor *pType, unsigned long ulNumber) |
static ulongest | llluGetNumber (char *szLocation, struct CTypeDescriptor *pType, unsigned long ulNumber) |
static void | DeserializeNumber (char *szLocation, char *pBuffer, size_t zBUfferLength, struct CTypeDescriptor *pType, unsigned long ulNumber) |
static const char * | DeserializeTypeCheckKind (uint8_t hhuTypeCheckKind) |
static const char * | DeserializeBuiltinCheckKind (uint8_t hhuBuiltinCheckKind) |
static const char * | DeserializeCFICheckKind (uint8_t hhuCFICheckKind) |
static bool | isNegativeNumber (char *szLocation, struct CTypeDescriptor *pType, unsigned long ulNumber) |
static bool | isShiftExponentTooLarge (char *szLocation, struct CTypeDescriptor *pType, unsigned long ulNumber, size_t zWidth) |
void | __ubsan_handle_add_overflow (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_add_overflow_abort (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_alignment_assumption (struct CAlignmentAssumptionData *pData, unsigned long ulPointer, unsigned long ulAlignment, unsigned long ulOffset) |
void | __ubsan_handle_alignment_assumption_abort (struct CAlignmentAssumptionData *pData, unsigned long ulPointer, unsigned long ulAlignment, unsigned long ulOffset) |
void | __ubsan_handle_builtin_unreachable (struct CUnreachableData *pData) |
void | __ubsan_handle_cfi_bad_type (struct CCFICheckFailData *pData, unsigned long ulVtable, bool bValidVtable, bool FromUnrecoverableHandler, unsigned long ProgramCounter, unsigned long FramePointer) |
void | __ubsan_handle_cfi_check_fail (struct CCFICheckFailData *pData, unsigned long ulValue, unsigned long ulValidVtable) |
void | __ubsan_handle_cfi_check_fail_abort (struct CCFICheckFailData *pData, unsigned long ulValue, unsigned long ulValidVtable) |
void | __ubsan_handle_divrem_overflow (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_divrem_overflow_abort (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_dynamic_type_cache_miss (struct CDynamicTypeCacheMissData *pData, unsigned long ulPointer, unsigned long ulHash) |
void | __ubsan_handle_dynamic_type_cache_miss_abort (struct CDynamicTypeCacheMissData *pData, unsigned long ulPointer, unsigned long ulHash) |
void | __ubsan_handle_float_cast_overflow (struct CFloatCastOverflowData *pData, unsigned long ulFrom) |
void | __ubsan_handle_float_cast_overflow_abort (struct CFloatCastOverflowData *pData, unsigned long ulFrom) |
void | __ubsan_handle_function_type_mismatch (struct CFunctionTypeMismatchData *pData, unsigned long ulFunction) |
void | __ubsan_handle_function_type_mismatch_abort (struct CFunctionTypeMismatchData *pData, unsigned long ulFunction) |
void | __ubsan_handle_invalid_builtin (struct CInvalidBuiltinData *pData) |
void | __ubsan_handle_invalid_builtin_abort (struct CInvalidBuiltinData *pData) |
void | __ubsan_handle_load_invalid_value (struct CInvalidValueData *pData, unsigned long ulVal) |
void | __ubsan_handle_load_invalid_value_abort (struct CInvalidValueData *pData, unsigned long ulVal) |
void | __ubsan_handle_missing_return (struct CUnreachableData *pData) |
void | __ubsan_handle_mul_overflow (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_mul_overflow_abort (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_negate_overflow (struct COverflowData *pData, unsigned long ulOldVal) |
void | __ubsan_handle_negate_overflow_abort (struct COverflowData *pData, unsigned long ulOldVal) |
void | __ubsan_handle_nonnull_arg (struct CNonNullArgData *pData) |
void | __ubsan_handle_nonnull_arg_abort (struct CNonNullArgData *pData) |
void | __ubsan_handle_nonnull_return_v1 (struct CNonNullReturnData *pData, struct CSourceLocation *pLocationPointer) |
void | __ubsan_handle_nonnull_return_v1_abort (struct CNonNullReturnData *pData, struct CSourceLocation *pLocationPointer) |
void | __ubsan_handle_nullability_arg (struct CNonNullArgData *pData) |
void | __ubsan_handle_nullability_arg_abort (struct CNonNullArgData *pData) |
void | __ubsan_handle_nullability_return_v1 (struct CNonNullReturnData *pData, struct CSourceLocation *pLocationPointer) |
void | __ubsan_handle_nullability_return_v1_abort (struct CNonNullReturnData *pData, struct CSourceLocation *pLocationPointer) |
void | __ubsan_handle_out_of_bounds (struct COutOfBoundsData *pData, unsigned long ulIndex) |
void | __ubsan_handle_out_of_bounds_abort (struct COutOfBoundsData *pData, unsigned long ulIndex) |
void | __ubsan_handle_pointer_overflow (struct CPointerOverflowData *pData, unsigned long ulBase, unsigned long ulResult) |
void | __ubsan_handle_pointer_overflow_abort (struct CPointerOverflowData *pData, unsigned long ulBase, unsigned long ulResult) |
void | __ubsan_handle_shift_out_of_bounds (struct CShiftOutOfBoundsData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_shift_out_of_bounds_abort (struct CShiftOutOfBoundsData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_sub_overflow (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_sub_overflow_abort (struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS) |
void | __ubsan_handle_type_mismatch (struct CTypeMismatchData *pData, unsigned long ulPointer) |
void | __ubsan_handle_type_mismatch_abort (struct CTypeMismatchData *pData, unsigned long ulPointer) |
void | __ubsan_handle_type_mismatch_v1 (struct CTypeMismatchData_v1 *pData, unsigned long ulPointer) |
void | __ubsan_handle_type_mismatch_v1_abort (struct CTypeMismatchData_v1 *pData, unsigned long ulPointer) |
void | __ubsan_handle_vla_bound_not_positive (struct CVLABoundData *pData, unsigned long ulBound) |
void | __ubsan_handle_vla_bound_not_positive_abort (struct CVLABoundData *pData, unsigned long ulBound) |
void | __ubsan_get_current_report_data (const char **ppOutIssueKind, const char **ppOutMessage, const char **ppOutFilename, uint32_t *pOutLine, uint32_t *pOutCol, char **ppOutMemoryAddr) |
static void | HandleOverflow (bool isFatal, struct COverflowData *pData, unsigned long ulLHS, unsigned long ulRHS, const char *szOperation) |
static void | HandleNegateOverflow (bool isFatal, struct COverflowData *pData, unsigned long ulOldValue) |
static void | HandleBuiltinUnreachable (bool isFatal, struct CUnreachableData *pData) |
static void | HandleTypeMismatch (bool isFatal, struct CSourceLocation *mLocation, struct CTypeDescriptor *mType, unsigned long mLogAlignment, uint8_t mTypeCheckKind, unsigned long ulPointer) |
static void | HandleVlaBoundNotPositive (bool isFatal, struct CVLABoundData *pData, unsigned long ulBound) |
static void | HandleOutOfBounds (bool isFatal, struct COutOfBoundsData *pData, unsigned long ulIndex) |
static void | HandleShiftOutOfBounds (bool isFatal, struct CShiftOutOfBoundsData *pData, unsigned long ulLHS, unsigned long ulRHS) |
static void | HandleLoadInvalidValue (bool isFatal, struct CInvalidValueData *pData, unsigned long ulValue) |
static void | HandleInvalidBuiltin (bool isFatal, struct CInvalidBuiltinData *pData) |
static void | HandleFunctionTypeMismatch (bool isFatal, struct CFunctionTypeMismatchData *pData, unsigned long ulFunction) |
static void | HandleCFIBadType (bool isFatal, struct CCFICheckFailData *pData, unsigned long ulVtable, bool *bValidVtable, bool *FromUnrecoverableHandler, unsigned long *ProgramCounter, unsigned long *FramePointer) |
static void | HandleDynamicTypeCacheMiss (bool isFatal, struct CDynamicTypeCacheMissData *pData, unsigned long ulPointer, unsigned long ulHash) |
static void | HandleFloatCastOverflow (bool isFatal, struct CFloatCastOverflowData *pData, unsigned long ulFrom) |
static void | HandleMissingReturn (bool isFatal, struct CUnreachableData *pData) |
static void | HandleNonnullArg (bool isFatal, struct CNonNullArgData *pData) |
static void | HandleNonnullReturn (bool isFatal, struct CNonNullReturnData *pData, struct CSourceLocation *pLocationPointer) |
static void | HandlePointerOverflow (bool isFatal, struct CPointerOverflowData *pData, unsigned long ulBase, unsigned long ulResult) |
static void | HandleAlignmentAssumption (bool isFatal, struct CAlignmentAssumptionData *pData, unsigned long ulPointer, unsigned long ulAlignment, unsigned long ulOffset) |
Variables | |
intptr_t | __ubsan_vptr_type_cache [128] |
#define __arraycount | ( | x | ) | nitems(x) |
Definition at line 57 of file kern_ubsan.c.
#define __BIT | ( | x | ) | ((uintmax_t)1 << (uintmax_t)(x)) |
Definition at line 59 of file kern_ubsan.c.
#define __LOWEST_SET_BIT | ( | __mask | ) | ((((__mask) - 1) & (__mask)) ^ (__mask)) |
Definition at line 60 of file kern_ubsan.c.
#define __SHIFTOUT | ( | __x, | |
__mask | |||
) | (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask)) |
Definition at line 61 of file kern_ubsan.c.
#define ACK_REPORTED __BIT(31) |
Definition at line 96 of file kern_ubsan.c.
#define ASSERT | ( | x | ) | KASSERT(x, ("%s: " __STRING(x) " failed", __func__)) |
Definition at line 56 of file kern_ubsan.c.
#define CFI_DERIVEDCAST 2 |
Definition at line 105 of file kern_ubsan.c.
#define CFI_ICALL 4 |
Definition at line 107 of file kern_ubsan.c.
#define CFI_NVCALL 1 |
Definition at line 104 of file kern_ubsan.c.
#define CFI_NVMFCALL 5 |
Definition at line 108 of file kern_ubsan.c.
#define CFI_UNRELATEDCAST 3 |
Definition at line 106 of file kern_ubsan.c.
#define CFI_VCALL 0 |
Definition at line 103 of file kern_ubsan.c.
#define CFI_VMFCALL 6 |
Definition at line 109 of file kern_ubsan.c.
#define DIVREM_STRING "divrem" |
Definition at line 101 of file kern_ubsan.c.
#define ISSET | ( | x, | |
y | |||
) | ((x) & (y)) |
Definition at line 58 of file kern_ubsan.c.
#define KIND_FLOAT 1 |
Definition at line 143 of file kern_ubsan.c.
#define KIND_INTEGER 0 |
Definition at line 142 of file kern_ubsan.c.
#define KIND_UNKNOWN UINT16_MAX |
Definition at line 144 of file kern_ubsan.c.
#define LOCATION_MAXLEN (PATH_MAX + 32 /* ':LINE:COLUMN' */) |
Definition at line 112 of file kern_ubsan.c.
#define MINUS_STRING "-" |
Definition at line 100 of file kern_ubsan.c.
#define MUL_STRING "*" |
Definition at line 98 of file kern_ubsan.c.
#define NUMBER_MAXLEN 128 |
Definition at line 111 of file kern_ubsan.c.
#define NUMBER_SIGNED_BIT 1U |
Definition at line 122 of file kern_ubsan.c.
#define PLUS_STRING "+" |
Definition at line 99 of file kern_ubsan.c.
#define REINTERPRET_CAST | ( | __dt, | |
__st | |||
) | ((__dt)(__st)) |
Definition at line 93 of file kern_ubsan.c.
#define STATIC_CAST | ( | __dt, | |
__st | |||
) | ((__dt)(__st)) |
Definition at line 94 of file kern_ubsan.c.
#define WIDTH_128 128 |
Definition at line 120 of file kern_ubsan.c.
#define WIDTH_16 16 |
Definition at line 115 of file kern_ubsan.c.
#define WIDTH_32 32 |
Definition at line 116 of file kern_ubsan.c.
#define WIDTH_64 64 |
Definition at line 117 of file kern_ubsan.c.
#define WIDTH_8 8 |
Definition at line 114 of file kern_ubsan.c.
#define WIDTH_80 80 |
Definition at line 118 of file kern_ubsan.c.
#define WIDTH_96 96 |
Definition at line 119 of file kern_ubsan.c.
typedef int64_t longest |
Definition at line 128 of file kern_ubsan.c.
typedef uint64_t ulongest |
Definition at line 129 of file kern_ubsan.c.
__FBSDID | ( | "$FreeBSD$" | ) |
void __ubsan_get_current_report_data | ( | const char ** | ppOutIssueKind, |
const char ** | ppOutMessage, | ||
const char ** | ppOutFilename, | ||
uint32_t * | pOutLine, | ||
uint32_t * | pOutCol, | ||
char ** | ppOutMemoryAddr | ||
) |
Definition at line 1158 of file kern_ubsan.c.
void __ubsan_handle_add_overflow | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 731 of file kern_ubsan.c.
References ASSERT, HandleOverflow(), and PLUS_STRING.
void __ubsan_handle_add_overflow_abort | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 740 of file kern_ubsan.c.
References ASSERT, HandleOverflow(), and PLUS_STRING.
void __ubsan_handle_alignment_assumption | ( | struct CAlignmentAssumptionData * | pData, |
unsigned long | ulPointer, | ||
unsigned long | ulAlignment, | ||
unsigned long | ulOffset | ||
) |
Definition at line 749 of file kern_ubsan.c.
References ASSERT, and HandleAlignmentAssumption().
void __ubsan_handle_alignment_assumption_abort | ( | struct CAlignmentAssumptionData * | pData, |
unsigned long | ulPointer, | ||
unsigned long | ulAlignment, | ||
unsigned long | ulOffset | ||
) |
Definition at line 758 of file kern_ubsan.c.
References ASSERT, and HandleAlignmentAssumption().
void __ubsan_handle_builtin_unreachable | ( | struct CUnreachableData * | pData | ) |
Definition at line 767 of file kern_ubsan.c.
References ASSERT, and HandleBuiltinUnreachable().
void __ubsan_handle_cfi_bad_type | ( | struct CCFICheckFailData * | pData, |
unsigned long | ulVtable, | ||
bool | bValidVtable, | ||
bool | FromUnrecoverableHandler, | ||
unsigned long | ProgramCounter, | ||
unsigned long | FramePointer | ||
) |
Definition at line 776 of file kern_ubsan.c.
References ASSERT, and HandleCFIBadType().
void __ubsan_handle_cfi_check_fail | ( | struct CCFICheckFailData * | pData, |
unsigned long | ulValue, | ||
unsigned long | ulValidVtable | ||
) |
Definition at line 785 of file kern_ubsan.c.
References ASSERT, and HandleCFIBadType().
void __ubsan_handle_cfi_check_fail_abort | ( | struct CCFICheckFailData * | pData, |
unsigned long | ulValue, | ||
unsigned long | ulValidVtable | ||
) |
Definition at line 794 of file kern_ubsan.c.
References ASSERT, and HandleCFIBadType().
void __ubsan_handle_divrem_overflow | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 803 of file kern_ubsan.c.
References ASSERT, DIVREM_STRING, and HandleOverflow().
void __ubsan_handle_divrem_overflow_abort | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 812 of file kern_ubsan.c.
References ASSERT, DIVREM_STRING, and HandleOverflow().
void __ubsan_handle_dynamic_type_cache_miss | ( | struct CDynamicTypeCacheMissData * | pData, |
unsigned long | ulPointer, | ||
unsigned long | ulHash | ||
) |
Definition at line 821 of file kern_ubsan.c.
References ASSERT, and HandleDynamicTypeCacheMiss().
void __ubsan_handle_dynamic_type_cache_miss_abort | ( | struct CDynamicTypeCacheMissData * | pData, |
unsigned long | ulPointer, | ||
unsigned long | ulHash | ||
) |
Definition at line 830 of file kern_ubsan.c.
References ASSERT, and HandleDynamicTypeCacheMiss().
void __ubsan_handle_float_cast_overflow | ( | struct CFloatCastOverflowData * | pData, |
unsigned long | ulFrom | ||
) |
Definition at line 839 of file kern_ubsan.c.
References ASSERT, and HandleFloatCastOverflow().
void __ubsan_handle_float_cast_overflow_abort | ( | struct CFloatCastOverflowData * | pData, |
unsigned long | ulFrom | ||
) |
Definition at line 848 of file kern_ubsan.c.
References ASSERT, and HandleFloatCastOverflow().
void __ubsan_handle_function_type_mismatch | ( | struct CFunctionTypeMismatchData * | pData, |
unsigned long | ulFunction | ||
) |
Definition at line 857 of file kern_ubsan.c.
References ASSERT, and HandleFunctionTypeMismatch().
void __ubsan_handle_function_type_mismatch_abort | ( | struct CFunctionTypeMismatchData * | pData, |
unsigned long | ulFunction | ||
) |
Definition at line 866 of file kern_ubsan.c.
References ASSERT, and HandleFunctionTypeMismatch().
void __ubsan_handle_invalid_builtin | ( | struct CInvalidBuiltinData * | pData | ) |
Definition at line 875 of file kern_ubsan.c.
References ASSERT, and HandleInvalidBuiltin().
void __ubsan_handle_invalid_builtin_abort | ( | struct CInvalidBuiltinData * | pData | ) |
Definition at line 884 of file kern_ubsan.c.
References ASSERT, and HandleInvalidBuiltin().
void __ubsan_handle_load_invalid_value | ( | struct CInvalidValueData * | pData, |
unsigned long | ulVal | ||
) |
Definition at line 893 of file kern_ubsan.c.
References ASSERT, and HandleLoadInvalidValue().
void __ubsan_handle_load_invalid_value_abort | ( | struct CInvalidValueData * | pData, |
unsigned long | ulVal | ||
) |
Definition at line 902 of file kern_ubsan.c.
References ASSERT, and HandleLoadInvalidValue().
void __ubsan_handle_missing_return | ( | struct CUnreachableData * | pData | ) |
Definition at line 911 of file kern_ubsan.c.
References ASSERT, and HandleMissingReturn().
void __ubsan_handle_mul_overflow | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 920 of file kern_ubsan.c.
References ASSERT, HandleOverflow(), and MUL_STRING.
void __ubsan_handle_mul_overflow_abort | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 929 of file kern_ubsan.c.
References ASSERT, HandleOverflow(), and MUL_STRING.
void __ubsan_handle_negate_overflow | ( | struct COverflowData * | pData, |
unsigned long | ulOldVal | ||
) |
Definition at line 938 of file kern_ubsan.c.
References ASSERT, and HandleNegateOverflow().
void __ubsan_handle_negate_overflow_abort | ( | struct COverflowData * | pData, |
unsigned long | ulOldVal | ||
) |
Definition at line 947 of file kern_ubsan.c.
References ASSERT, and HandleNegateOverflow().
void __ubsan_handle_nonnull_arg | ( | struct CNonNullArgData * | pData | ) |
Definition at line 956 of file kern_ubsan.c.
References ASSERT, and HandleNonnullArg().
void __ubsan_handle_nonnull_arg_abort | ( | struct CNonNullArgData * | pData | ) |
Definition at line 965 of file kern_ubsan.c.
References ASSERT, and HandleNonnullArg().
void __ubsan_handle_nonnull_return_v1 | ( | struct CNonNullReturnData * | pData, |
struct CSourceLocation * | pLocationPointer | ||
) |
Definition at line 974 of file kern_ubsan.c.
References ASSERT, and HandleNonnullReturn().
void __ubsan_handle_nonnull_return_v1_abort | ( | struct CNonNullReturnData * | pData, |
struct CSourceLocation * | pLocationPointer | ||
) |
Definition at line 984 of file kern_ubsan.c.
References ASSERT, and HandleNonnullReturn().
void __ubsan_handle_nullability_arg | ( | struct CNonNullArgData * | pData | ) |
Definition at line 994 of file kern_ubsan.c.
References ASSERT, and HandleNonnullArg().
void __ubsan_handle_nullability_arg_abort | ( | struct CNonNullArgData * | pData | ) |
Definition at line 1003 of file kern_ubsan.c.
References ASSERT, and HandleNonnullArg().
void __ubsan_handle_nullability_return_v1 | ( | struct CNonNullReturnData * | pData, |
struct CSourceLocation * | pLocationPointer | ||
) |
Definition at line 1012 of file kern_ubsan.c.
References ASSERT, and HandleNonnullReturn().
void __ubsan_handle_nullability_return_v1_abort | ( | struct CNonNullReturnData * | pData, |
struct CSourceLocation * | pLocationPointer | ||
) |
Definition at line 1022 of file kern_ubsan.c.
References ASSERT, and HandleNonnullReturn().
void __ubsan_handle_out_of_bounds | ( | struct COutOfBoundsData * | pData, |
unsigned long | ulIndex | ||
) |
Definition at line 1032 of file kern_ubsan.c.
References ASSERT, and HandleOutOfBounds().
void __ubsan_handle_out_of_bounds_abort | ( | struct COutOfBoundsData * | pData, |
unsigned long | ulIndex | ||
) |
Definition at line 1041 of file kern_ubsan.c.
References ASSERT, and HandleOutOfBounds().
void __ubsan_handle_pointer_overflow | ( | struct CPointerOverflowData * | pData, |
unsigned long | ulBase, | ||
unsigned long | ulResult | ||
) |
Definition at line 1050 of file kern_ubsan.c.
References ASSERT, and HandlePointerOverflow().
void __ubsan_handle_pointer_overflow_abort | ( | struct CPointerOverflowData * | pData, |
unsigned long | ulBase, | ||
unsigned long | ulResult | ||
) |
Definition at line 1059 of file kern_ubsan.c.
References ASSERT, and HandlePointerOverflow().
void __ubsan_handle_shift_out_of_bounds | ( | struct CShiftOutOfBoundsData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 1068 of file kern_ubsan.c.
References ASSERT, and HandleShiftOutOfBounds().
void __ubsan_handle_shift_out_of_bounds_abort | ( | struct CShiftOutOfBoundsData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 1077 of file kern_ubsan.c.
References ASSERT, and HandleShiftOutOfBounds().
void __ubsan_handle_sub_overflow | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 1086 of file kern_ubsan.c.
References ASSERT, HandleOverflow(), and MINUS_STRING.
void __ubsan_handle_sub_overflow_abort | ( | struct COverflowData * | pData, |
unsigned long | ulLHS, | ||
unsigned long | ulRHS | ||
) |
Definition at line 1095 of file kern_ubsan.c.
References ASSERT, HandleOverflow(), and MINUS_STRING.
void __ubsan_handle_type_mismatch | ( | struct CTypeMismatchData * | pData, |
unsigned long | ulPointer | ||
) |
Definition at line 1104 of file kern_ubsan.c.
References ASSERT, HandleTypeMismatch(), CTypeMismatchData::mLocation, CTypeMismatchData::mLogAlignment, CTypeMismatchData::mType, and CTypeMismatchData::mTypeCheckKind.
void __ubsan_handle_type_mismatch_abort | ( | struct CTypeMismatchData * | pData, |
unsigned long | ulPointer | ||
) |
Definition at line 1113 of file kern_ubsan.c.
References ASSERT, HandleTypeMismatch(), CTypeMismatchData::mLocation, CTypeMismatchData::mLogAlignment, CTypeMismatchData::mType, and CTypeMismatchData::mTypeCheckKind.
void __ubsan_handle_type_mismatch_v1 | ( | struct CTypeMismatchData_v1 * | pData, |
unsigned long | ulPointer | ||
) |
Definition at line 1122 of file kern_ubsan.c.
References __BIT, ASSERT, HandleTypeMismatch(), CTypeMismatchData_v1::mLocation, CTypeMismatchData_v1::mLogAlignment, CTypeMismatchData_v1::mType, and CTypeMismatchData_v1::mTypeCheckKind.
void __ubsan_handle_type_mismatch_v1_abort | ( | struct CTypeMismatchData_v1 * | pData, |
unsigned long | ulPointer | ||
) |
Definition at line 1131 of file kern_ubsan.c.
References __BIT, ASSERT, HandleTypeMismatch(), CTypeMismatchData_v1::mLocation, CTypeMismatchData_v1::mLogAlignment, CTypeMismatchData_v1::mType, and CTypeMismatchData_v1::mTypeCheckKind.
void __ubsan_handle_vla_bound_not_positive | ( | struct CVLABoundData * | pData, |
unsigned long | ulBound | ||
) |
Definition at line 1140 of file kern_ubsan.c.
References ASSERT, and HandleVlaBoundNotPositive().
void __ubsan_handle_vla_bound_not_positive_abort | ( | struct CVLABoundData * | pData, |
unsigned long | ulBound | ||
) |
Definition at line 1149 of file kern_ubsan.c.
References ASSERT, and HandleVlaBoundNotPositive().
|
static |
Definition at line 1651 of file kern_ubsan.c.
References __arraycount, and ASSERT.
Referenced by HandleInvalidBuiltin().
|
static |
Definition at line 1664 of file kern_ubsan.c.
References __arraycount, and ASSERT.
Referenced by HandleCFIBadType().
|
static |
Definition at line 1315 of file kern_ubsan.c.
References ACK_REPORTED, ASSERT, CSourceLocation::mColumn, CSourceLocation::mFilename, CSourceLocation::mLine, and snprintf().
Referenced by HandleAlignmentAssumption(), HandleBuiltinUnreachable(), HandleCFIBadType(), HandleDynamicTypeCacheMiss(), HandleFloatCastOverflow(), HandleFunctionTypeMismatch(), HandleInvalidBuiltin(), HandleLoadInvalidValue(), HandleMissingReturn(), HandleNegateOverflow(), HandleNonnullArg(), HandleNonnullReturn(), HandleOutOfBounds(), HandleOverflow(), HandlePointerOverflow(), HandleShiftOutOfBounds(), HandleTypeMismatch(), and HandleVlaBoundNotPositive().
|
static |
Definition at line 1594 of file kern_ubsan.c.
References ASSERT, DeserializeNumberSigned(), DeserializeNumberUnsigned(), ISSET, KIND_FLOAT, KIND_INTEGER, KIND_UNKNOWN, llliGetNumber(), llluGetNumber(), CTypeDescriptor::mTypeInfo, CTypeDescriptor::mTypeKind, NUMBER_SIGNED_BIT, and Report().
Referenced by HandleFloatCastOverflow(), HandleLoadInvalidValue(), HandleNegateOverflow(), HandleOutOfBounds(), HandleOverflow(), HandleShiftOutOfBounds(), and HandleVlaBoundNotPositive().
|
static |
Definition at line 1348 of file kern_ubsan.c.
References ASSERT, ISSET, CTypeDescriptor::mTypeInfo, NUMBER_SIGNED_BIT, snprintf(), STATIC_CAST, WIDTH_128, WIDTH_16, WIDTH_32, WIDTH_64, WIDTH_8, and zDeserializeTypeWidth().
Referenced by DeserializeNumber().
|
static |
Definition at line 1375 of file kern_ubsan.c.
References ASSERT, ISSET, CTypeDescriptor::mTypeInfo, NUMBER_SIGNED_BIT, snprintf(), STATIC_CAST, WIDTH_128, WIDTH_16, WIDTH_32, WIDTH_64, WIDTH_8, and zDeserializeTypeWidth().
Referenced by DeserializeNumber().
|
static |
Definition at line 1628 of file kern_ubsan.c.
References __arraycount, and ASSERT.
Referenced by HandleDynamicTypeCacheMiss(), and HandleTypeMismatch().
|
static |
Definition at line 702 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CAlignmentAssumptionData::mAssumptionLocation, CSourceLocation::mFilename, CAlignmentAssumptionData::mLocation, and Report().
Referenced by __ubsan_handle_alignment_assumption(), and __ubsan_handle_alignment_assumption_abort().
|
static |
Definition at line 389 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CUnreachableData::mLocation, and Report().
Referenced by __ubsan_handle_builtin_unreachable().
|
static |
Definition at line 556 of file kern_ubsan.c.
References ASSERT, CFI_ICALL, CFI_VMFCALL, DeserializeCFICheckKind(), DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CCFICheckFailData::mCheckKind, CCFICheckFailData::mLocation, CCFICheckFailData::mType, CTypeDescriptor::mTypeName, and Report().
Referenced by __ubsan_handle_cfi_bad_type(), __ubsan_handle_cfi_check_fail(), and __ubsan_handle_cfi_check_fail_abort().
|
static |
Definition at line 582 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeTypeCheckKind(), isAlreadyReported(), LOCATION_MAXLEN, CDynamicTypeCacheMissData::mLocation, CDynamicTypeCacheMissData::mType, CDynamicTypeCacheMissData::mTypeCheckKind, and Report().
Referenced by __ubsan_handle_dynamic_type_cache_miss(), and __ubsan_handle_dynamic_type_cache_miss_abort().
|
static |
Definition at line 609 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeNumber(), isAlreadyReported(), LOCATION_MAXLEN, CFloatCastOverflowData::mFromType, CFloatCastOverflowData::mLocation, CFloatCastOverflowData::mToType, CTypeDescriptor::mTypeName, NUMBER_MAXLEN, and Report().
Referenced by __ubsan_handle_float_cast_overflow(), and __ubsan_handle_float_cast_overflow_abort().
|
static |
Definition at line 530 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CFunctionTypeMismatchData::mLocation, CFunctionTypeMismatchData::mType, CTypeDescriptor::mTypeName, and Report().
Referenced by __ubsan_handle_function_type_mismatch(), and __ubsan_handle_function_type_mismatch_abort().
|
static |
Definition at line 514 of file kern_ubsan.c.
References ASSERT, DeserializeBuiltinCheckKind(), DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CInvalidBuiltinData::mKind, CInvalidBuiltinData::mLocation, and Report().
Referenced by __ubsan_handle_invalid_builtin(), and __ubsan_handle_invalid_builtin_abort().
|
static |
Definition at line 496 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeNumber(), isAlreadyReported(), LOCATION_MAXLEN, CInvalidValueData::mLocation, CInvalidValueData::mType, CTypeDescriptor::mTypeName, NUMBER_MAXLEN, and Report().
Referenced by __ubsan_handle_load_invalid_value(), and __ubsan_handle_load_invalid_value_abort().
|
static |
Definition at line 627 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CUnreachableData::mLocation, and Report().
Referenced by __ubsan_handle_missing_return().
|
static |
Definition at line 371 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeNumber(), isAlreadyReported(), LOCATION_MAXLEN, COverflowData::mLocation, COverflowData::mType, CTypeDescriptor::mTypeName, NUMBER_MAXLEN, and Report().
Referenced by __ubsan_handle_negate_overflow(), and __ubsan_handle_negate_overflow_abort().
|
static |
Definition at line 643 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CNonNullArgData::mArgIndex, CNonNullArgData::mAttributeLocation, CSourceLocation::mFilename, CNonNullArgData::mLocation, and Report().
Referenced by __ubsan_handle_nonnull_arg(), __ubsan_handle_nonnull_arg_abort(), __ubsan_handle_nullability_arg(), and __ubsan_handle_nullability_arg_abort().
|
static |
Definition at line 664 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CNonNullReturnData::mAttributeLocation, CSourceLocation::mFilename, and Report().
Referenced by __ubsan_handle_nonnull_return_v1(), __ubsan_handle_nonnull_return_v1_abort(), __ubsan_handle_nullability_return_v1(), and __ubsan_handle_nullability_return_v1_abort().
|
static |
Definition at line 448 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeNumber(), isAlreadyReported(), LOCATION_MAXLEN, COutOfBoundsData::mArrayType, COutOfBoundsData::mIndexType, COutOfBoundsData::mLocation, CTypeDescriptor::mTypeName, NUMBER_MAXLEN, and Report().
Referenced by __ubsan_handle_out_of_bounds(), and __ubsan_handle_out_of_bounds_abort().
|
static |
Definition at line 351 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeNumber(), isAlreadyReported(), ISSET, LOCATION_MAXLEN, COverflowData::mLocation, COverflowData::mType, CTypeDescriptor::mTypeInfo, CTypeDescriptor::mTypeName, NUMBER_MAXLEN, NUMBER_SIGNED_BIT, and Report().
Referenced by __ubsan_handle_add_overflow(), __ubsan_handle_add_overflow_abort(), __ubsan_handle_divrem_overflow(), __ubsan_handle_divrem_overflow_abort(), __ubsan_handle_mul_overflow(), __ubsan_handle_mul_overflow_abort(), __ubsan_handle_sub_overflow(), and __ubsan_handle_sub_overflow_abort().
|
static |
Definition at line 686 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), isAlreadyReported(), LOCATION_MAXLEN, CPointerOverflowData::mLocation, and Report().
Referenced by __ubsan_handle_pointer_overflow(), and __ubsan_handle_pointer_overflow_abort().
|
static |
Definition at line 466 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeNumber(), isAlreadyReported(), isNegativeNumber(), isShiftExponentTooLarge(), LOCATION_MAXLEN, CShiftOutOfBoundsData::mLHSType, CShiftOutOfBoundsData::mLocation, CShiftOutOfBoundsData::mRHSType, CTypeDescriptor::mTypeName, NUMBER_MAXLEN, Report(), and zDeserializeTypeWidth().
Referenced by __ubsan_handle_shift_out_of_bounds(), and __ubsan_handle_shift_out_of_bounds_abort().
|
static |
Definition at line 405 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeTypeCheckKind(), isAlreadyReported(), LOCATION_MAXLEN, CTypeDescriptor::mTypeName, REINTERPRET_CAST, and Report().
Referenced by __ubsan_handle_type_mismatch(), __ubsan_handle_type_mismatch_abort(), __ubsan_handle_type_mismatch_v1(), and __ubsan_handle_type_mismatch_v1_abort().
|
static |
Definition at line 430 of file kern_ubsan.c.
References ASSERT, DeserializeLocation(), DeserializeNumber(), isAlreadyReported(), LOCATION_MAXLEN, CVLABoundData::mLocation, CVLABoundData::mType, NUMBER_MAXLEN, and Report().
Referenced by __ubsan_handle_vla_bound_not_positive(), and __ubsan_handle_vla_bound_not_positive_abort().
|
static |
Definition at line 1268 of file kern_ubsan.c.
References ACK_REPORTED, ASSERT, ISSET, and CSourceLocation::mLine.
Referenced by HandleAlignmentAssumption(), HandleBuiltinUnreachable(), HandleCFIBadType(), HandleDynamicTypeCacheMiss(), HandleFloatCastOverflow(), HandleFunctionTypeMismatch(), HandleInvalidBuiltin(), HandleLoadInvalidValue(), HandleMissingReturn(), HandleNegateOverflow(), HandleNonnullArg(), HandleNonnullReturn(), HandleOutOfBounds(), HandleOverflow(), HandlePointerOverflow(), HandleShiftOutOfBounds(), HandleTypeMismatch(), and HandleVlaBoundNotPositive().
|
static |
Definition at line 1682 of file kern_ubsan.c.
References ASSERT, ISSET, KIND_INTEGER, llliGetNumber(), CTypeDescriptor::mTypeInfo, CTypeDescriptor::mTypeKind, and NUMBER_SIGNED_BIT.
Referenced by HandleShiftOutOfBounds().
|
static |
Definition at line 1696 of file kern_ubsan.c.
References ASSERT, KIND_INTEGER, llluGetNumber(), and CTypeDescriptor::mTypeKind.
Referenced by HandleShiftOutOfBounds().
|
static |
Definition at line 1475 of file kern_ubsan.c.
References ASSERT, REINTERPRET_CAST, Report(), STATIC_CAST, WIDTH_128, WIDTH_16, WIDTH_32, WIDTH_64, WIDTH_8, and zDeserializeTypeWidth().
Referenced by DeserializeNumber(), and isNegativeNumber().
|
static |
Definition at line 1518 of file kern_ubsan.c.
References ASSERT, REINTERPRET_CAST, Report(), WIDTH_128, WIDTH_16, WIDTH_32, WIDTH_64, WIDTH_8, and zDeserializeTypeWidth().
Referenced by DeserializeNumber(), and isShiftExponentTooLarge().
|
static |
Definition at line 1183 of file kern_ubsan.c.
References ASSERT, buf, ISSET, vpanic(), and vprintf().
Referenced by DeserializeNumber(), HandleAlignmentAssumption(), HandleBuiltinUnreachable(), HandleCFIBadType(), HandleDynamicTypeCacheMiss(), HandleFloatCastOverflow(), HandleFunctionTypeMismatch(), HandleInvalidBuiltin(), HandleLoadInvalidValue(), HandleMissingReturn(), HandleNegateOverflow(), HandleNonnullArg(), HandleNonnullReturn(), HandleOutOfBounds(), HandleOverflow(), HandlePointerOverflow(), HandleShiftOutOfBounds(), HandleTypeMismatch(), HandleVlaBoundNotPositive(), llliGetNumber(), llluGetNumber(), and zDeserializeTypeWidth().
|
static |
Definition at line 1290 of file kern_ubsan.c.
References __BIT, __SHIFTOUT, ASSERT, KIND_FLOAT, KIND_INTEGER, CTypeDescriptor::mTypeInfo, CTypeDescriptor::mTypeKind, NUMBER_SIGNED_BIT, and Report().
Referenced by DeserializeNumberSigned(), DeserializeNumberUnsigned(), HandleShiftOutOfBounds(), llliGetNumber(), and llluGetNumber().
intptr_t __ubsan_vptr_type_cache[128] |
Definition at line 279 of file kern_ubsan.c.