Lines Matching refs:uctx
39 struct user_mode_ctx *uctx = get_current_uctx(); in check_user_access() local
41 if (!uctx) in check_user_access()
44 return vm_check_access_rights(uctx, flags, (vaddr_t)uaddr, len); in check_user_access()
132 struct user_mode_ctx *uctx = get_current_uctx(); in bb_alloc() local
136 if (uctx && !ADD_OVERFLOW(uctx->bbuf_offs, len, &offs) && in bb_alloc()
137 offs <= uctx->bbuf_size) { in bb_alloc()
138 bb = maybe_tag_bb(uctx->bbuf + uctx->bbuf_offs, len); in bb_alloc()
139 uctx->bbuf_offs = ROUNDUP(offs, BB_ALIGNMENT); in bb_alloc()
144 static void bb_free_helper(struct user_mode_ctx *uctx, vaddr_t bb, size_t len) in bb_free_helper() argument
146 vaddr_t bbuf = (vaddr_t)uctx->bbuf; in bb_free_helper()
157 if (prev_offs + ROUNDUP(len, BB_ALIGNMENT) == uctx->bbuf_offs) in bb_free_helper()
158 uctx->bbuf_offs = prev_offs; in bb_free_helper()
164 struct user_mode_ctx *uctx = get_current_uctx(); in bb_free() local
166 if (uctx) in bb_free()
167 bb_free_helper(uctx, memtag_strip_tag_vaddr(bb), len); in bb_free()
179 struct user_mode_ctx *uctx = get_current_uctx(); in bb_reset() local
181 if (uctx) { in bb_reset()
186 maybe_untag_bb(uctx->bbuf, uctx->bbuf_offs); in bb_reset()
188 uctx->bbuf_offs = 0; in bb_reset()