FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/asan.h>
#include <sys/kernel.h>
#include <sys/stack.h>
#include <sys/sysctl.h>
#include <machine/asan.h>
#include <machine/atomic.h>
#include <sys/atomic_san.h>
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/bus_san.h>
Go to the source code of this file.
Data Structures | |
struct | __asan_global_source_location |
struct | __asan_global |
Functions | |
__FBSDID ("$FreeBSD$") | |
FEATURE (kasan, "Kernel address sanitizer") | |
static | SYSCTL_NODE (_debug, OID_AUTO, kasan, CTLFLAG_RD|CTLFLAG_MPSAFE, 0, "KASAN options") |
SYSCTL_INT (_debug_kasan, OID_AUTO, panic_on_violation, CTLFLAG_RDTUN, &panic_on_violation, 0, "Panic if an invalid access is detected") | |
void | kasan_shadow_map (vm_offset_t addr, size_t size) |
void | kasan_init (void) |
static const char * | kasan_code_name (uint8_t code) |
static void | kasan_report (unsigned long addr, size_t size, bool write, unsigned long pc, uint8_t code) |
static __always_inline void | kasan_shadow_1byte_markvalid (unsigned long addr) |
static __always_inline void | kasan_shadow_Nbyte_markvalid (const void *addr, size_t size) |
static __always_inline void | kasan_shadow_Nbyte_fill (const void *addr, size_t size, uint8_t code) |
void | kasan_mark (const void *addr, size_t size, size_t redzsize, uint8_t code) |
static __always_inline bool | kasan_shadow_1byte_isvalid (unsigned long addr, uint8_t *code) |
static __always_inline bool | kasan_shadow_2byte_isvalid (unsigned long addr, uint8_t *code) |
static __always_inline bool | kasan_shadow_4byte_isvalid (unsigned long addr, uint8_t *code) |
static __always_inline bool | kasan_shadow_8byte_isvalid (unsigned long addr, uint8_t *code) |
static __always_inline bool | kasan_shadow_Nbyte_isvalid (unsigned long addr, size_t size, uint8_t *code) |
static __always_inline void | kasan_shadow_check (unsigned long addr, size_t size, bool write, unsigned long retaddr) |
void * | kasan_memcpy (void *dst, const void *src, size_t len) |
int | kasan_memcmp (const void *b1, const void *b2, size_t len) |
void * | kasan_memset (void *b, int c, size_t len) |
void * | kasan_memmove (void *dst, const void *src, size_t len) |
size_t | kasan_strlen (const char *str) |
char * | kasan_strcpy (char *dst, const char *src) |
int | kasan_strcmp (const char *s1, const char *s2) |
int | kasan_copyin (const void *uaddr, void *kaddr, size_t len) |
int | kasan_copyinstr (const void *uaddr, void *kaddr, size_t len, size_t *done) |
int | kasan_copyout (const void *kaddr, void *uaddr, size_t len) |
int | kasan_fubyte (volatile const void *base) |
int | kasan_fuword16 (volatile const void *base) |
int | kasan_fueword (volatile const void *base, long *val) |
int | kasan_fueword32 (volatile const void *base, int32_t *val) |
int | kasan_fueword64 (volatile const void *base, int64_t *val) |
int | kasan_subyte (volatile void *base, int byte) |
int | kasan_suword (volatile void *base, long word) |
int | kasan_suword16 (volatile void *base, int word) |
int | kasan_suword32 (volatile void *base, int32_t word) |
int | kasan_suword64 (volatile void *base, int64_t word) |
int | kasan_casueword32 (volatile uint32_t *base, uint32_t oldval, uint32_t *oldvalp, uint32_t newval) |
int | kasan_casueword (volatile u_long *base, u_long oldval, u_long *oldvalp, u_long newval) |
ASAN_ATOMIC_FUNC_ADD (8, uint8_t) | |
ASAN_ATOMIC_FUNC_ADD (16, uint16_t) | |
ASAN_ATOMIC_FUNC_ADD (32, uint32_t) | |
ASAN_ATOMIC_FUNC_ADD (64, uint64_t) | |
ASAN_ATOMIC_FUNC_ADD (int, u_int) | |
ASAN_ATOMIC_FUNC_ADD (long, u_long) | |
ASAN_ATOMIC_FUNC_ADD (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_SUBTRACT (8, uint8_t) | |
ASAN_ATOMIC_FUNC_SUBTRACT (16, uint16_t) | |
ASAN_ATOMIC_FUNC_SUBTRACT (32, uint32_t) | |
ASAN_ATOMIC_FUNC_SUBTRACT (64, uint64_t) | |
ASAN_ATOMIC_FUNC_SUBTRACT (int, u_int) | |
ASAN_ATOMIC_FUNC_SUBTRACT (long, u_long) | |
ASAN_ATOMIC_FUNC_SUBTRACT (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_SET (8, uint8_t) | |
ASAN_ATOMIC_FUNC_SET (16, uint16_t) | |
ASAN_ATOMIC_FUNC_SET (32, uint32_t) | |
ASAN_ATOMIC_FUNC_SET (64, uint64_t) | |
ASAN_ATOMIC_FUNC_SET (int, u_int) | |
ASAN_ATOMIC_FUNC_SET (long, u_long) | |
ASAN_ATOMIC_FUNC_SET (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_CLEAR (8, uint8_t) | |
ASAN_ATOMIC_FUNC_CLEAR (16, uint16_t) | |
ASAN_ATOMIC_FUNC_CLEAR (32, uint32_t) | |
ASAN_ATOMIC_FUNC_CLEAR (64, uint64_t) | |
ASAN_ATOMIC_FUNC_CLEAR (int, u_int) | |
ASAN_ATOMIC_FUNC_CLEAR (long, u_long) | |
ASAN_ATOMIC_FUNC_CLEAR (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_FETCHADD (32, uint32_t) | |
ASAN_ATOMIC_FUNC_FETCHADD (64, uint64_t) | |
ASAN_ATOMIC_FUNC_FETCHADD (int, u_int) | |
ASAN_ATOMIC_FUNC_FETCHADD (long, u_long) | |
ASAN_ATOMIC_FUNC_READANDCLEAR (32, uint32_t) | |
ASAN_ATOMIC_FUNC_READANDCLEAR (64, uint64_t) | |
ASAN_ATOMIC_FUNC_READANDCLEAR (int, u_int) | |
ASAN_ATOMIC_FUNC_READANDCLEAR (long, u_long) | |
ASAN_ATOMIC_FUNC_READANDCLEAR (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_TESTANDCLEAR (32, uint32_t) | |
ASAN_ATOMIC_FUNC_TESTANDCLEAR (64, uint64_t) | |
ASAN_ATOMIC_FUNC_TESTANDCLEAR (int, u_int) | |
ASAN_ATOMIC_FUNC_TESTANDCLEAR (long, u_long) | |
ASAN_ATOMIC_FUNC_TESTANDSET (32, uint32_t) | |
ASAN_ATOMIC_FUNC_TESTANDSET (64, uint64_t) | |
ASAN_ATOMIC_FUNC_TESTANDSET (int, u_int) | |
ASAN_ATOMIC_FUNC_TESTANDSET (long, u_long) | |
ASAN_ATOMIC_FUNC_SWAP (32, uint32_t) | |
ASAN_ATOMIC_FUNC_SWAP (64, uint64_t) | |
ASAN_ATOMIC_FUNC_SWAP (int, u_int) | |
ASAN_ATOMIC_FUNC_SWAP (long, u_long) | |
ASAN_ATOMIC_FUNC_SWAP (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_CMPSET (8, uint8_t) | |
ASAN_ATOMIC_FUNC_CMPSET (16, uint16_t) | |
ASAN_ATOMIC_FUNC_CMPSET (32, uint32_t) | |
ASAN_ATOMIC_FUNC_CMPSET (64, uint64_t) | |
ASAN_ATOMIC_FUNC_CMPSET (int, u_int) | |
ASAN_ATOMIC_FUNC_CMPSET (long, u_long) | |
ASAN_ATOMIC_FUNC_CMPSET (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_FCMPSET (8, uint8_t) | |
ASAN_ATOMIC_FUNC_FCMPSET (16, uint16_t) | |
ASAN_ATOMIC_FUNC_FCMPSET (32, uint32_t) | |
ASAN_ATOMIC_FUNC_FCMPSET (64, uint64_t) | |
ASAN_ATOMIC_FUNC_FCMPSET (int, u_int) | |
ASAN_ATOMIC_FUNC_FCMPSET (long, u_long) | |
ASAN_ATOMIC_FUNC_FCMPSET (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_LOAD (8, uint8_t) | |
ASAN_ATOMIC_FUNC_LOAD (16, uint16_t) | |
ASAN_ATOMIC_FUNC_LOAD (32, uint32_t) | |
ASAN_ATOMIC_FUNC_LOAD (64, uint64_t) | |
ASAN_ATOMIC_FUNC_LOAD (char, u_char) | |
ASAN_ATOMIC_FUNC_LOAD (short, u_short) | |
ASAN_ATOMIC_FUNC_LOAD (int, u_int) | |
ASAN_ATOMIC_FUNC_LOAD (long, u_long) | |
ASAN_ATOMIC_FUNC_LOAD (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_STORE (8, uint8_t) | |
ASAN_ATOMIC_FUNC_STORE (16, uint16_t) | |
ASAN_ATOMIC_FUNC_STORE (32, uint32_t) | |
ASAN_ATOMIC_FUNC_STORE (64, uint64_t) | |
ASAN_ATOMIC_FUNC_STORE (char, u_char) | |
ASAN_ATOMIC_FUNC_STORE (short, u_short) | |
ASAN_ATOMIC_FUNC_STORE (int, u_int) | |
ASAN_ATOMIC_FUNC_STORE (long, u_long) | |
ASAN_ATOMIC_FUNC_STORE (ptr, uintptr_t) | |
ASAN_ATOMIC_FUNC_THREAD_FENCE (acq) | |
ASAN_ATOMIC_FUNC_THREAD_FENCE (rel) | |
ASAN_ATOMIC_FUNC_THREAD_FENCE (acq_rel) | |
ASAN_ATOMIC_FUNC_THREAD_FENCE (seq_cst) | |
void | kasan_atomic_interrupt_fence (void) |
int | kasan_bus_space_map (bus_space_tag_t tag, bus_addr_t hnd, bus_size_t size, int flags, bus_space_handle_t *handlep) |
void | kasan_bus_space_unmap (bus_space_tag_t tag, bus_space_handle_t hnd, bus_size_t size) |
int | kasan_bus_space_subregion (bus_space_tag_t tag, bus_space_handle_t hnd, bus_size_t offset, bus_size_t size, bus_space_handle_t *handlep) |
void | kasan_bus_space_free (bus_space_tag_t tag, bus_space_handle_t hnd, bus_size_t size) |
void | kasan_bus_space_barrier (bus_space_tag_t tag, bus_space_handle_t hnd, bus_size_t offset, bus_size_t size, int flags) |
void | __asan_register_globals (struct __asan_global *, size_t) |
void | __asan_unregister_globals (struct __asan_global *, size_t) |
ASAN_LOAD_STORE (1) | |
ASAN_LOAD_STORE (2) | |
ASAN_LOAD_STORE (4) | |
ASAN_LOAD_STORE (8) | |
ASAN_LOAD_STORE (16) | |
void | __asan_loadN (unsigned long, size_t) |
void | __asan_loadN_noabort (unsigned long, size_t) |
void | __asan_storeN (unsigned long, size_t) |
void | __asan_storeN_noabort (unsigned long, size_t) |
void | __asan_handle_no_return (void) |
ASAN_SET_SHADOW (00) | |
ASAN_SET_SHADOW (f1) | |
ASAN_SET_SHADOW (f2) | |
ASAN_SET_SHADOW (f3) | |
ASAN_SET_SHADOW (f5) | |
ASAN_SET_SHADOW (f8) | |
void | __asan_poison_stack_memory (const void *, size_t) |
void | __asan_unpoison_stack_memory (const void *, size_t) |
void | __asan_alloca_poison (const void *, size_t) |
void | __asan_allocas_unpoison (const void *, const void *) |
void | __asan_poison_memory_region (const void *addr, size_t size) |
void | __asan_unpoison_memory_region (const void *addr, size_t size) |
Variables | |
static int | panic_on_violation = 1 |
static bool kasan_enabled | __read_mostly = false |
#define __RET_ADDR (unsigned long)__builtin_return_address(0) |
Definition at line 63 of file subr_asan.c.
Definition at line 611 of file subr_asan.c.
Definition at line 650 of file subr_asan.c.
Definition at line 703 of file subr_asan.c.
Definition at line 717 of file subr_asan.c.
Definition at line 737 of file subr_asan.c.
Definition at line 637 of file subr_asan.c.
Definition at line 749 of file subr_asan.c.
Definition at line 624 of file subr_asan.c.
#define ADDR_CROSSES_SCALE_BOUNDARY | ( | addr, | |
size | |||
) |
Definition at line 287 of file subr_asan.c.
Definition at line 619 of file subr_asan.c.
Definition at line 658 of file subr_asan.c.
Definition at line 712 of file subr_asan.c.
Definition at line 726 of file subr_asan.c.
Definition at line 663 of file subr_asan.c.
Definition at line 745 of file subr_asan.c.
Definition at line 671 of file subr_asan.c.
Definition at line 645 of file subr_asan.c.
Definition at line 757 of file subr_asan.c.
Definition at line 632 of file subr_asan.c.
Definition at line 695 of file subr_asan.c.
Definition at line 679 of file subr_asan.c.
Definition at line 687 of file subr_asan.c.
#define ASAN_ATOMIC_FUNC_THREAD_FENCE | ( | name | ) |
Definition at line 731 of file subr_asan.c.
#define ASAN_BUS_READ_FUNC | ( | func, | |
width, | |||
type | |||
) |
Definition at line 907 of file subr_asan.c.
#define ASAN_BUS_READ_PTR_FUNC | ( | func, | |
width, | |||
type | |||
) |
Definition at line 915 of file subr_asan.c.
#define ASAN_BUS_SET_FUNC | ( | func, | |
width, | |||
type | |||
) |
Definition at line 990 of file subr_asan.c.
#define ASAN_BUS_WRITE_FUNC | ( | func, | |
width, | |||
type | |||
) |
Definition at line 949 of file subr_asan.c.
#define ASAN_BUS_WRITE_PTR_FUNC | ( | func, | |
width, | |||
type | |||
) |
Definition at line 956 of file subr_asan.c.
#define ASAN_LOAD_STORE | ( | size | ) |
Definition at line 1041 of file subr_asan.c.
#define ASAN_SET_SHADOW | ( | byte | ) |
Definition at line 1105 of file subr_asan.c.
#define KASAN_ALLOCA_SCALE_SIZE 32 |
Definition at line 50 of file subr_asan.c.
#define KASAN_SHADOW_MASK (KASAN_SHADOW_SCALE - 1) |
Definition at line 49 of file subr_asan.c.
#define REPORT | ( | f, | |
... | |||
) |
Definition at line 175 of file subr_asan.c.
#define SAN_RUNTIME |
Definition at line 31 of file subr_asan.c.
void __asan_alloca_poison | ( | const void * | addr, |
size_t | size | ||
) |
Definition at line 1139 of file subr_asan.c.
References addr, KASAN_ALLOCA_SCALE_SIZE, kasan_mark(), and kasan_shadow_Nbyte_fill().
void __asan_allocas_unpoison | ( | const void * | stkbegin, |
const void * | stkend | ||
) |
Definition at line 1156 of file subr_asan.c.
References kasan_shadow_Nbyte_fill().
void __asan_handle_no_return | ( | void | ) |
Definition at line 1100 of file subr_asan.c.
void __asan_loadN | ( | unsigned long | addr, |
size_t | size | ||
) |
Definition at line 1076 of file subr_asan.c.
References __RET_ADDR, addr, and kasan_shadow_check().
void __asan_loadN_noabort | ( | unsigned long | addr, |
size_t | size | ||
) |
Definition at line 1082 of file subr_asan.c.
References __RET_ADDR, addr, and kasan_shadow_check().
void __asan_poison_memory_region | ( | const void * | addr, |
size_t | size | ||
) |
Definition at line 1173 of file subr_asan.c.
void __asan_poison_stack_memory | ( | const void * | addr, |
size_t | size | ||
) |
Definition at line 1123 of file subr_asan.c.
References addr, and kasan_shadow_Nbyte_fill().
void __asan_register_globals | ( | struct __asan_global * | globals, |
size_t | n | ||
) |
Definition at line 1020 of file subr_asan.c.
References kasan_mark().
void __asan_storeN | ( | unsigned long | addr, |
size_t | size | ||
) |
Definition at line 1088 of file subr_asan.c.
References __RET_ADDR, addr, and kasan_shadow_check().
void __asan_storeN_noabort | ( | unsigned long | addr, |
size_t | size | ||
) |
Definition at line 1094 of file subr_asan.c.
References __RET_ADDR, addr, and kasan_shadow_check().
void __asan_unpoison_memory_region | ( | const void * | addr, |
size_t | size | ||
) |
Definition at line 1178 of file subr_asan.c.
void __asan_unpoison_stack_memory | ( | const void * | addr, |
size_t | size | ||
) |
Definition at line 1130 of file subr_asan.c.
References addr, and kasan_shadow_Nbyte_markvalid().
void __asan_unregister_globals | ( | struct __asan_global * | globals, |
size_t | n | ||
) |
Definition at line 1031 of file subr_asan.c.
References kasan_mark().
__FBSDID | ( | "$FreeBSD$" | ) |
ASAN_ATOMIC_FUNC_ADD | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_ADD | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_ADD | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_ADD | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_ADD | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_ADD | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_ADD | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_CLEAR | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_CLEAR | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_CLEAR | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_CLEAR | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_CLEAR | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_CLEAR | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_CLEAR | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_CMPSET | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_CMPSET | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_CMPSET | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_CMPSET | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_CMPSET | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_CMPSET | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_CMPSET | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_FCMPSET | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_FCMPSET | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_FCMPSET | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_FCMPSET | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_FCMPSET | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_FCMPSET | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_FCMPSET | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_FETCHADD | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_FETCHADD | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_FETCHADD | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_FETCHADD | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | char | , |
u_char | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_LOAD | ( | short | , |
u_short | |||
) |
ASAN_ATOMIC_FUNC_READANDCLEAR | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_READANDCLEAR | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_READANDCLEAR | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_READANDCLEAR | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_READANDCLEAR | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_SET | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_SET | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_SET | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_SET | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_SET | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_SET | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_SET | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | char | , |
u_char | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_STORE | ( | short | , |
u_short | |||
) |
ASAN_ATOMIC_FUNC_SUBTRACT | ( | 16 | , |
uint16_t | |||
) |
ASAN_ATOMIC_FUNC_SUBTRACT | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_SUBTRACT | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_SUBTRACT | ( | 8 | , |
uint8_t | |||
) |
ASAN_ATOMIC_FUNC_SUBTRACT | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_SUBTRACT | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_SUBTRACT | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_SWAP | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_SWAP | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_SWAP | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_SWAP | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_SWAP | ( | ptr | , |
uintptr_t | |||
) |
ASAN_ATOMIC_FUNC_TESTANDCLEAR | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_TESTANDCLEAR | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_TESTANDCLEAR | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_TESTANDCLEAR | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_TESTANDSET | ( | 32 | , |
uint32_t | |||
) |
ASAN_ATOMIC_FUNC_TESTANDSET | ( | 64 | , |
uint64_t | |||
) |
ASAN_ATOMIC_FUNC_TESTANDSET | ( | int | , |
u_int | |||
) |
ASAN_ATOMIC_FUNC_TESTANDSET | ( | long | , |
u_long | |||
) |
ASAN_ATOMIC_FUNC_THREAD_FENCE | ( | acq | ) |
ASAN_ATOMIC_FUNC_THREAD_FENCE | ( | acq_rel | ) |
ASAN_ATOMIC_FUNC_THREAD_FENCE | ( | rel | ) |
ASAN_ATOMIC_FUNC_THREAD_FENCE | ( | seq_cst | ) |
ASAN_LOAD_STORE | ( | 1 | ) |
ASAN_LOAD_STORE | ( | 16 | ) |
ASAN_LOAD_STORE | ( | 2 | ) |
ASAN_LOAD_STORE | ( | 4 | ) |
ASAN_LOAD_STORE | ( | 8 | ) |
ASAN_SET_SHADOW | ( | 00 | ) |
ASAN_SET_SHADOW | ( | f1 | ) |
ASAN_SET_SHADOW | ( | f2 | ) |
ASAN_SET_SHADOW | ( | f3 | ) |
ASAN_SET_SHADOW | ( | f5 | ) |
ASAN_SET_SHADOW | ( | f8 | ) |
FEATURE | ( | kasan | , |
"Kernel address sanitizer" | |||
) |
void kasan_atomic_interrupt_fence | ( | void | ) |
Definition at line 862 of file subr_asan.c.
void kasan_bus_space_barrier | ( | bus_space_tag_t | tag, |
bus_space_handle_t | hnd, | ||
bus_size_t | offset, | ||
bus_size_t | size, | ||
int | flags | ||
) |
Definition at line 901 of file subr_asan.c.
References flags.
void kasan_bus_space_free | ( | bus_space_tag_t | tag, |
bus_space_handle_t | hnd, | ||
bus_size_t | size | ||
) |
Definition at line 894 of file subr_asan.c.
int kasan_bus_space_map | ( | bus_space_tag_t | tag, |
bus_addr_t | hnd, | ||
bus_size_t | size, | ||
int | flags, | ||
bus_space_handle_t * | handlep | ||
) |
Definition at line 873 of file subr_asan.c.
References flags.
int kasan_bus_space_subregion | ( | bus_space_tag_t | tag, |
bus_space_handle_t | hnd, | ||
bus_size_t | offset, | ||
bus_size_t | size, | ||
bus_space_handle_t * | handlep | ||
) |
Definition at line 887 of file subr_asan.c.
void kasan_bus_space_unmap | ( | bus_space_tag_t | tag, |
bus_space_handle_t | hnd, | ||
bus_size_t | size | ||
) |
Definition at line 880 of file subr_asan.c.
int kasan_casueword | ( | volatile u_long * | base, |
u_long | oldval, | ||
u_long * | oldvalp, | ||
u_long | newval | ||
) |
Definition at line 598 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_casueword32 | ( | volatile uint32_t * | base, |
uint32_t | oldval, | ||
uint32_t * | oldvalp, | ||
uint32_t | newval | ||
) |
Definition at line 589 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
|
inlinestatic |
Definition at line 143 of file subr_asan.c.
Referenced by kasan_report().
int kasan_copyin | ( | const void * | uaddr, |
void * | kaddr, | ||
size_t | len | ||
) |
Definition at line 503 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_copyinstr | ( | const void * | uaddr, |
void * | kaddr, | ||
size_t | len, | ||
size_t * | done | ||
) |
Definition at line 510 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_copyout | ( | const void * | kaddr, |
void * | uaddr, | ||
size_t | len | ||
) |
Definition at line 517 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_fubyte | ( | volatile const void * | base | ) |
Definition at line 526 of file subr_asan.c.
int kasan_fueword | ( | volatile const void * | base, |
long * | val | ||
) |
Definition at line 538 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_fueword32 | ( | volatile const void * | base, |
int32_t * | val | ||
) |
Definition at line 545 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_fueword64 | ( | volatile const void * | base, |
int64_t * | val | ||
) |
Definition at line 552 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_fuword16 | ( | volatile const void * | base | ) |
Definition at line 532 of file subr_asan.c.
void kasan_init | ( | void | ) |
Definition at line 126 of file subr_asan.c.
void kasan_mark | ( | const void * | addr, |
size_t | size, | ||
size_t | redzsize, | ||
uint8_t | code | ||
) |
Definition at line 248 of file subr_asan.c.
References addr, and KASAN_SHADOW_MASK.
Referenced by __asan_alloca_poison(), __asan_register_globals(), __asan_unregister_globals(), exec_alloc_args_kva(), exec_release_args_kva(), malloc(), malloc_domainset(), malloc_large(), malloc_usable_size(), realloc(), vnode_fini(), and zfree().
int kasan_memcmp | ( | const void * | b1, |
const void * | b2, | ||
size_t | len | ||
) |
Definition at line 431 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
void * kasan_memcpy | ( | void * | dst, |
const void * | src, | ||
size_t | len | ||
) |
Definition at line 423 of file subr_asan.c.
References __RET_ADDR, kasan_shadow_check(), and src.
void * kasan_memmove | ( | void * | dst, |
const void * | src, | ||
size_t | len | ||
) |
Definition at line 446 of file subr_asan.c.
References __RET_ADDR, kasan_shadow_check(), and src.
void * kasan_memset | ( | void * | b, |
int | c, | ||
size_t | len | ||
) |
Definition at line 439 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
|
static |
Definition at line 189 of file subr_asan.c.
References addr, kasan_code_name(), and REPORT.
Referenced by kasan_shadow_check().
|
static |
Definition at line 292 of file subr_asan.c.
References addr, and KASAN_SHADOW_MASK.
Referenced by kasan_shadow_2byte_isvalid(), kasan_shadow_check(), and kasan_shadow_Nbyte_isvalid().
|
static |
Definition at line 198 of file subr_asan.c.
References addr, and KASAN_SHADOW_MASK.
Referenced by kasan_shadow_Nbyte_markvalid().
|
static |
Definition at line 305 of file subr_asan.c.
References addr, ADDR_CROSSES_SCALE_BOUNDARY, kasan_shadow_1byte_isvalid(), and KASAN_SHADOW_MASK.
Referenced by kasan_shadow_4byte_isvalid(), and kasan_shadow_check().
|
static |
Definition at line 325 of file subr_asan.c.
References addr, ADDR_CROSSES_SCALE_BOUNDARY, kasan_shadow_2byte_isvalid(), and KASAN_SHADOW_MASK.
Referenced by kasan_shadow_8byte_isvalid(), and kasan_shadow_check().
|
static |
Definition at line 345 of file subr_asan.c.
References addr, ADDR_CROSSES_SCALE_BOUNDARY, kasan_shadow_4byte_isvalid(), and KASAN_SHADOW_MASK.
Referenced by kasan_shadow_check().
|
static |
Definition at line 378 of file subr_asan.c.
References addr, kasan_report(), kasan_shadow_1byte_isvalid(), kasan_shadow_2byte_isvalid(), kasan_shadow_4byte_isvalid(), kasan_shadow_8byte_isvalid(), kasan_shadow_Nbyte_isvalid(), and panicstr.
Referenced by __asan_loadN(), __asan_loadN_noabort(), __asan_storeN(), __asan_storeN_noabort(), kasan_casueword(), kasan_casueword32(), kasan_copyin(), kasan_copyinstr(), kasan_copyout(), kasan_fueword(), kasan_fueword32(), kasan_fueword64(), kasan_memcmp(), kasan_memcpy(), kasan_memmove(), kasan_memset(), kasan_strcmp(), kasan_strcpy(), and kasan_strlen().
void kasan_shadow_map | ( | vm_offset_t | addr, |
size_t | size | ||
) |
Definition at line 100 of file subr_asan.c.
References addr.
|
static |
Definition at line 217 of file subr_asan.c.
References addr.
Referenced by __asan_alloca_poison(), __asan_allocas_unpoison(), and __asan_poison_stack_memory().
|
static |
Definition at line 365 of file subr_asan.c.
References addr, and kasan_shadow_1byte_isvalid().
Referenced by kasan_shadow_check().
|
static |
Definition at line 207 of file subr_asan.c.
References addr, and kasan_shadow_1byte_markvalid().
Referenced by __asan_unpoison_stack_memory().
int kasan_strcmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 487 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
char * kasan_strcpy | ( | char * | dst, |
const char * | src | ||
) |
Definition at line 470 of file subr_asan.c.
References __RET_ADDR, kasan_shadow_check(), and src.
size_t kasan_strlen | ( | const char * | str | ) |
Definition at line 454 of file subr_asan.c.
References __RET_ADDR, and kasan_shadow_check().
int kasan_subyte | ( | volatile void * | base, |
int | byte | ||
) |
Definition at line 559 of file subr_asan.c.
int kasan_suword | ( | volatile void * | base, |
long | word | ||
) |
Definition at line 565 of file subr_asan.c.
int kasan_suword16 | ( | volatile void * | base, |
int | word | ||
) |
Definition at line 571 of file subr_asan.c.
int kasan_suword32 | ( | volatile void * | base, |
int32_t | word | ||
) |
Definition at line 577 of file subr_asan.c.
int kasan_suword64 | ( | volatile void * | base, |
int64_t | word | ||
) |
Definition at line 583 of file subr_asan.c.
SYSCTL_INT | ( | _debug_kasan | , |
OID_AUTO | , | ||
panic_on_violation | , | ||
CTLFLAG_RDTUN | , | ||
& | panic_on_violation, | ||
0 | , | ||
"Panic if an invalid access is detected" | |||
) |
|
static |
|
static |
Definition at line 95 of file subr_asan.c.
|
static |
Definition at line 90 of file subr_asan.c.