Home
last modified time | relevance | path

Searched refs:mode (Results 1 – 25 of 201) sorted by relevance

123456789

/xnu-11215/osfmk/corecrypto/
H A Dcccbc.c47 return mode->size; in cccbc_context_size()
55 return mode->block_size; in cccbc_block_size()
59 cccbc_init(const struct ccmode_cbc *mode, in cccbc_init() argument
66 return mode->init(mode, ctx, key_len, key); in cccbc_init()
136 iv_len = mode->block_size; in cccbc_one_shot()
139 return cccbc_one_shot_explicit(mode, in cccbc_one_shot()
142 mode->block_size, in cccbc_one_shot()
173 cccbc_ctx_decl(mode->size, ctx); in cccbc_one_shot_explicit()
175 rc = mode->init(mode, ctx, key_len, key); in cccbc_one_shot_explicit()
180 cc_clear(mode->block_size, iv_ctx); in cccbc_one_shot_explicit()
[all …]
H A Dccgcm.c47 return mode->size; in ccgcm_context_size()
55 return mode->block_size; in ccgcm_block_size()
59 ccgcm_init(const struct ccmode_gcm *mode, in ccgcm_init() argument
66 return mode->init(mode, ctx, key_nbytes, key); in ccgcm_init()
123 ccgcm_aad(const struct ccmode_gcm *mode, in ccgcm_aad() argument
141 return mode->gmac(ctx, nbytes, in); in ccgcm_gmac()
172 return mode->reset(ctx); in ccgcm_reset()
189 ccgcm_ctx_decl(mode->size, ctx); in ccgcm_one_shot()
197 ccgcm_ctx_clear(mode->size, ctx); in ccgcm_one_shot()
245 ccgcm_ctx_decl(mode->size, ctx); in ccgcm_one_shot_legacy()
[all …]
/xnu-11215/EXTERNAL_HEADERS/corecrypto/
H A Dccmode.h32 size_t ccecb_block_size(const struct ccmode_ecb *mode);
39 int ccecb_one_shot(const struct ccmode_ecb *mode,
89 int cccbc_one_shot(const struct ccmode_cbc *mode,
122 int cccfb_one_shot(const struct ccmode_cfb *mode,
145 int cccfb8_one_shot(const struct ccmode_cfb8 *mode,
172 int ccctr_one_shot(const struct ccmode_ctr *mode,
195 int ccofb_one_shot(const struct ccmode_ofb *mode,
294 int ccxts_one_shot(const struct ccmode_xts *mode,
591 int ccgcm_one_shot(const struct ccmode_gcm *mode,
671 int ccccm_set_iv(const struct ccmode_ccm *mode,
[all …]
H A Dccmode_siv.h26 size_t ccsiv_context_size(const struct ccmode_siv *mode);
36 size_t ccsiv_block_size(const struct ccmode_siv *mode);
47 size_t ccsiv_ciphertext_size(const struct ccmode_siv *mode, size_t plaintext_size);
59 size_t ccsiv_plaintext_size(const struct ccmode_siv *mode, size_t ciphertext_size);
91 int ccsiv_init(const struct ccmode_siv *mode, ccsiv_ctx *ctx,
108 int ccsiv_set_nonce(const struct ccmode_siv *mode, ccsiv_ctx *ctx,
121 int ccsiv_aad(const struct ccmode_siv *mode, ccsiv_ctx *ctx,
151 int ccsiv_crypt(const struct ccmode_siv *mode, ccsiv_ctx *ctx,
161 int ccsiv_reset(const struct ccmode_siv *mode, ccsiv_ctx *ctx);
195 int ccsiv_one_shot(const struct ccmode_siv *mode,
H A Dccmode_siv_hmac.h31 size_t ccsiv_hmac_context_size(const struct ccmode_siv_hmac *mode);
39 size_t ccsiv_hmac_block_size(const struct ccmode_siv_hmac *mode);
81 int ccsiv_hmac_init(const struct ccmode_siv_hmac *mode, ccsiv_hmac_ctx *ctx, size_t key_byte_len, c…
98 int ccsiv_hmac_aad(const struct ccmode_siv_hmac *mode, ccsiv_hmac_ctx *ctx, size_t nbytes, const ui…
113 int ccsiv_hmac_set_nonce(const struct ccmode_siv_hmac *mode, ccsiv_hmac_ctx *ctx, size_t nbytes, co…
137 int ccsiv_hmac_crypt(const struct ccmode_siv_hmac *mode, ccsiv_hmac_ctx *ctx, size_t nbytes, const …
146 int ccsiv_hmac_reset(const struct ccmode_siv_hmac *mode, ccsiv_hmac_ctx *ctx);
167 int ccsiv_hmac_one_shot(const struct ccmode_siv_hmac *mode,
/xnu-11215/bsd/netinet/
H A Dip_ecn.c80 ip_ecn_ingress(int mode, u_int8_t *outer, const u_int8_t *inner) in ip_ecn_ingress() argument
87 switch (mode) { in ip_ecn_ingress()
102 ip_ecn_egress(int mode, const u_int8_t *outer, u_int8_t *inner) in ip_ecn_egress() argument
108 switch (mode) { in ip_ecn_egress()
136 ip_ecn_ingress(mode, &outer8, &inner8); in ip6_ecn_ingress()
152 if (ip_ecn_egress(mode, &outer8, &inner8) == 0) { in ip6_ecn_egress()
173 ip_ecn_ingress(mode, &outer8, tos); in ip46_ecn_ingress()
183 ip46_ecn_egress(int mode, const u_int32_t *outer, u_int8_t *tos) in ip46_ecn_egress() argument
192 return ip_ecn_egress(mode, &outer8, tos); in ip46_ecn_egress()
209 ip_ecn_ingress(mode, outer, &inner8); in ip64_ecn_ingress()
[all …]
/xnu-11215/osfmk/arm64/sptm/pmap/
H A Dpmap_internal.h191 mode = PMAP_LOCK_EXCLUSIVE; in pmap_assert_locked()
194 switch (mode) { in pmap_assert_locked()
239 pmap_lock(pmap_t pmap, pmap_lock_mode_t mode) in pmap_lock() argument
242 mode = PMAP_LOCK_EXCLUSIVE; in pmap_lock()
245 switch (mode) { in pmap_lock()
286 pmap_try_lock(pmap_t pmap, pmap_lock_mode_t mode) in pmap_try_lock() argument
291 mode = PMAP_LOCK_EXCLUSIVE; in pmap_try_lock()
294 switch (mode) { in pmap_try_lock()
339 pmap_unlock(pmap_t pmap, pmap_lock_mode_t mode) in pmap_unlock() argument
342 mode = PMAP_LOCK_EXCLUSIVE; in pmap_unlock()
[all …]
/xnu-11215/libsyscall/wrappers/unix03/
H A Dfchmod.c32 extern int __fchmod(int fd, mode_t mode);
41 fchmod(int fd, mode_t mode) in fchmod() argument
43 int res = __fchmod(fd, mode); in fchmod()
45 if (res >= 0 || errno != EPERM || (mode & (S_ISUID | S_ISGID)) == 0) { in fchmod()
48 if (mode & S_ISGID) { in fchmod()
49 res = __fchmod(fd, mode ^ S_ISGID); in fchmod()
54 if (mode & S_ISUID) { in fchmod()
55 res = __fchmod(fd, mode ^ S_ISUID); in fchmod()
60 if ((mode & (S_ISUID | S_ISGID)) == (S_ISUID | S_ISGID)) { in fchmod()
61 res = __fchmod(fd, mode ^ (S_ISUID | S_ISGID)); in fchmod()
H A Dchmod.c32 extern int __chmod(const char *path, mode_t mode);
41 chmod(const char *path, mode_t mode) in chmod() argument
43 int res = __chmod(path, mode); in chmod()
45 if (res >= 0 || errno != EPERM || (mode & (S_ISUID | S_ISGID)) == 0) { in chmod()
48 if (mode & S_ISGID) { in chmod()
49 res = __chmod(path, mode ^ S_ISGID); in chmod()
54 if (mode & S_ISUID) { in chmod()
55 res = __chmod(path, mode ^ S_ISUID); in chmod()
60 if ((mode & (S_ISUID | S_ISGID)) == (S_ISUID | S_ISGID)) { in chmod()
61 res = __chmod(path, mode ^ (S_ISUID | S_ISGID)); in chmod()
/xnu-11215/libsyscall/wrappers/
H A Dopen-base.c44 int __open(const char *path, int oflag, mode_t mode);
45 int __openat(int fd, const char *path, int oflag, mode_t mode);
59 int __open_nocancel(const char *path, int oflag, mode_t mode);
60 int __openat_nocancel(int fd, const char *path, int oflag, mode_t mode);
83 mode_t mode = 0; in open() local
89 mode = va_arg(ap, int); in open()
93 opened_fd = OPEN_SYSCALL(path, oflag, mode); in open()
126 mode_t mode = 0; in openat() local
132 mode = va_arg(ap, int); in openat()
136 opened_fd = OPENAT_SYSCALL(fd, path, oflag, mode); in openat()
[all …]
H A Dopen_dprotected_np.c30 int __open_dprotected_np(const char* path, int flags, int class, int dpflags, int mode);
31 int __openat_dprotected_np(int fd, const char* path, int flags, int class, int dpflags, int mode, i…
36 int mode = 0; in open_dprotected_np() local
46 mode = va_arg(ap, int); in open_dprotected_np()
49 return __open_dprotected_np(path, flags, class, dpflags, mode); in open_dprotected_np()
55 int mode = 0; in openat_dprotected_np() local
65 mode = va_arg(ap, int); in openat_dprotected_np()
68 return __openat_dprotected_np(fd, path, flags, class, dpflags, mode, AUTH_OPEN_NOAUTHFD); in openat_dprotected_np()
H A Dguarded_open_np.c30 const guardid_t *guard, u_int guardflags, int flags, int mode);
36 int mode = 0; in guarded_open_np() local
41 mode = va_arg(ap, int); in guarded_open_np()
44 return __guarded_open_np(path, guard, guardflags, flags, mode); in guarded_open_np()
H A Dguarded_open_dprotected_np.c30 const guardid_t *guard, u_int guardflags, int flags, int dpclass, int dpflags, int mode);
36 int mode = 0; in guarded_open_dprotected_np() local
41 mode = va_arg(ap, int); in guarded_open_dprotected_np()
44 return __guarded_open_dprotected_np(path, guard, guardflags, flags, dpclass, dpflags, mode); in guarded_open_dprotected_np()
/xnu-11215/libkern/zlib/
H A Dinflate.c141 state->mode = HEAD; in inflateReset()
605 if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ in inflate()
611 switch (state->mode) { in inflate()
682 state->mode = OS; in inflate()
987 state->mode = LEN; in inflate()
1118 state->mode = LEN; in inflate()
1182 state->mode = MEM; in inflate()
1227 if (state->mode == DICT) { in inflateSetDictionary()
1236 state->mode = MEM; in inflateSetDictionary()
1317 state->mode = SYNC; in inflateSync()
[all …]
H A Dinfback.c294 state->mode = TYPE; in inflateBack()
306 switch (state->mode) { in inflateBack()
336 state->mode = BAD; in inflateBack()
347 state->mode = BAD; in inflateBack()
370 state->mode = TYPE; in inflateBack()
385 state->mode = BAD; in inflateBack()
407 state->mode = BAD; in inflateBack()
473 state->mode = BAD; in inflateBack()
482 state->mode = BAD; in inflateBack()
486 state->mode = LEN; in inflateBack()
[all …]
H A Dzutil.h149 # define F_OPEN(name, mode) \ argument
150 fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
170 # define fdopen(fd,mode) NULL /* No fdopen() */ argument
190 # define fdopen(fd,mode) NULL /* No fdopen() */ argument
197 # define fdopen(fd,mode) NULL /* No fdopen() */ argument
215 # define F_OPEN(name, mode) fopen((name), (mode)) argument
/xnu-11215/osfmk/arm/pmap/
H A Dpmap_internal.h223 pmap_assert_locked(__unused pmap_t pmap, __unused pmap_lock_mode_t mode) in pmap_assert_locked() argument
226 switch (mode) { in pmap_assert_locked()
261 pmap_lock(pmap_t pmap, pmap_lock_mode_t mode) in pmap_lock() argument
267 switch (mode) { in pmap_lock()
275 panic("%s: Unknown pmap_lock_mode. pmap=%p, mode=%d", __func__, pmap, mode); in pmap_lock()
290 pmap_lock_preempt(pmap_t pmap, pmap_lock_mode_t mode) in pmap_lock_preempt() argument
311 switch (mode) { in pmap_lock_preempt()
342 pmap_try_lock(pmap_t pmap, pmap_lock_mode_t mode) in pmap_try_lock() argument
350 switch (mode) { in pmap_try_lock()
401 pmap_unlock(pmap_t pmap, pmap_lock_mode_t mode) in pmap_unlock() argument
[all …]
/xnu-11215/tools/tests/superpages/
H A Dmeasure_tlbs.c22 testt(boolean_t superpages, int mode, int write, int kb) in testt() argument
46 switch (mode) { in testt()
115 int mode; in main() local
120 for (mode = 0; mode <= 2; mode++) { in main()
122 time1 = testt(TRUE, mode, 0, kb); // read super in main()
123 time2 = testt(FALSE, mode, 0, kb); // read base in main()
124 time3 = testt(TRUE, mode, 1, kb); // write super in main()
125 time4 = testt(FALSE, mode, 1, kb); // write base in main()
/xnu-11215/bsd/dev/i386/
H A Ddis_tables.c2703 if ((mode == 0 && r_m == 6) || mode == 2) in dtrace_get_operand()
2742 if (mode == 1) in dtrace_get_operand()
2763 if (mode == 0) in dtrace_get_operand()
2770 if (mode == 0) { in dtrace_get_operand()
3890 mode = REG_ONLY; in dtrace_disx86()
4021 if (mode == 3) { in dtrace_disx86()
4053 if (mode == 3) { in dtrace_disx86()
4091 if (mode == 3) { in dtrace_disx86()
4124 if (mode == 3) { in dtrace_disx86()
4147 if (mode == 3) in dtrace_disx86()
[all …]
/xnu-11215/osfmk/kern/
H A Dlock_mtx.c425 lck_ilk_mode_t mode) in lck_mtx_ilk_lock_contended() argument
444 if (mode != LCK_MTX_MODE_SPIN) { in lck_mtx_ilk_lock_contended()
502 if (mode == LCK_ILK_MODE_FROM_AS) { in lck_mtx_ilk_lock_contended()
507 if (mode != LCK_MTX_MODE_SPIN) { in lck_mtx_ilk_lock_contended()
824 if (mode == LCK_MTX_MODE_SLEEPABLE) { in lck_mtx_lock_contended()
953 if (mode != LCK_MTX_MODE_SLEEPABLE) { in lck_mtx_lock_contended()
958 if (mode == LCK_MTX_MODE_SLEEPABLE) { in lck_mtx_lock_contended()
981 lck_mtx_mode_t mode) in lck_mtx_lock_slow() argument
993 (mode == LCK_MTX_MODE_SPIN)); in lck_mtx_lock_slow()
1008 mode != LCK_MTX_MODE_SLEEPABLE, in lck_mtx_lock_slow()
[all …]
/xnu-11215/bsd/kern/
H A Dsysv_shm.c284 shmseg->u.shm_perm.mode = SHMSEG_FREE; in shm_deallocate_segment()
676 shmseg->u.shm_perm.mode = in shmctl()
678 (inbuf.shm_perm.mode & ACCESSPERMS); in shmctl()
688 shmseg->u.shm_perm.mode |= SHMSEG_REMOVED; in shmctl()
722 shmseg->u.shm_perm.mode |= SHMSEG_WANTED; in shmget_existing()
738 if ((shmseg->u.shm_perm.mode & mode) != mode) { in shmget_existing()
844 shmseg->u.shm_perm.mode = (shmseg->u.shm_perm.mode & SHMSEG_WANTED) | in shmget_allocate_segment()
862 shmseg->u.shm_perm.mode &= ~SHMSEG_WANTED; in shmget_allocate_segment()
894 int segnum, mode, error; in shmget() local
905 mode = uap->shmflg & ACCESSPERMS; in shmget()
[all …]
H A Dbsd_stubs.c335 devsw_lock_find_locked(dev_t dev, int mode) in devsw_lock_find_locked() argument
340 if (lock->dl_dev == dev && lock->dl_mode == mode) { in devsw_lock_find_locked()
349 devsw_lock(dev_t dev, int mode) in devsw_lock() argument
354 assert(mode == S_IFCHR || mode == S_IFBLK); in devsw_lock()
359 newlock->dl_mode = mode; in devsw_lock()
363 curlock = devsw_lock_find_locked(dev, mode); in devsw_lock()
384 devsw_unlock(dev_t dev, int mode) in devsw_unlock() argument
393 lock = devsw_lock_find_locked(dev, mode); in devsw_unlock()
/xnu-11215/tests/
H A Dpoll_select_kevent_paired_fds.c91 union mode { union
120 static void drive_kq(bool reading, union mode mode, enum fd_pair fd_pair,
226 drive_kq(bool reading, union mode mode, enum fd_pair fd_pair, int fd) in drive_kq() argument
254 which_kevent = mode.rd; in drive_kq()
256 if (mode.wr == KEVENT_INCREMENTAL_WRITE) { in drive_kq()
263 T_ASSERT_FAIL("unexpected mode: %d", mode.wr); in drive_kq()
286 T_ASSERT_FAIL("unexpected mode: %d", reading ? mode.rd : mode.wr); in drive_kq()
319 T_ASSERT_FAIL("unexpected mode: %d", reading ? mode.rd : mode.wr); in drive_kq()
377 union mode mode = { .wr = shared.wr_mode }; in write_to_fd() local
561 switch (mode) { in read_from_fd()
[all …]
/xnu-11215/bsd/skywalk/nexus/netif/
H A Dnx_netif_poll.c51 nx_netif_rxpoll_set_mode(struct ifnet *ifp, ifnet_model_t mode) in nx_netif_rxpoll_set_mode() argument
65 if_name(ifp), (mode == IFNET_MODEL_INPUT_POLL_ON) ? in nx_netif_rxpoll_set_mode()
69 switch (mode) { in nx_netif_rxpoll_set_mode()
105 ifnet_model_t mode; in netif_rxpoll_compat_update_rxpoll_stats() local
126 mode = ifp->if_poll_mode; in netif_rxpoll_compat_update_rxpoll_stats()
210 mode = IFNET_MODEL_INPUT_POLL_OFF; in netif_rxpoll_compat_update_rxpoll_stats()
214 mode = IFNET_MODEL_INPUT_POLL_ON; in netif_rxpoll_compat_update_rxpoll_stats()
217 if (mode != ifp->if_poll_mode) { in netif_rxpoll_compat_update_rxpoll_stats()
218 ifp->if_poll_mode = mode; in netif_rxpoll_compat_update_rxpoll_stats()
243 nx_netif_rxpoll_set_mode(ifp, mode); in netif_rxpoll_compat_update_rxpoll_stats()
[all …]
/xnu-11215/san/coverage/
H A Dkcov_ksancov.c327 switch (dev->mode) { in kcov_ksancov_trace_pc()
490 d->mode = KS_MODE_NONE; in create_dev()
501 if (d->mode == KS_MODE_TRACE && d->trace) { in free_dev()
563 switch (d->mode) { in ksancov_map()
671 if (d->mode != KS_MODE_NONE) { in ksancov_trace_alloc()
679 if (mode == KS_MODE_TRACE) { in ksancov_trace_alloc()
684 } else if (mode == KS_MODE_STKSIZE) { in ksancov_trace_alloc()
709 d->mode = mode; in ksancov_trace_alloc()
717 if (d->mode != KS_MODE_NONE) { in ksancov_counters_alloc()
739 d->mode = KS_MODE_COUNTERS; in ksancov_counters_alloc()
[all …]

123456789