Lines Matching defs:addr

26  * relationship between dso and its __cfi_check addr while loading a dso. CFI shadow is an array which stores shadow
31 * - invalid(0) : the target addr does not belongs to any loaded dso.
34 * The valid shadow value records the distance from the end of a LIBRARY_ALIGNMENT memory range to the __cfi_check addr
46 * 0x40000 __cfi_check addr = 0x42000 0x80000 0xA0000 0xC0000
63 * - First align up the target addr with LIBRARY_ALIGNMENT to locate the corresponding shadow value.
64 * - Then calculate the __cfi_check addr.
66 * In order for the algorithm to work well, the start addr of each dso should be aligned with LIBRARY_ALIGNMENT. */
89 /* Start addr of the CFI shadow */
129 static inline uintptr_t addr_to_offset(uintptr_t addr, int bits)
131 /* Convert addr to CFI shadow offset.
133 return (addr >> bits) << 1;
146 static int addr_in_dso(struct dso *dso, size_t addr)
154 if (addr - base - ph->p_vaddr < ph->p_memsz)
160 static int addr_in_kernel_mapped_dso(size_t addr)
162 if (addr_in_dso(pldso, addr)) {
166 if (addr_in_dso(r_app, addr)) {
170 if (addr_in_dso(r_vdso, addr)) {
180 uintptr_t addr = (uintptr_t)func_ptr;
181 uintptr_t aligned_addr = ALIGN_DOWN(addr, shadow_alignment) + shadow_alignment;
203 uintptr_t addr = (uintptr_t)func_ptr & ((1ULL << 56) - 1);
206 uintptr_t addr = func_ptr;
210 uintptr_t offset = addr_to_offset(addr, shadow_granularity);
219 "addr:%{public}p lr:%{public}p.\n",
262 LD_LOGD("[CFI] [%{public}s] cfi_check addr[%{public}p]!\n", __FUNCTION__,
387 LD_LOGD("[CFI] [%{public}s] the cfi_shadow_start addr is %{public}p!\n", __FUNCTION__, cfi_shadow_start);