/optee_os/core/kernel/ |
A D | mutex.c | 63 wq_wait_final(&m->wq, &wqe, m, fname, lineno); in __mutex_lock() 83 __mutex_lock(&m->m, fname, lineno); in __mutex_lock_recursive() 108 wq_wake_next(&m->wq, m, fname, lineno); in __mutex_unlock() 123 __mutex_unlock(&m->m, fname, lineno); in __mutex_unlock_recursive() 169 wq_wake_next(&m->wq, m, fname, lineno); in __mutex_read_unlock() 334 mutex_destroy(&m->m); in mutex_destroy_recursive() 365 m = cv->m; in cv_signal() 368 if (m) in cv_signal() 408 if (cv->m && cv->m != m) in __condvar_wait() 411 cv->m = m; in __condvar_wait() [all …]
|
A D | mutex_lockdep.h | 13 void mutex_lock_check(struct mutex *m); 15 void mutex_trylock_check(struct mutex *m); 17 void mutex_unlock_check(struct mutex *m); 19 void mutex_destroy_check(struct mutex *m); 23 static inline void mutex_lock_check(struct mutex *m __unused) in mutex_lock_check() 26 static inline void mutex_trylock_check(struct mutex *m __unused) in mutex_trylock_check() 29 static inline void mutex_unlock_check(struct mutex *m __unused) in mutex_unlock_check() 32 static inline void mutex_destroy_check(struct mutex *m __unused) in mutex_destroy_check()
|
A D | mutex_lockdep.c | 37 void mutex_lock_check(struct mutex *m) in mutex_lock_check() argument 43 lockdep_lock_acquire(&graph, &owned[thread], (uintptr_t)m); in mutex_lock_check() 47 void mutex_trylock_check(struct mutex *m) in mutex_trylock_check() argument 53 lockdep_lock_tryacquire(&graph, &owned[thread], (uintptr_t)m); in mutex_trylock_check() 57 void mutex_unlock_check(struct mutex *m) in mutex_unlock_check() argument 63 lockdep_lock_release(&owned[thread], (uintptr_t)m); in mutex_unlock_check() 67 void mutex_destroy_check(struct mutex *m) in mutex_destroy_check() argument 71 lockdep_lock_destroy(&graph, (uintptr_t)m); in mutex_destroy_check()
|
/optee_os/core/include/kernel/ |
A D | mutex.h | 32 void mutex_init(struct mutex *m); 41 #define mutex_unlock(m) mutex_unlock_debug((m), __FILE__, __LINE__) argument 44 #define mutex_lock(m) mutex_lock_debug((m), __FILE__, __LINE__) argument 47 #define mutex_trylock(m) mutex_trylock_debug((m), __FILE__, __LINE__) argument 50 #define mutex_read_unlock(m) mutex_read_unlock_debug((m), __FILE__, __LINE__) argument 53 #define mutex_read_lock(m) mutex_read_lock_debug((m), __FILE__, __LINE__) argument 56 #define mutex_read_trylock(m) mutex_read_trylock_debug((m), __FILE__, __LINE__) argument 60 #define mutex_unlock_recursive(m) mutex_unlock_recursive_debug((m), __FILE__, \ argument 65 #define mutex_lock_recursive(m) mutex_lock_recursive_debug((m), __FILE__, \ argument 81 struct mutex *m; member [all …]
|
/optee_os/core/mm/ |
A D | mobj.c | 292 free(m); in mobj_mm_free() 317 struct mobj_mm *m = calloc(1, sizeof(*m)); in mobj_mm_alloc() local 319 if (!m) in mobj_mm_alloc() 402 free(m); in mobj_shm_free() 436 m = calloc(1, sizeof(*m)); in mobj_shm_alloc() 437 if (!m) in mobj_shm_alloc() 494 vm_rem_rwmem(&m->utc->uctx, mobj, m->va); in mobj_seccpy_shm_free() 532 m = calloc(1, sizeof(*m)); in mobj_seccpy_shm_alloc() 533 if (!m) in mobj_seccpy_shm_alloc() 578 m = calloc(1, sizeof(*m)); in mobj_with_fobj_alloc() [all …]
|
/optee_os/lib/libmbedtls/mbedtls/library/ |
A D | arc4.c | 66 unsigned char *m; in mbedtls_arc4_setup() local 70 m = ctx->m; in mbedtls_arc4_setup() 73 m[i] = (unsigned char) i; in mbedtls_arc4_setup() 81 a = m[i]; in mbedtls_arc4_setup() 83 m[i] = m[j]; in mbedtls_arc4_setup() 84 m[j] = (unsigned char) a; in mbedtls_arc4_setup() 96 unsigned char *m; in mbedtls_arc4_crypt() local 100 m = ctx->m; in mbedtls_arc4_crypt() 104 x = ( x + 1 ) & 0xFF; a = m[x]; in mbedtls_arc4_crypt() 107 m[x] = (unsigned char) b; in mbedtls_arc4_crypt() [all …]
|
A D | ecp.c | 2613 b = mbedtls_mpi_get_bit( m, i ); in ecp_mul_mxz() 2672 ECP_VALIDATE_RET( m != NULL ); in mbedtls_ecp_mul_restartable() 2735 ECP_VALIDATE_RET( m != NULL ); in mbedtls_ecp_mul() 2803 if( mbedtls_mpi_cmp_int( m, 0 ) == 0 ) in mbedtls_ecp_mul_shortcuts() 2846 ECP_VALIDATE_RET( m != NULL ); in mbedtls_ecp_muladd_restartable() 2934 ECP_VALIDATE_RET( m != NULL ); in mbedtls_ecp_muladd() 3432 (void) m; in self_test_adjust_exponent() 3444 mbedtls_mpi *m, in self_test_point() argument 3501 mbedtls_mpi m; in mbedtls_ecp_self_test() local 3535 mbedtls_mpi_init( &m ); in mbedtls_ecp_self_test() [all …]
|
/optee_os/lib/libutee/ |
A D | base64.c | 79 size_t m = 0; in _base64_dec() local 96 if (b && m < *blen) in _base64_dec() 97 b[m] = byte | (idx >> 4); in _base64_dec() 98 m++; in _base64_dec() 103 if (b && m < *blen) in _base64_dec() 105 m++; in _base64_dec() 110 if (b && m < *blen) in _base64_dec() 111 b[m] = byte | idx; in _base64_dec() 112 m++; in _base64_dec() 124 ret = (!m && !*blen) || (b && (m <= *blen)); in _base64_dec() [all …]
|
/optee_os/core/lib/libtomcrypt/src/pk/ed25519/ |
A D | ed25519_verify.c | 32 unsigned char* m; in ed25519_verify() local 49 m = XMALLOC(mlen); in ed25519_verify() 50 if (m == NULL) return CRYPT_MEM; in ed25519_verify() 52 XMEMCPY(m, sig, siglen); in ed25519_verify() 53 XMEMCPY(m + siglen, msg, msglen); in ed25519_verify() 56 m, &mlen, in ed25519_verify() 57 m, mlen, in ed25519_verify() 61 zeromem(m, mlen); in ed25519_verify() 63 XFREE(m); in ed25519_verify()
|
/optee_os/core/lib/libtomcrypt/src/mac/poly1305/ |
A D | poly1305_test.c | 28 char m[] = "Cryptographic Forum Research Group"; in poly1305_test() 29 unsigned long len = 16, mlen = strlen(m); in poly1305_test() 36 if ((err = poly1305_process(&st, (unsigned char*)m, 5)) != CRYPT_OK) return err; in poly1305_test() 37 if ((err = poly1305_process(&st, (unsigned char*)m + 5, 4)) != CRYPT_OK) return err; in poly1305_test() 38 if ((err = poly1305_process(&st, (unsigned char*)m + 9, 3)) != CRYPT_OK) return err; in poly1305_test() 39 if ((err = poly1305_process(&st, (unsigned char*)m + 12, 2)) != CRYPT_OK) return err; in poly1305_test() 40 if ((err = poly1305_process(&st, (unsigned char*)m + 14, 1)) != CRYPT_OK) return err; in poly1305_test() 41 if ((err = poly1305_process(&st, (unsigned char*)m + 15, mlen - 15)) != CRYPT_OK) return err; in poly1305_test() 46 if ((err = poly1305_process(&st, (unsigned char*)m, mlen)) != CRYPT_OK) return err; in poly1305_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/ |
A D | chacha20poly1305_test.c | 35 unsigned long mlen = strlen(m); in chacha20poly1305_test() 48 …if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m, 25, ct)) != CRYPT_OK) re… in chacha20poly1305_test() 49 …if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 25, 10, ct + 25)) != CRYPT_O… in chacha20poly1305_test() 50 …if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 35, 35, ct + 35)) != CRYPT_O… in chacha20poly1305_test() 51 …if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 70, 5, ct + 70)) != CRYPT_O… in chacha20poly1305_test() 52 …if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m + 75, 5, ct + 75)) != CRYPT_O… in chacha20poly1305_test() 69 if (compare_testvector(pt, mlen, m, mlen, "DEC-PT", 3) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() 74 …err = chacha20poly1305_memory(k, sizeof(k), i12, sizeof(i12), aad, sizeof(aad), (unsigned char *)m, in chacha20poly1305_test() 84 if (compare_testvector(pt, mlen, m, mlen, "DEC-PT2", 3) != 0) return CRYPT_FAIL_TESTVECTOR; in chacha20poly1305_test() 112 if ((err = chacha20poly1305_encrypt(&st1, (unsigned char *)m, mlen, ct)) != CRYPT_OK) return err; in chacha20poly1305_test() [all …]
|
/optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ecc_recover_key.c | 38 void *p, *m, *a, *b; in ecc_recover_key() local 61 m = key->dp.prime; in ecc_recover_key() 177 …if ((err = mp_mulmod(p, x, m, x)) != CRYPT_OK) … in ecc_recover_key() 181 …if ((err = mp_mulmod(t1, x, m, t1)) != CRYPT_OK) … in ecc_recover_key() 183 …if ((err = mp_mulmod(a, x, m, t2)) != CRYPT_OK) … in ecc_recover_key() 188 …if ((err = mp_sqrtmod_prime(t1, m, t2)) != CRYPT_OK) … in ecc_recover_key() 193 …if ((err = mp_mod(t2, m, mR->y)) != CRYPT_OK) … in ecc_recover_key() 196 …if ((err = mp_submod(m, t2, m, mR->y)) != CRYPT_OK) … in ecc_recover_key() 219 …if ((err = mp_montgomery_setup(m, &mp)) != CRYPT_OK) … in ecc_recover_key() 222 if (mp_cmp(a_plus3, m) != LTC_MP_EQ) { in ecc_recover_key() [all …]
|
A D | ecc_verify_hash.c | 36 void *r, *s, *v, *w, *u1, *u2, *e, *p, *m, *a, *a_plus3; in ecc_verify_hash_ex() local 57 m = key->dp.prime; in ecc_verify_hash_ex() 168 …if ((err = mp_montgomery_setup(m, &mp)) != CRYPT_OK) … in ecc_verify_hash_ex() 171 if (mp_cmp(a_plus3, m) != LTC_MP_EQ) { in ecc_verify_hash_ex() 173 …if ((err = mp_montgomery_normalization(mu, m)) != CRYPT_OK) … in ecc_verify_hash_ex() 174 …if ((err = mp_mulmod(a, mu, m, ma)) != CRYPT_OK) … in ecc_verify_hash_ex() 179 …if ((err = ltc_mp.ecc_ptmul(u1, mG, mG, a, m, 0)) != CRYPT_OK) … in ecc_verify_hash_ex() 180 …if ((err = ltc_mp.ecc_ptmul(u2, mQ, mQ, a, m, 0)) != CRYPT_OK) … in ecc_verify_hash_ex() 183 …if ((err = ltc_mp.ecc_ptadd(mQ, mG, mG, ma, m, mp)) != CRYPT_OK) … in ecc_verify_hash_ex() 186 …if ((err = ltc_mp.ecc_map(mG, m, mp)) != CRYPT_OK) … in ecc_verify_hash_ex() [all …]
|
/optee_os/lib/libutils/isoc/newlib/ |
A D | memset.c | 75 _PTR _DEFUN(memset, (m, c, n), _PTR m _AND int c _AND size_t n) 77 char *s = (char *)m; 90 return m; 128 return m;
|
/optee_os/core/lib/libtomcrypt/src/pk/ec25519/ |
A D | tweetnacl.c | 79 gf m,t; in pack25519() local 85 m[0]=t[0]-0xffed; in pack25519() 87 m[i]=t[i]-0xffff-((m[i-1]>>16)&1); in pack25519() 88 m[i-1]&=0xffff; in pack25519() 90 m[15]=t[15]-0x7fff-((m[14]>>16)&1); in pack25519() 91 b=(m[15]>>16)&1; in pack25519() 92 m[14]&=0xffff; in pack25519() 93 sel25519(t,m,1-b); in pack25519() 467 XMEMMOVE(m,sm,smlen); in tweetnacl_crypto_sign_open() 481 zeromem(m, smlen); in tweetnacl_crypto_sign_open() [all …]
|
/optee_os/core/arch/arm/mm/ |
A D | core_mmu.c | 310 if (pa == m[n].addr && size == m[n].size) { in carve_out_phys_mem() 313 memmove(m + n, m + n + 1, sizeof(*m) * (*nelems - n)); in carve_out_phys_mem() 314 m = nex_realloc(m, sizeof(*m) * *nelems); in carve_out_phys_mem() 315 if (!m) in carve_out_phys_mem() 325 m = nex_realloc(m, sizeof(*m) * (*nelems + 1)); in carve_out_phys_mem() 326 if (!m) in carve_out_phys_mem() 329 memmove(m + n + 1, m + n, sizeof(*m) * (*nelems - n)); in carve_out_phys_mem() 331 m[n].size = pa - m[n].addr; in carve_out_phys_mem() 332 m[n + 1].size -= size + m[n].size; in carve_out_phys_mem() 377 qsort(m, num_elems, sizeof(*m), cmp_pmem_by_addr); in core_mmu_set_discovered_nsec_ddr() [all …]
|
A D | sp_mem.c | 47 struct mobj_sp *m = NULL; in sp_mem_new_mobj() local 54 m = calloc(1, s); in sp_mem_new_mobj() 55 if (!m) in sp_mem_new_mobj() 58 m->mobj.ops = &mobj_sp_ops; in sp_mem_new_mobj() 59 m->mobj.size = pages * SMALL_PAGE_SIZE; in sp_mem_new_mobj() 60 m->mobj.phys_granule = SMALL_PAGE_SIZE; in sp_mem_new_mobj() 62 refcount_set(&m->mobj.refc, 1); in sp_mem_new_mobj() 63 return &m->mobj; in sp_mem_new_mobj()
|
/optee_os/core/pta/tests/ |
A D | aes_perf.c | 139 unsigned int m = 0; in do_update() local 147 for (m = 0; m < sz / unit_size; m++) { in do_update() 148 res = update_func(ctx, mode, in + m * unit_size, in do_update() 149 unit_size, out + m * unit_size); in do_update() 154 res = update_func(ctx, mode, in + m * unit_size, in do_update() 155 sz % unit_size, out + m * unit_size); in do_update()
|
/optee_os/core/lib/libtomcrypt/src/mac/pmac/ |
A D | pmac_init.c | 47 int poly, x, y, m, err; in pmac_init() local 99 m = pmac->Ls[x-1][0] >> 7; in pmac_init() 105 if (m == 1) { in pmac_init() 113 m = L[pmac->block_len-1] & 1; in pmac_init() 121 if (m == 1) { in pmac_init()
|
/optee_os/core/lib/libtomcrypt/src/modes/xts/ |
A D | xts_decrypt.c | 64 unsigned long i, m, mo, lim; in xts_decrypt() local 79 m = ptlen >> 4; in xts_decrypt() 83 if (m == 0) { in xts_decrypt() 88 lim = m; in xts_decrypt() 90 lim = m - 1; in xts_decrypt()
|
A D | xts_encrypt.c | 66 unsigned long i, m, mo, lim; in xts_encrypt() local 81 m = ptlen >> 4; in xts_encrypt() 85 if (m == 0) { in xts_encrypt() 90 lim = m; in xts_encrypt() 92 lim = m - 1; in xts_encrypt()
|
/optee_os/core/lib/libtomcrypt/src/encauth/ocb/ |
A D | ocb_init.c | 49 int poly, x, y, m, err; in ocb_init() local 97 m = ocb->Ls[x-1][0] >> 7; in ocb_init() 103 if (m == 1) { in ocb_init() 111 m = ocb->L[ocb->block_len-1] & 1; in ocb_init() 119 if (m == 1) { in ocb_init()
|
/optee_os/core/arch/arm/crypto/ |
A D | sha1_armv8a_ce_a32.S | 86 add_update m, 0, k2, 10, 11, 8, 9 87 add_update m, 1, k2, 11, 8, 9, 10 88 add_update m, 0, k2, 8, 9, 10, 11 89 add_update m, 1, k2, 9, 10, 11, 8 90 add_update m, 0, k3, 10, 11, 8, 9
|
A D | sha1_armv8a_ce_a64.S | 96 add_update m, ev, k2, 10, 11, 8, 9 97 add_update m, od, k2, 11, 8, 9, 10 98 add_update m, ev, k2, 8, 9, 10, 11 99 add_update m, od, k2, 9, 10, 11, 8 100 add_update m, ev, k3, 10, 11, 8, 9
|
/optee_os/lib/libutils/isoc/arch/arm/softfloat/source/include/ |
A D | primitiveTypes.h | 66 #define indexMultiword( total, m, n ) (n) argument 77 #define indexMultiword( total, m, n ) ((total) - 1 - (m)) argument
|