Home
last modified time | relevance | path

Searched refs:new (Results 1 – 25 of 1978) sorted by relevance

12345678910>>...80

/Linux-v4.19/kernel/
Dcred.c209 struct cred *new; in cred_alloc_blank() local
211 new = kmem_cache_zalloc(cred_jar, GFP_KERNEL); in cred_alloc_blank()
212 if (!new) in cred_alloc_blank()
215 atomic_set(&new->usage, 1); in cred_alloc_blank()
217 new->magic = CRED_MAGIC; in cred_alloc_blank()
220 if (security_cred_alloc_blank(new, GFP_KERNEL) < 0) in cred_alloc_blank()
223 return new; in cred_alloc_blank()
226 abort_creds(new); in cred_alloc_blank()
248 struct cred *new; in prepare_creds() local
252 new = kmem_cache_alloc(cred_jar, GFP_KERNEL); in prepare_creds()
[all …]
/Linux-v4.19/fs/nfsd/
Dauth.c25 struct cred *new; in nfsd_setuser() local
33 new = prepare_creds(); in nfsd_setuser()
34 if (!new) in nfsd_setuser()
37 new->fsuid = rqstp->rq_cred.cr_uid; in nfsd_setuser()
38 new->fsgid = rqstp->rq_cred.cr_gid; in nfsd_setuser()
43 new->fsuid = exp->ex_anon_uid; in nfsd_setuser()
44 new->fsgid = exp->ex_anon_gid; in nfsd_setuser()
49 if (uid_eq(new->fsuid, GLOBAL_ROOT_UID)) in nfsd_setuser()
50 new->fsuid = exp->ex_anon_uid; in nfsd_setuser()
51 if (gid_eq(new->fsgid, GLOBAL_ROOT_GID)) in nfsd_setuser()
[all …]
/Linux-v4.19/security/
Dcommoncap.c248 int cap_capset(struct cred *new, in cap_capset() argument
275 new->cap_effective = *effective; in cap_capset()
276 new->cap_inheritable = *inheritable; in cap_capset()
277 new->cap_permitted = *permitted; in cap_capset()
283 new->cap_ambient = cap_intersect(new->cap_ambient, in cap_capset()
286 if (WARN_ON(!cap_ambient_invariant_ok(new))) in cap_capset()
540 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() local
558 new->cap_permitted.cap[i] = in bprm_caps_from_vfs_caps()
559 (new->cap_bset.cap[i] & permitted) | in bprm_caps_from_vfs_caps()
560 (new->cap_inheritable.cap[i] & inheritable); in bprm_caps_from_vfs_caps()
[all …]
/Linux-v4.19/lib/
Drefcount.c63 unsigned int new, val = atomic_read(&r->refs); in refcount_add_not_zero_checked() local
72 new = val + i; in refcount_add_not_zero_checked()
73 if (new < val) in refcount_add_not_zero_checked()
74 new = UINT_MAX; in refcount_add_not_zero_checked()
76 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_add_not_zero_checked()
78 WARN_ONCE(new == UINT_MAX, "refcount_t: saturated; leaking memory.\n"); in refcount_add_not_zero_checked()
120 unsigned int new, val = atomic_read(&r->refs); in refcount_inc_not_zero_checked() local
123 new = val + 1; in refcount_inc_not_zero_checked()
128 if (unlikely(!new)) in refcount_inc_not_zero_checked()
131 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_inc_not_zero_checked()
[all …]
Derrseq.c78 errseq_t new; in errseq_set() local
81 new = (old & ~(MAX_ERRNO|ERRSEQ_SEEN)) | -err; in errseq_set()
85 new += ERRSEQ_CTR_INC; in errseq_set()
88 if (new == old) { in errseq_set()
89 cur = new; in errseq_set()
94 cur = cmpxchg(eseq, old, new); in errseq_set()
100 if (likely(cur == old || cur == new)) in errseq_set()
177 errseq_t old, new; in errseq_check_and_advance() local
198 new = old | ERRSEQ_SEEN; in errseq_check_and_advance()
199 if (new != old) in errseq_check_and_advance()
[all …]
/Linux-v4.19/security/apparmor/
Dtask.c49 struct cred *new; in aa_replace_current_label() local
59 new = prepare_creds(); in aa_replace_current_label()
60 if (!new) in aa_replace_current_label()
83 aa_put_label(cred_label(new)); in aa_replace_current_label()
84 cred_label(new) = label; in aa_replace_current_label()
86 commit_creds(new); in aa_replace_current_label()
122 struct cred *new; in aa_set_current_hat() local
124 new = prepare_creds(); in aa_set_current_hat()
125 if (!new) in aa_set_current_hat()
131 ctx->previous = cred_label(new); in aa_set_current_hat()
[all …]
Ddomain.c556 struct aa_label *new = NULL; in x_to_label() local
571 new = x_table_lookup(profile, xindex, lookupname); in x_to_label()
579 new = find_attach(bprm, ns, &profile->base.profiles, in x_to_label()
583 new = find_attach(bprm, ns, &ns->base.profiles, in x_to_label()
589 if (!new) { in x_to_label()
596 new = aa_get_newest_label(&profile->label); in x_to_label()
598 new = aa_get_newest_label(ns_unconfined(profile->ns)); in x_to_label()
603 if (new && stack) { in x_to_label()
605 struct aa_label *base = new; in x_to_label()
607 new = aa_label_parse(base, stack, GFP_ATOMIC, true, false); in x_to_label()
[all …]
Dlabel.c66 struct aa_proxy *new; in aa_alloc_proxy() local
68 new = kzalloc(sizeof(struct aa_proxy), gfp); in aa_alloc_proxy()
69 if (new) { in aa_alloc_proxy()
70 kref_init(&new->count); in aa_alloc_proxy()
71 rcu_assign_pointer(new->label, aa_get_label(label)); in aa_alloc_proxy()
73 return new; in aa_alloc_proxy()
77 void __aa_proxy_redirect(struct aa_label *orig, struct aa_label *new) in __aa_proxy_redirect() argument
82 AA_BUG(!new); in __aa_proxy_redirect()
87 rcu_assign_pointer(orig->proxy->label, aa_get_label(new)); in __aa_proxy_redirect()
92 static void __proxy_share(struct aa_label *old, struct aa_label *new) in __proxy_share() argument
[all …]
/Linux-v4.19/tools/testing/selftests/rtc/
Dsetdate.c33 struct rtc_time new, current; in main() local
56 sscanf(date, "%d-%d-%d", &new.tm_mday, &new.tm_mon, &new.tm_year); in main()
57 new.tm_mon -= 1; in main()
58 new.tm_year -= 1900; in main()
59 sscanf(time, "%d:%d:%d", &new.tm_hour, &new.tm_min, &new.tm_sec); in main()
62 new.tm_mday, new.tm_mon + 1, new.tm_year + 1900, in main()
63 new.tm_hour, new.tm_min, new.tm_sec); in main()
66 retval = ioctl(fd, RTC_SET_TIME, &new); in main()
/Linux-v4.19/security/keys/
Dprocess_keys.c138 int install_thread_keyring_to_cred(struct cred *new) in install_thread_keyring_to_cred() argument
142 if (new->thread_keyring) in install_thread_keyring_to_cred()
145 keyring = keyring_alloc("_tid", new->uid, new->gid, new, in install_thread_keyring_to_cred()
152 new->thread_keyring = keyring; in install_thread_keyring_to_cred()
163 struct cred *new; in install_thread_keyring() local
166 new = prepare_creds(); in install_thread_keyring()
167 if (!new) in install_thread_keyring()
170 ret = install_thread_keyring_to_cred(new); in install_thread_keyring()
172 abort_creds(new); in install_thread_keyring()
176 return commit_creds(new); in install_thread_keyring()
[all …]
/Linux-v4.19/arch/sparc/kernel/
Dftrace.c26 static int ftrace_modify_code(unsigned long ip, u32 old, u32 new) in ftrace_modify_code() argument
47 : [new] "0" (new), [old] "r" (old), [ip] "r" (ip) in ftrace_modify_code()
50 if (replaced != old && replaced != new) in ftrace_modify_code()
59 u32 old, new; in ftrace_make_nop() local
62 new = ftrace_nop; in ftrace_make_nop()
63 return ftrace_modify_code(ip, old, new); in ftrace_make_nop()
69 u32 old, new; in ftrace_make_call() local
72 new = ftrace_call_replace(ip, addr); in ftrace_make_call()
73 return ftrace_modify_code(ip, old, new); in ftrace_make_call()
79 u32 old, new; in ftrace_update_ftrace_func() local
[all …]
/Linux-v4.19/arch/powerpc/include/asm/
Dcmpxchg.h44 u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \
52 new <<= bitoff; \
70 : "r" (p), "r" (old), "r" (new), "r" (prev_mask) \
223 __cmpxchg_u32(volatile unsigned int *p, unsigned long old, unsigned long new) in __cmpxchg_u32() argument
239 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32()
247 unsigned long new) in __cmpxchg_u32_local() argument
261 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_local()
268 __cmpxchg_u32_relaxed(u32 *p, unsigned long old, unsigned long new) in __cmpxchg_u32_relaxed() argument
281 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u32_relaxed()
296 __cmpxchg_u32_acquire(u32 *p, unsigned long old, unsigned long new) in __cmpxchg_u32_acquire() argument
[all …]
/Linux-v4.19/arch/arm/kernel/
Dftrace.c105 unsigned long new, bool validate) in ftrace_modify_code() argument
111 new = __opcode_to_mem_thumb32(new); in ftrace_modify_code()
114 new = __opcode_to_mem_arm(new); in ftrace_modify_code()
125 if (probe_kernel_write((void *)pc, &new, MCOUNT_INSN_SIZE)) in ftrace_modify_code()
136 unsigned long new; in ftrace_update_ftrace_func() local
140 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func()
142 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func()
147 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func()
149 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func()
156 new = ftrace_call_replace(pc, (unsigned long)func); in ftrace_update_ftrace_func()
[all …]
/Linux-v4.19/fs/nfs/blocklayout/
Dextent_tree.c137 struct pnfs_block_extent *new, bool merge_ok) in __ext_tree_insert() argument
146 if (new->be_f_offset < be->be_f_offset) { in __ext_tree_insert()
147 if (merge_ok && ext_can_merge(new, be)) { in __ext_tree_insert()
148 be->be_f_offset = new->be_f_offset; in __ext_tree_insert()
150 be->be_v_offset = new->be_v_offset; in __ext_tree_insert()
151 be->be_length += new->be_length; in __ext_tree_insert()
156 } else if (new->be_f_offset >= ext_f_end(be)) { in __ext_tree_insert()
157 if (merge_ok && ext_can_merge(be, new)) { in __ext_tree_insert()
158 be->be_length += new->be_length; in __ext_tree_insert()
168 rb_link_node(&new->be_node, parent, p); in __ext_tree_insert()
[all …]
/Linux-v4.19/drivers/mtd/
Dmtd_blkdevs.c332 int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) in add_mtd_blktrans_dev() argument
334 struct mtd_blktrans_ops *tr = new->tr; in add_mtd_blktrans_dev()
347 if (new->devnum == -1) { in add_mtd_blktrans_dev()
351 new->devnum = last_devnum+1; in add_mtd_blktrans_dev()
352 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev()
355 } else if (d->devnum == new->devnum) { in add_mtd_blktrans_dev()
359 } else if (d->devnum > new->devnum) { in add_mtd_blktrans_dev()
361 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev()
368 if (new->devnum == -1) in add_mtd_blktrans_dev()
369 new->devnum = last_devnum+1; in add_mtd_blktrans_dev()
[all …]
/Linux-v4.19/fs/
Dsignalfd.c84 struct signalfd_siginfo new; in signalfd_copyinfo() local
91 memset(&new, 0, sizeof(new)); in signalfd_copyinfo()
97 new.ssi_signo = kinfo->si_signo; in signalfd_copyinfo()
98 new.ssi_errno = kinfo->si_errno; in signalfd_copyinfo()
99 new.ssi_code = kinfo->si_code; in signalfd_copyinfo()
102 new.ssi_pid = kinfo->si_pid; in signalfd_copyinfo()
103 new.ssi_uid = kinfo->si_uid; in signalfd_copyinfo()
106 new.ssi_tid = kinfo->si_tid; in signalfd_copyinfo()
107 new.ssi_overrun = kinfo->si_overrun; in signalfd_copyinfo()
108 new.ssi_ptr = (long) kinfo->si_ptr; in signalfd_copyinfo()
[all …]
/Linux-v4.19/arch/s390/mm/
Dpageattr.c57 static void pgt_set(unsigned long *old, unsigned long new, unsigned long addr, in pgt_set() argument
76 crdte(*old, new, table, dtt, addr, S390_lowcore.kernel_asce); in pgt_set()
78 cspg(old, *old, new); in pgt_set()
80 csp((unsigned int *)old + 1, *old, new); in pgt_set()
87 pte_t *ptep, new; in walk_pte_level() local
91 new = *ptep; in walk_pte_level()
92 if (pte_none(new)) in walk_pte_level()
95 new = pte_wrprotect(new); in walk_pte_level()
97 new = pte_mkwrite(pte_mkdirty(new)); in walk_pte_level()
99 pte_val(new) |= _PAGE_NOEXEC; in walk_pte_level()
[all …]
/Linux-v4.19/arch/sparc/include/asm/
Dcmpxchg_64.h11 __cmpxchg_u32(volatile int *m, int old, int new) in __cmpxchg_u32() argument
14 : "=&r" (new) in __cmpxchg_u32()
15 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u32()
18 return new; in __cmpxchg_u32()
110 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument
113 : "=&r" (new) in __cmpxchg_u64()
114 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u64()
117 return new; in __cmpxchg_u64()
126 __cmpxchg_u8(volatile unsigned char *m, unsigned char old, unsigned char new) in __cmpxchg_u8() argument
136 new32 = (load32 & ~mask) | (new << bit_shift); in __cmpxchg_u8()
[all …]
/Linux-v4.19/arch/alpha/include/asm/
Dxchg.h129 ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new) in ____cmpxchg() argument
148 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg()
149 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg()
155 ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new) in ____cmpxchg() argument
174 : "=&r" (prev), "=&r" (new), "=&r" (tmp), "=&r" (cmp), "=&r" (addr64) in ____cmpxchg()
175 : "r" ((long)m), "Ir" (old), "1" (new) : "memory"); in ____cmpxchg()
181 ____cmpxchg(_u32, volatile int *m, int old, int new) in ____cmpxchg() argument
197 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg()
203 ____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new) in ____cmpxchg() argument
219 : "r"((long) old), "r"(new), "m"(*m) : "memory"); in ____cmpxchg()
[all …]
/Linux-v4.19/arch/x86/include/asm/
Dcmpxchg.h85 #define __raw_cmpxchg(ptr, old, new, size, lock) \ argument
89 __typeof__(*(ptr)) __new = (new); \
133 #define __cmpxchg(ptr, old, new, size) \ argument
134 __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)
136 #define __sync_cmpxchg(ptr, old, new, size) \ argument
137 __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")
139 #define __cmpxchg_local(ptr, old, new, size) \ argument
140 __raw_cmpxchg((ptr), (old), (new), (size), "")
148 #define arch_cmpxchg(ptr, old, new) \ argument
149 __cmpxchg(ptr, old, new, sizeof(*(ptr)))
[all …]
/Linux-v4.19/drivers/mtd/devices/
Dphram.c92 struct phram_mtd_list *new; in register_device() local
95 new = kzalloc(sizeof(*new), GFP_KERNEL); in register_device()
96 if (!new) in register_device()
100 new->mtd.priv = ioremap(start, len); in register_device()
101 if (!new->mtd.priv) { in register_device()
107 new->mtd.name = name; in register_device()
108 new->mtd.size = len; in register_device()
109 new->mtd.flags = MTD_CAP_RAM; in register_device()
110 new->mtd._erase = phram_erase; in register_device()
111 new->mtd._point = phram_point; in register_device()
[all …]
/Linux-v4.19/fs/cachefiles/
Dsecurity.c22 struct cred *new; in cachefiles_get_security_ID() local
27 new = prepare_kernel_cred(current); in cachefiles_get_security_ID()
28 if (!new) { in cachefiles_get_security_ID()
34 ret = set_security_override_from_ctx(new, cache->secctx); in cachefiles_get_security_ID()
36 put_cred(new); in cachefiles_get_security_ID()
43 cache->cache_cred = new; in cachefiles_get_security_ID()
83 struct cred *new; in cachefiles_determine_cache_security() local
90 new = prepare_creds(); in cachefiles_determine_cache_security()
91 if (!new) in cachefiles_determine_cache_security()
98 ret = set_create_files_as(new, d_backing_inode(root)); in cachefiles_determine_cache_security()
[all …]
/Linux-v4.19/arch/ia64/include/asm/
Dbitops.h42 __u32 bit, old, new; in set_bit() local
51 new = old | bit; in set_bit()
52 } while (cmpxchg_acq(m, old, new) != old); in set_bit()
83 __u32 mask, old, new; in clear_bit() local
92 new = old & mask; in clear_bit()
93 } while (cmpxchg_acq(m, old, new) != old); in clear_bit()
107 __u32 mask, old, new; in clear_bit_unlock() local
116 new = old & mask; in clear_bit_unlock()
117 } while (cmpxchg_rel(m, old, new) != old); in clear_bit_unlock()
132 __u32 const new = *m & ~(1 << (nr & 31)); in __clear_bit_unlock() local
[all …]
/Linux-v4.19/arch/arm64/include/asm/
Datomic.h88 #define atomic_xchg_relaxed(v, new) xchg_relaxed(&((v)->counter), (new)) argument
89 #define atomic_xchg_acquire(v, new) xchg_acquire(&((v)->counter), (new)) argument
90 #define atomic_xchg_release(v, new) xchg_release(&((v)->counter), (new)) argument
91 #define atomic_xchg(v, new) xchg(&((v)->counter), (new)) argument
93 #define atomic_cmpxchg_relaxed(v, old, new) \ argument
94 cmpxchg_relaxed(&((v)->counter), (old), (new))
95 #define atomic_cmpxchg_acquire(v, old, new) \ argument
96 cmpxchg_acquire(&((v)->counter), (old), (new))
97 #define atomic_cmpxchg_release(v, old, new) \ argument
98 cmpxchg_release(&((v)->counter), (old), (new))
[all …]
/Linux-v4.19/net/netfilter/
Dnf_conntrack_extend.c47 struct nf_ct_ext *old, *new; in nf_ct_ext_add() local
60 oldlen = sizeof(*new); in nf_ct_ext_add()
76 new = __krealloc(old, alloc, gfp); in nf_ct_ext_add()
77 if (!new) in nf_ct_ext_add()
81 memset(new->offset, 0, sizeof(new->offset)); in nf_ct_ext_add()
82 ct->ext = new; in nf_ct_ext_add()
83 } else if (new != old) { in nf_ct_ext_add()
85 rcu_assign_pointer(ct->ext, new); in nf_ct_ext_add()
88 new->offset[id] = newoff; in nf_ct_ext_add()
89 new->len = newlen; in nf_ct_ext_add()
[all …]

12345678910>>...80