/linux-6.6.21/kernel/ |
D | cred.c | 170 struct cred *new; in cred_alloc_blank() local 172 new = kmem_cache_zalloc(cred_jar, GFP_KERNEL); in cred_alloc_blank() 173 if (!new) in cred_alloc_blank() 176 atomic_long_set(&new->usage, 1); in cred_alloc_blank() 177 if (security_cred_alloc_blank(new, GFP_KERNEL_ACCOUNT) < 0) in cred_alloc_blank() 180 return new; in cred_alloc_blank() 183 abort_creds(new); in cred_alloc_blank() 205 struct cred *new; in prepare_creds() local 207 new = kmem_cache_alloc(cred_jar, GFP_KERNEL); in prepare_creds() 208 if (!new) in prepare_creds() [all …]
|
/linux-6.6.21/arch/s390/mm/ |
D | pageattr.c | 59 static void pgt_set(unsigned long *old, unsigned long new, unsigned long addr, in pgt_set() argument 78 crdte(*old, new, table, dtt, addr, S390_lowcore.kernel_asce); in pgt_set() 80 cspg(old, *old, new); in pgt_set() 82 csp((unsigned int *)old + 1, *old, new); in pgt_set() 89 pte_t *ptep, new; in walk_pte_level() local 95 new = *ptep; in walk_pte_level() 96 if (pte_none(new)) in walk_pte_level() 99 new = pte_wrprotect(new); in walk_pte_level() 101 new = pte_mkwrite_novma(pte_mkdirty(new)); in walk_pte_level() 103 new = set_pte_bit(new, __pgprot(_PAGE_NOEXEC)); in walk_pte_level() [all …]
|
/linux-6.6.21/fs/nfsd/ |
D | auth.c | 25 struct cred *new; in nfsd_setuser() local 31 new = prepare_creds(); in nfsd_setuser() 32 if (!new) in nfsd_setuser() 35 new->fsuid = rqstp->rq_cred.cr_uid; in nfsd_setuser() 36 new->fsgid = rqstp->rq_cred.cr_gid; in nfsd_setuser() 41 new->fsuid = exp->ex_anon_uid; in nfsd_setuser() 42 new->fsgid = exp->ex_anon_gid; in nfsd_setuser() 47 if (uid_eq(new->fsuid, GLOBAL_ROOT_UID)) in nfsd_setuser() 48 new->fsuid = exp->ex_anon_uid; in nfsd_setuser() 49 if (gid_eq(new->fsgid, GLOBAL_ROOT_GID)) in nfsd_setuser() [all …]
|
/linux-6.6.21/security/ |
D | commoncap.c | 242 int cap_capset(struct cred *new, in cap_capset() argument 269 new->cap_effective = *effective; in cap_capset() 270 new->cap_inheritable = *inheritable; in cap_capset() 271 new->cap_permitted = *permitted; in cap_capset() 277 new->cap_ambient = cap_intersect(new->cap_ambient, in cap_capset() 280 if (WARN_ON(!cap_ambient_invariant_ok(new))) in cap_capset() 591 struct cred *new = bprm->cred; in bprm_caps_from_vfs_caps() local 604 new->cap_permitted.val = in bprm_caps_from_vfs_caps() 605 (new->cap_bset.val & caps->permitted.val) | in bprm_caps_from_vfs_caps() 606 (new->cap_inheritable.val & caps->inheritable.val); in bprm_caps_from_vfs_caps() [all …]
|
/linux-6.6.21/arch/arm64/kvm/hyp/ |
D | exception.c | 94 unsigned long sctlr, vbar, old, new, mode; in enter_exception64() local 127 new = 0; in enter_exception64() 129 new |= (old & PSR_N_BIT); in enter_exception64() 130 new |= (old & PSR_Z_BIT); in enter_exception64() 131 new |= (old & PSR_C_BIT); in enter_exception64() 132 new |= (old & PSR_V_BIT); in enter_exception64() 135 new |= PSR_TCO_BIT; in enter_exception64() 137 new |= (old & PSR_DIT_BIT); in enter_exception64() 145 new |= (old & PSR_PAN_BIT); in enter_exception64() 147 new |= PSR_PAN_BIT; in enter_exception64() [all …]
|
/linux-6.6.21/arch/powerpc/include/asm/ |
D | cmpxchg.h | 42 u32 __cmpxchg_##type##sfx(volatile void *p, u32 old, u32 new) \ 50 new <<= bitoff; \ 67 : "r" (p), "r" (old), "r" (new), "r" (prev_mask) \ 283 __cmpxchg_u8(volatile unsigned char *p, unsigned long old, unsigned long new) in __cmpxchg_u8() argument 298 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8() 306 unsigned long new) in __cmpxchg_u8_local() argument 318 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8_local() 325 __cmpxchg_u8_relaxed(u8 *p, unsigned long old, unsigned long new) in __cmpxchg_u8_relaxed() argument 337 : "r" (p), "r" (old), "r" (new) in __cmpxchg_u8_relaxed() 344 __cmpxchg_u8_acquire(u8 *p, unsigned long old, unsigned long new) in __cmpxchg_u8_acquire() argument [all …]
|
/linux-6.6.21/arch/sparc/kernel/ |
D | ftrace.c | 26 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-6.6.21/tools/testing/selftests/rtc/ |
D | setdate.c | 24 struct rtc_time new, current; in main() local 47 sscanf(date, "%d-%d-%d", &new.tm_mday, &new.tm_mon, &new.tm_year); in main() 48 new.tm_mon -= 1; in main() 49 new.tm_year -= 1900; in main() 50 sscanf(time, "%d:%d:%d", &new.tm_hour, &new.tm_min, &new.tm_sec); in main() 53 new.tm_mday, new.tm_mon + 1, new.tm_year + 1900, in main() 54 new.tm_hour, new.tm_min, new.tm_sec); in main() 57 retval = ioctl(fd, RTC_SET_TIME, &new); in main()
|
/linux-6.6.21/arch/x86/include/asm/ |
D | cmpxchg.h | 85 #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-6.6.21/security/keys/ |
D | process_keys.c | 221 int install_thread_keyring_to_cred(struct cred *new) in install_thread_keyring_to_cred() argument 225 if (new->thread_keyring) in install_thread_keyring_to_cred() 228 keyring = keyring_alloc("_tid", new->uid, new->gid, new, in install_thread_keyring_to_cred() 235 new->thread_keyring = keyring; in install_thread_keyring_to_cred() 246 struct cred *new; in install_thread_keyring() local 249 new = prepare_creds(); in install_thread_keyring() 250 if (!new) in install_thread_keyring() 253 ret = install_thread_keyring_to_cred(new); in install_thread_keyring() 255 abort_creds(new); in install_thread_keyring() 259 return commit_creds(new); in install_thread_keyring() [all …]
|
/linux-6.6.21/drivers/mtd/ |
D | mtd_blkdevs.c | 276 int add_mtd_blktrans_dev(struct mtd_blktrans_dev *new) in add_mtd_blktrans_dev() argument 278 struct mtd_blktrans_ops *tr = new->tr; in add_mtd_blktrans_dev() 287 if (new->devnum == -1) { in add_mtd_blktrans_dev() 291 new->devnum = last_devnum+1; in add_mtd_blktrans_dev() 292 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev() 295 } else if (d->devnum == new->devnum) { in add_mtd_blktrans_dev() 298 } else if (d->devnum > new->devnum) { in add_mtd_blktrans_dev() 300 list_add_tail(&new->list, &d->list); in add_mtd_blktrans_dev() 307 if (new->devnum == -1) in add_mtd_blktrans_dev() 308 new->devnum = last_devnum+1; in add_mtd_blktrans_dev() [all …]
|
/linux-6.6.21/fs/nfs/blocklayout/ |
D | extent_tree.c | 137 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-6.6.21/fs/ |
D | signalfd.c | 74 struct signalfd_siginfo new; in signalfd_copyinfo() local 81 memset(&new, 0, sizeof(new)); in signalfd_copyinfo() 87 new.ssi_signo = kinfo->si_signo; in signalfd_copyinfo() 88 new.ssi_errno = kinfo->si_errno; in signalfd_copyinfo() 89 new.ssi_code = kinfo->si_code; in signalfd_copyinfo() 92 new.ssi_pid = kinfo->si_pid; in signalfd_copyinfo() 93 new.ssi_uid = kinfo->si_uid; in signalfd_copyinfo() 96 new.ssi_tid = kinfo->si_tid; in signalfd_copyinfo() 97 new.ssi_overrun = kinfo->si_overrun; in signalfd_copyinfo() 98 new.ssi_ptr = (long) kinfo->si_ptr; in signalfd_copyinfo() [all …]
|
/linux-6.6.21/arch/s390/include/asm/ |
D | cmpxchg.h | 89 unsigned long new, int size) in __cmpxchg() argument 98 new = (new & 0xff) << shift; in __cmpxchg() 117 [new] "+&d" (new), in __cmpxchg() 128 new = (new & 0xffff) << shift; in __cmpxchg() 147 [new] "+&d" (new), in __cmpxchg() 159 : [new] "d" (new) in __cmpxchg() 170 : [new] "d" (new) in __cmpxchg() 195 static __always_inline u128 arch_cmpxchg128(volatile u128 *ptr, u128 old, u128 new) in arch_cmpxchg128() argument 200 : [new] "d" (new) in arch_cmpxchg128()
|
D | atomic_ops.h | 101 int old, new; \ 108 : [old] "=d" (old), [new] "=&d" (new), [ptr] "+Q" (*ptr)\ 127 long old, new; \ 134 : [old] "=d" (old), [new] "=&d" (new), [ptr] "+QS" (*ptr)\ 157 static inline int __atomic_cmpxchg(int *ptr, int old, int new) in __atomic_cmpxchg() argument 162 : [new] "d" (new) in __atomic_cmpxchg() 167 static inline bool __atomic_cmpxchg_bool(int *ptr, int old, int new) in __atomic_cmpxchg_bool() argument 174 : [new] "d" (new) in __atomic_cmpxchg_bool() 179 static inline long __atomic64_cmpxchg(long *ptr, long old, long new) in __atomic64_cmpxchg() argument 184 : [new] "d" (new) in __atomic64_cmpxchg() [all …]
|
/linux-6.6.21/lib/ |
D | errseq.c | 79 errseq_t new; in errseq_set() local 82 new = (old & ~(MAX_ERRNO|ERRSEQ_SEEN)) | -err; in errseq_set() 86 new += ERRSEQ_CTR_INC; in errseq_set() 89 if (new == old) { in errseq_set() 90 cur = new; in errseq_set() 95 cur = cmpxchg(eseq, old, new); in errseq_set() 101 if (likely(cur == old || cur == new)) in errseq_set() 178 errseq_t old, new; in errseq_check_and_advance() local 199 new = old | ERRSEQ_SEEN; in errseq_check_and_advance() 200 if (new != old) in errseq_check_and_advance() [all …]
|
/linux-6.6.21/arch/ia64/include/asm/ |
D | bitops.h | 42 __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-6.6.21/arch/arm/kernel/ |
D | ftrace.c | 99 unsigned long new, bool validate) in ftrace_modify_code() argument 117 __patch_text((void *)pc, new); in ftrace_modify_code() 125 unsigned long new; in ftrace_update_ftrace_func() local 129 new = ftrace_call_replace(pc, (unsigned long)func, true); in ftrace_update_ftrace_func() 131 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func() 136 new = ftrace_call_replace(pc, (unsigned long)func, true); in ftrace_update_ftrace_func() 138 ret = ftrace_modify_code(pc, 0, new, false); in ftrace_update_ftrace_func() 147 unsigned long new, old; in ftrace_make_call() local 158 new = ftrace_call_replace(ip, aaddr, !mod); in ftrace_make_call() 160 if (!new && mod) { in ftrace_make_call() [all …]
|
/linux-6.6.21/arch/sparc/include/asm/ |
D | cmpxchg_64.h | 11 __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() 115 __cmpxchg_u64(volatile long *m, unsigned long old, unsigned long new) in __cmpxchg_u64() argument 118 : "=&r" (new) in __cmpxchg_u64() 119 : "0" (new), "r" (m), "r" (old) in __cmpxchg_u64() 122 return new; in __cmpxchg_u64() 131 __cmpxchg_u8(volatile unsigned char *m, unsigned char old, unsigned char new) in __cmpxchg_u8() argument 141 new32 = (load32 & ~mask) | (new << bit_shift); in __cmpxchg_u8() [all …]
|
/linux-6.6.21/security/apparmor/ |
D | task.c | 50 struct cred *new; in aa_replace_current_label() local 60 new = prepare_creds(); in aa_replace_current_label() 61 if (!new) in aa_replace_current_label() 84 aa_put_label(cred_label(new)); in aa_replace_current_label() 85 set_cred_label(new, label); in aa_replace_current_label() 87 commit_creds(new); in aa_replace_current_label() 123 struct cred *new; in aa_set_current_hat() local 125 new = prepare_creds(); in aa_set_current_hat() 126 if (!new) in aa_set_current_hat() 132 ctx->previous = cred_label(new); in aa_set_current_hat() [all …]
|
D | label.c | 62 struct aa_proxy *new; in aa_alloc_proxy() local 64 new = kzalloc(sizeof(struct aa_proxy), gfp); in aa_alloc_proxy() 65 if (new) { in aa_alloc_proxy() 66 kref_init(&new->count); in aa_alloc_proxy() 67 rcu_assign_pointer(new->label, aa_get_label(label)); in aa_alloc_proxy() 69 return new; in aa_alloc_proxy() 73 void __aa_proxy_redirect(struct aa_label *orig, struct aa_label *new) in __aa_proxy_redirect() argument 78 AA_BUG(!new); in __aa_proxy_redirect() 83 rcu_assign_pointer(orig->proxy->label, aa_get_label(new)); in __aa_proxy_redirect() 88 static void __proxy_share(struct aa_label *old, struct aa_label *new) in __proxy_share() argument [all …]
|
/linux-6.6.21/mm/ |
D | page_counter.c | 51 long new; in page_counter_cancel() local 53 new = atomic_long_sub_return(nr_pages, &counter->usage); in page_counter_cancel() 55 if (WARN_ONCE(new < 0, "page_counter underflow: %ld nr_pages=%lu\n", in page_counter_cancel() 56 new, nr_pages)) { in page_counter_cancel() 57 new = 0; in page_counter_cancel() 58 atomic_long_set(&counter->usage, new); in page_counter_cancel() 60 propagate_protected_usage(counter, new); in page_counter_cancel() 75 long new; in page_counter_charge() local 77 new = atomic_long_add_return(nr_pages, &c->usage); in page_counter_charge() 78 propagate_protected_usage(c, new); in page_counter_charge() [all …]
|
/linux-6.6.21/arch/alpha/include/asm/ |
D | xchg.h | 129 ____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-6.6.21/arch/csky/include/asm/ |
D | cmpxchg.h | 10 #define __xchg_relaxed(new, ptr, size) \ argument 13 __typeof__(new) __new = (new); \ 56 #define __cmpxchg_relaxed(ptr, old, new, size) \ argument 59 __typeof__(new) __new = (new); \ 60 __typeof__(new) __tmp; \ 86 #define __cmpxchg_acquire(ptr, old, new, size) \ argument 89 __typeof__(new) __new = (new); \ 90 __typeof__(new) __tmp; \ 117 #define __cmpxchg(ptr, old, new, size) \ argument 120 __typeof__(new) __new = (new); \ [all …]
|
/linux-6.6.21/fs/cachefiles/ |
D | security.c | 18 struct cred *new; in cachefiles_get_security_ID() local 23 new = prepare_kernel_cred(current); in cachefiles_get_security_ID() 24 if (!new) { in cachefiles_get_security_ID() 30 ret = set_security_override_from_ctx(new, cache->secctx); in cachefiles_get_security_ID() 32 put_cred(new); in cachefiles_get_security_ID() 39 cache->cache_cred = new; in cachefiles_get_security_ID() 79 struct cred *new; in cachefiles_determine_cache_security() local 86 new = prepare_creds(); in cachefiles_determine_cache_security() 87 if (!new) in cachefiles_determine_cache_security() 94 ret = set_create_files_as(new, d_backing_inode(root)); in cachefiles_determine_cache_security() [all …]
|