/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_thread_registry.cpp | 140 ThreadContextBase *tctx = QuarantinePop(); in CreateThread() local 141 if (tctx) { in CreateThread() 142 tid = tctx->tid; in CreateThread() 146 tctx = context_factory_(tid); in CreateThread() 147 threads_.push_back(tctx); in CreateThread() 158 CHECK_NE(tctx, 0); in CreateThread() 161 CHECK_EQ(tctx->status, ThreadStatusInvalid); in CreateThread() 173 tctx->SetCreated(user_id, total_threads_++, detached, in CreateThread() 182 ThreadContextBase *tctx = threads_[tid]; in RunCallbackForEachThreadLocked() local 183 if (tctx == 0) in RunCallbackForEachThreadLocked() [all …]
|
H A D | sanitizer_thread_registry.h | 111 typedef void (*ThreadCallback)(ThreadContextBase *tctx, void *arg); 116 typedef bool (*FindThreadCallback)(ThreadContextBase *tctx, void *arg); 160 void QuarantinePush(ThreadContextBase *tctx);
|
/freebsd/sbin/hastd/ |
H A D | proto_tcp.c | 193 struct tcp_ctx *tctx; in tcp_setup_new() local 201 tctx = malloc(sizeof(*tctx)); in tcp_setup_new() 202 if (tctx == NULL) in tcp_setup_new() 206 if ((ret = tcp_addr(addr, PROTO_TCP_DEFAULT_PORT, &tctx->tc_sa)) != 0) { in tcp_setup_new() 207 free(tctx); in tcp_setup_new() 211 PJDLOG_ASSERT(tctx->tc_sa.ss_family != AF_UNSPEC); in tcp_setup_new() 213 tctx->tc_fd = socket(tctx->tc_sa.ss_family, SOCK_STREAM, 0); in tcp_setup_new() 214 if (tctx->tc_fd == -1) { in tcp_setup_new() 216 free(tctx); in tcp_setup_new() 220 PJDLOG_ASSERT(tctx->tc_sa.ss_family != AF_UNSPEC); in tcp_setup_new() [all …]
|
/freebsd/contrib/openbsm/bin/auditdistd/ |
H A D | proto_tcp.c | 199 struct tcp_ctx *tctx; in tcp_setup_new() local 207 tctx = malloc(sizeof(*tctx)); in tcp_setup_new() 208 if (tctx == NULL) in tcp_setup_new() 212 error = tcp_addr(addr, atoi(proto_get("tcp:port")), &tctx->tc_sa); in tcp_setup_new() 214 free(tctx); in tcp_setup_new() 218 PJDLOG_ASSERT(tctx->tc_sa.ss_family != AF_UNSPEC); in tcp_setup_new() 220 tctx->tc_fd = socket(tctx->tc_sa.ss_family, SOCK_STREAM, 0); in tcp_setup_new() 221 if (tctx->tc_fd == -1) { in tcp_setup_new() 223 free(tctx); in tcp_setup_new() 227 PJDLOG_ASSERT(tctx->tc_sa.ss_family != AF_UNSPEC); in tcp_setup_new() [all …]
|
/freebsd/crypto/openssl/providers/implementations/ciphers/ |
H A D | cipher_tdes_default_hw.c | 26 PROV_TDES_CTX *tctx = (PROV_TDES_CTX *)ctx; in ossl_cipher_hw_tdes_ede2_initkey() local 29 tctx->tstream.cbc = NULL; in ossl_cipher_hw_tdes_ede2_initkey() 33 des_t4_key_expand(&deskey[0], &tctx->ks1); in ossl_cipher_hw_tdes_ede2_initkey() 34 des_t4_key_expand(&deskey[1], &tctx->ks2); in ossl_cipher_hw_tdes_ede2_initkey() 35 memcpy(&tctx->ks3, &tctx->ks1, sizeof(tctx->ks1)); in ossl_cipher_hw_tdes_ede2_initkey() 36 tctx->tstream.cbc = ctx->enc ? des_t4_ede3_cbc_encrypt : in ossl_cipher_hw_tdes_ede2_initkey() 42 DES_set_key_unchecked(&deskey[0], &tctx->ks1); in ossl_cipher_hw_tdes_ede2_initkey() 43 DES_set_key_unchecked(&deskey[1], &tctx->ks2); in ossl_cipher_hw_tdes_ede2_initkey() 44 memcpy(&tctx->ks3, &tctx->ks1, sizeof(tctx->ks1)); in ossl_cipher_hw_tdes_ede2_initkey() 51 PROV_TDES_CTX *tctx = (PROV_TDES_CTX *)ctx; in ossl_cipher_hw_tdes_ofb() local [all …]
|
H A D | cipher_tdes_hw.c | 26 PROV_TDES_CTX *tctx = (PROV_TDES_CTX *)ctx; in ossl_cipher_hw_tdes_ede3_initkey() local 29 tctx->tstream.cbc = NULL; in ossl_cipher_hw_tdes_ede3_initkey() 33 des_t4_key_expand(&deskey[0], &tctx->ks1); in ossl_cipher_hw_tdes_ede3_initkey() 34 des_t4_key_expand(&deskey[1], &tctx->ks2); in ossl_cipher_hw_tdes_ede3_initkey() 35 des_t4_key_expand(&deskey[2], &tctx->ks3); in ossl_cipher_hw_tdes_ede3_initkey() 36 tctx->tstream.cbc = ctx->enc ? des_t4_ede3_cbc_encrypt : in ossl_cipher_hw_tdes_ede3_initkey() 42 DES_set_key_unchecked(&deskey[0], &tctx->ks1); in ossl_cipher_hw_tdes_ede3_initkey() 43 DES_set_key_unchecked(&deskey[1], &tctx->ks2); in ossl_cipher_hw_tdes_ede3_initkey() 44 DES_set_key_unchecked(&deskey[2], &tctx->ks3); in ossl_cipher_hw_tdes_ede3_initkey() 61 PROV_TDES_CTX *tctx = (PROV_TDES_CTX *)ctx; in ossl_cipher_hw_tdes_cbc() local [all …]
|
H A D | cipher_desx_hw.c | 30 PROV_TDES_CTX *tctx = (PROV_TDES_CTX *)ctx; in cipher_hw_desx_cbc_initkey() local 33 DES_set_key_unchecked(deskey, &tctx->ks1); in cipher_hw_desx_cbc_initkey() 34 memcpy(&tctx->ks2, &key[8], 8); in cipher_hw_desx_cbc_initkey() 35 memcpy(&tctx->ks3, &key[16], 8); in cipher_hw_desx_cbc_initkey() 53 PROV_TDES_CTX *tctx = (PROV_TDES_CTX *)ctx; in cipher_hw_desx_cbc() local 56 DES_xcbc_encrypt(in, out, (long)MAXCHUNK, &tctx->ks1, in cipher_hw_desx_cbc() 57 (DES_cblock *)ctx->iv, &tctx->ks2, &tctx->ks3, in cipher_hw_desx_cbc() 64 DES_xcbc_encrypt(in, out, (long)inl, &tctx->ks1, in cipher_hw_desx_cbc() 65 (DES_cblock *)ctx->iv, &tctx->ks2, &tctx->ks3, in cipher_hw_desx_cbc()
|
H A D | cipher_tdes_common.c | 26 PROV_TDES_CTX *tctx; in ossl_tdes_newctx() local 31 tctx = OPENSSL_zalloc(sizeof(*tctx)); in ossl_tdes_newctx() 32 if (tctx != NULL) in ossl_tdes_newctx() 33 ossl_cipher_generic_initkey(tctx, kbits, blkbits, ivbits, mode, flags, in ossl_tdes_newctx() 35 return tctx; in ossl_tdes_newctx()
|
/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | prof_inlines_b.h | 50 alloc_ctx_t *alloc_ctx, prof_tctx_t *tctx) { in prof_tctx_set() argument 54 arena_prof_tctx_set(tsdn, ptr, usize, alloc_ctx, tctx); in prof_tctx_set() 58 prof_tctx_reset(tsdn_t *tsdn, const void *ptr, prof_tctx_t *tctx) { in prof_tctx_reset() argument 62 arena_prof_tctx_reset(tsdn, ptr, tctx); in prof_tctx_reset() 167 prof_tctx_t *tctx) { in prof_malloc() argument 172 if (unlikely((uintptr_t)tctx > (uintptr_t)1U)) { in prof_malloc() 173 prof_malloc_sample_object(tsdn, ptr, usize, tctx); in prof_malloc() 181 prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx, in prof_realloc() argument 187 assert(ptr != NULL || (uintptr_t)tctx <= (uintptr_t)1U); in prof_realloc() 199 prof_alloc_rollback(tsd, tctx, true); in prof_realloc() [all …]
|
H A D | prof_externs.h | 46 void prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated); 48 prof_tctx_t *tctx); 50 prof_tctx_t *tctx);
|
/freebsd/contrib/llvm-project/compiler-rt/lib/tsan/rtl/ |
H A D | tsan_rtl_thread.cpp | 35 ThreadContext *tctx; member 41 auto *tctx = static_cast<ThreadContext *>(tctx_base); in CollectThreadLeaks() local 42 if (tctx->detached || tctx->status != ThreadStatusFinished) in CollectThreadLeaks() 45 if (leaks[i].tctx->creation_stack_id == tctx->creation_stack_id) { in CollectThreadLeaks() 50 leaks.PushBack({tctx, 1}); in CollectThreadLeaks() 57 static void ReportIgnoresEnabled(ThreadContext *tctx, IgnoreSet *set) { in ReportIgnoresEnabled() argument 58 if (tctx->tid == kMainTid) { in ReportIgnoresEnabled() 62 " created at:\n", tctx->tid, tctx->name); in ReportIgnoresEnabled() 63 PrintStack(SymbolizeStackId(tctx->creation_stack_id)); in ReportIgnoresEnabled() 78 ReportIgnoresEnabled(thr->tctx, &thr->mop_ignore_set); in ThreadCheckIgnore() [all …]
|
H A D | tsan_rtl_report.cpp | 206 void ScopedReportBase::AddThread(const ThreadContext *tctx, bool suppressable) { in AddThread() argument 208 if ((u32)rep_->threads[i]->id == tctx->tid) in AddThread() 213 rt->id = tctx->tid; in AddThread() 214 rt->os_id = tctx->os_id; in AddThread() 215 rt->running = (tctx->status == ThreadStatusRunning); in AddThread() 216 rt->name = internal_strdup(tctx->name); in AddThread() 217 rt->parent_tid = tctx->parent_tid; in AddThread() 218 rt->thread_type = tctx->thread_type; in AddThread() 220 rt->stack = SymbolizeStackId(tctx->creation_stack_id); in AddThread() 234 ThreadContext *tctx = static_cast<ThreadContext*>(tctx_base); in IsInStackOrTls() local [all …]
|
H A D | tsan_rtl.cpp | 85 Trace* trace = &thr->tctx->trace; in TracePartAlloc() 144 ThreadContext* tctx = (ThreadContext*)ctx->thread_registry.GetThreadLocked( in DoResetImpl() local 150 auto trace = &tctx->trace; in DoResetImpl() 152 bool attached = tctx->thr && tctx->thr->slot; in DoResetImpl() 172 &tctx->thr->trace_pos, in DoResetImpl() 181 if (tctx->thr && !tctx->thr->slot) { in DoResetImpl() 182 atomic_store_relaxed(&tctx->thr->trace_pos, 0); in DoResetImpl() 183 tctx->thr->trace_prev_pc = 0; in DoResetImpl() 327 auto* trace = &thr->tctx->trace; in SlotDetachImpl() 336 thr->tctx->trace.local_head = nullptr; in SlotDetachImpl() [all …]
|
H A D | tsan_debugging.cpp | 221 ThreadContext *tctx = IsThreadStackOrTls(addr, &is_stack); in __tsan_locate_address() 223 if (tctx) { in __tsan_locate_address() 257 ThreadContextBase *tctx = ctx->thread_registry.GetThreadLocked(b->tid); in __tsan_get_alloc_stack() 258 *os_id = tctx->os_id; in __tsan_get_alloc_stack() 219 ThreadContext *tctx = IsThreadStackOrTls(addr, &is_stack); __tsan_locate_address() local 255 ThreadContextBase *tctx = ctx->thread_registry.GetThreadLocked(b->tid); __tsan_get_alloc_stack() local
|
/freebsd/contrib/jemalloc/src/ |
H A D | prof.c | 236 static bool prof_tctx_should_destroy(tsdn_t *tsdn, prof_tctx_t *tctx); 237 static void prof_tctx_destroy(tsd_t *tsd, prof_tctx_t *tctx); 313 prof_alloc_rollback(tsd_t *tsd, prof_tctx_t *tctx, bool updated) { in rb_gen() 331 if ((uintptr_t)tctx > (uintptr_t)1U) { in rb_gen() 332 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen() 333 tctx->prepared = false; in rb_gen() 334 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) { in rb_gen() 335 prof_tctx_destroy(tsd, tctx); in rb_gen() 337 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen() 344 prof_tctx_t *tctx) { in prof_malloc_sample_object() argument [all …]
|
H A D | jemalloc.c | 2120 prof_tctx_t *tctx = prof_alloc_prep( in imalloc_body() local 2124 if (likely((uintptr_t)tctx == (uintptr_t)1U)) { in imalloc_body() 2129 } else if ((uintptr_t)tctx > (uintptr_t)1U) { in imalloc_body() 2142 prof_alloc_rollback(tsd, tctx, true); in imalloc_body() 2145 prof_malloc(tsd_tsdn(tsd), allocation, usize, &alloc_ctx, tctx); in imalloc_body() 2511 prof_tctx_t *tctx, hook_ralloc_args_t *hook_args) { in irealloc_prof_sample() argument 2514 if (tctx == NULL) { in irealloc_prof_sample() 2537 prof_tctx_t *old_tctx, *tctx; in irealloc_prof() local 2541 tctx = prof_alloc_prep(tsd, usize, prof_active, true); in irealloc_prof() 2542 if (unlikely((uintptr_t)tctx != (uintptr_t)1U)) { in irealloc_prof() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/ |
H A D | asan_thread.cpp | 414 AsanThreadContext *tctx = static_cast<AsanThreadContext *>(tctx_base); in ThreadStackContainsAddress() local 415 AsanThread *t = tctx->thread; in ThreadStackContainsAddress() 436 AsanThreadContext *tctx = GetThreadContextByTidLocked(kMainTid); in GetCurrentThread() local 437 if (tctx && ThreadStackContainsAddress(tctx, &context)) { in GetCurrentThread() 438 SetCurrentThread(tctx->thread); in GetCurrentThread() 439 return tctx->thread; in GetCurrentThread() 464 AsanThreadContext *tctx = static_cast<AsanThreadContext *>( in FindThreadByStackAddress() local 467 return tctx ? tctx->thread : nullptr; in FindThreadByStackAddress() 543 [](ThreadContextBase *tctx, void *arg) { in GetThreadExtraStackRangesLocked() argument 545 tctx->os_id, reinterpret_cast<InternalMmapVector<Range> *>(arg)); in GetThreadExtraStackRangesLocked() [all …]
|
/freebsd/sys/nfs/ |
H A D | bootp_subr.c | 258 static unsigned char *bootpc_tag(struct bootpc_tagcontext *tctx, 260 static void bootpc_tag_helper(struct bootpc_tagcontext *tctx, 1252 bootpc_tag_helper(struct bootpc_tagcontext *tctx, in bootpc_tag_helper() argument 1259 if (tctx->badtag != 0 || tctx->badopt != 0) in bootpc_tag_helper() 1272 tctx->badopt = 1; in bootpc_tag_helper() 1277 if (tctx->taglen + len > TAG_MAXLEN) { in bootpc_tag_helper() 1278 tctx->badtag = 1; in bootpc_tag_helper() 1281 tctx->foundopt = 1; in bootpc_tag_helper() 1283 memcpy(tctx->buf + tctx->taglen, in bootpc_tag_helper() 1285 tctx->taglen += len; in bootpc_tag_helper() [all …]
|
/freebsd/contrib/tcpdump/ |
H A D | signature.c | 61 MD5_CTX tctx; in signature_compute_hmac_md5() local 63 MD5_Init(&tctx); in signature_compute_hmac_md5() 64 MD5_Update(&tctx, key, key_len); in signature_compute_hmac_md5() 65 MD5_Final(tk, &tctx); in signature_compute_hmac_md5()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/lsan/ |
H A D | lsan_thread.cpp | 103 [](ThreadContextBase *tctx, void *threads) { in GetRunningThreadsLocked() argument 104 if (tctx->status == ThreadStatusRunning) { in GetRunningThreadsLocked() 106 tctx->os_id); in GetRunningThreadsLocked()
|
H A D | lsan_linux.cpp | 24 void SetCurrentThread(ThreadContextLsanBase *tctx) { current_thread = tctx; } in SetCurrentThread() argument
|
H A D | lsan_fuchsia.cpp | 73 [](ThreadContextBase *tctx, void *arg) { in GetAllThreadAllocatorCachesLocked() argument 74 auto ctx = static_cast<ThreadContext *>(tctx); in GetAllThreadAllocatorCachesLocked()
|
/freebsd/sys/dev/ixl/ |
H A D | ixl_pf_iflib.c | 518 struct i40e_hmc_obj_txq tctx; in ixl_initialize_vsi() local 522 bzero(&tctx, sizeof(tctx)); in ixl_initialize_vsi() 523 tctx.new_context = 1; in ixl_initialize_vsi() 524 tctx.base = (txr->tx_paddr/IXL_TX_CTX_BASE_UNITS); in ixl_initialize_vsi() 525 tctx.qlen = scctx->isc_ntxd[0]; in ixl_initialize_vsi() 526 tctx.fc_ena = 0; /* Disable FCoE */ in ixl_initialize_vsi() 531 tctx.rdylist = vsi->info.qs_handle[0]; in ixl_initialize_vsi() 538 tctx.head_wb_ena = 1; in ixl_initialize_vsi() 539 tctx.head_wb_addr = txr->tx_paddr + in ixl_initialize_vsi() 542 tctx.head_wb_ena = 0; in ixl_initialize_vsi() [all …]
|
/freebsd/contrib/dma/ |
H A D | crypto.c | 239 MD5_CTX tctx; in hmac_md5() local 241 MD5_Init(&tctx); in hmac_md5() 242 MD5_Update(&tctx, key, key_len); in hmac_md5() 243 MD5_Final(tk, &tctx); in hmac_md5()
|
/freebsd/contrib/llvm-project/compiler-rt/lib/memprof/ |
H A D | memprof_stats.cpp | 76 MemprofThreadContext *tctx = static_cast<MemprofThreadContext *>(tctx_base); in MergeThreadStats() local 77 if (MemprofThread *t = tctx->thread) in MergeThreadStats()
|