Home
last modified time | relevance | path

Searched refs:uid (Results 1 – 25 of 656) sorted by relevance

12345678910>>...27

/kernel/linux/linux-5.10/include/linux/
Dhighuid.h47 #define high2lowuid(uid) ((uid) & ~0xFFFF ? (old_uid_t)overflowuid : (old_uid_t)(uid)) argument
53 #define low2highuid(uid) ((uid) == (old_uid_t)-1 ? (uid_t)-1 : (uid_t)(uid)) argument
56 #define __convert_uid(size, uid) \ argument
57 (size >= sizeof(uid) ? (uid) : high2lowuid(uid))
64 #define __convert_uid(size, uid) (uid) argument
70 #define SET_UID(var, uid) do { (var) = __convert_uid(sizeof(var), (uid)); } while (0) argument
92 #define fs_high2lowuid(uid) ((uid) & ~0xFFFF ? (uid16_t)fs_overflowuid : (uid16_t)(uid)) argument
Duidgid.h34 static inline uid_t __kuid_val(kuid_t uid) in __kuid_val() argument
36 return uid.val; in __kuid_val()
44 static inline uid_t __kuid_val(kuid_t uid) in __kuid_val() argument
119 static inline bool uid_valid(kuid_t uid) in uid_valid() argument
121 return __kuid_val(uid) != (uid_t) -1; in uid_valid()
131 extern kuid_t make_kuid(struct user_namespace *from, uid_t uid);
134 extern uid_t from_kuid(struct user_namespace *to, kuid_t uid);
136 extern uid_t from_kuid_munged(struct user_namespace *to, kuid_t uid);
139 static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) in kuid_has_mapping() argument
141 return from_kuid(ns, uid) != (uid_t) -1; in kuid_has_mapping()
[all …]
/kernel/linux/linux-5.10/security/safesetid/
Dlsm.c39 hash_for_each_possible(policy->rules, rule, next, __kuid_val(src.uid)) { in _setid_policy_lookup()
40 if (!uid_eq(rule->src_id.uid, src.uid)) in _setid_policy_lookup()
42 if (uid_eq(rule->dst_id.uid, dst.uid)) in _setid_policy_lookup()
119 if (setid_policy_lookup((kid_t){.uid = cred->uid}, INVALID_ID, UID) == SIDPOL_DEFAULT) in safesetid_security_capable()
126 __kuid_val(cred->uid)); in safesetid_security_capable()
141 __kuid_val(cred->uid)); in safesetid_security_capable()
162 if (uid_eq(new_id.uid, old->uid) || uid_eq(new_id.uid, old->euid) || in id_permitted_for_cred()
163 uid_eq(new_id.uid, old->suid)) in id_permitted_for_cred()
177 setid_policy_lookup((kid_t){.uid = old->uid}, new_id, new_type) != SIDPOL_CONSTRAINED; in id_permitted_for_cred()
182 __kuid_val(old->uid), __kuid_val(old->euid), in id_permitted_for_cred()
[all …]
/kernel/linux/linux-5.10/kernel/
Duser.c81 #define __uidhashfn(uid) (((uid >> UIDHASH_BITS) + uid) & UIDHASH_MASK) argument
82 #define uidhashentry(uid) (uidhash_table + __uidhashfn((__kuid_val(uid)))) argument
104 .uid = GLOBAL_ROOT_UID,
121 static struct user_struct *uid_hash_find(kuid_t uid, struct hlist_head *hashent) in uid_hash_find() argument
126 if (uid_eq(user->uid, uid)) { in uid_hash_find()
153 struct user_struct *find_user(kuid_t uid) in find_user() argument
159 ret = uid_hash_find(uid, uidhashentry(uid)); in find_user()
175 struct user_struct *alloc_uid(kuid_t uid) in alloc_uid() argument
177 struct hlist_head *hashent = uidhashentry(uid); in alloc_uid()
181 up = uid_hash_find(uid, hashent); in alloc_uid()
[all …]
Ducount.c15 #define ucounts_hashfn(ns, uid) \ argument
16 hash_long((unsigned long)__kuid_val(uid) + (unsigned long)(ns), \
18 #define ucounts_hashentry(ns, uid) \ argument
19 (ucounts_hashtable + ucounts_hashfn(ns, uid))
117 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashe… in find_ucounts() argument
122 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts()
128 static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid) in get_ucounts() argument
130 struct hlist_head *hashent = ucounts_hashentry(ns, uid); in get_ucounts()
134 ucounts = find_ucounts(ns, uid, hashent); in get_ucounts()
143 new->uid = uid; in get_ucounts()
[all …]
/kernel/linux/linux-5.10/drivers/vdpa/mlx5/core/
Dresources.c7 static int alloc_pd(struct mlx5_vdpa_dev *dev, u32 *pdn, u16 uid) in alloc_pd() argument
16 MLX5_SET(alloc_pd_in, in, uid, uid); in alloc_pd()
25 static int dealloc_pd(struct mlx5_vdpa_dev *dev, u32 pdn, u16 uid) in dealloc_pd() argument
32 MLX5_SET(dealloc_pd_in, in, uid, uid); in dealloc_pd()
50 static int create_uctx(struct mlx5_vdpa_dev *mvdev, u16 *uid) in create_uctx() argument
72 *uid = MLX5_GET(create_uctx_out, out, uid); in create_uctx()
77 static void destroy_uctx(struct mlx5_vdpa_dev *mvdev, u32 uid) in destroy_uctx() argument
83 MLX5_SET(destroy_uctx_in, in, uid, uid); in destroy_uctx()
94 MLX5_SET(create_tis_in, in, uid, mvdev->res.uid); in mlx5_vdpa_create_tis()
107 MLX5_SET(destroy_tis_in, in, uid, mvdev->res.uid); in mlx5_vdpa_destroy_tis()
[all …]
/kernel/linux/linux-5.10/drivers/s390/block/
Ddasd_alias.c53 static struct alias_server *_find_server(struct dasd_uid *uid) in _find_server() argument
57 if (!strncmp(pos->uid.vendor, uid->vendor, in _find_server()
58 sizeof(uid->vendor)) in _find_server()
59 && !strncmp(pos->uid.serial, uid->serial, in _find_server()
60 sizeof(uid->serial))) in _find_server()
67 struct dasd_uid *uid) in _find_lcu() argument
71 if (pos->uid.ssid == uid->ssid) in _find_lcu()
78 struct dasd_uid *uid) in _find_group() argument
93 if (uid->type == UA_BASE_DEVICE) in _find_group()
94 search_unit_addr = uid->real_unit_addr; in _find_group()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx5/
Dcmd.c151 void mlx5_cmd_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u16 uid) in mlx5_cmd_destroy_tir() argument
157 MLX5_SET(destroy_tir_in, in, uid, uid); in mlx5_cmd_destroy_tir()
161 void mlx5_cmd_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u16 uid) in mlx5_cmd_destroy_tis() argument
167 MLX5_SET(destroy_tis_in, in, uid, uid); in mlx5_cmd_destroy_tis()
171 int mlx5_cmd_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn, u16 uid) in mlx5_cmd_destroy_rqt() argument
177 MLX5_SET(destroy_rqt_in, in, uid, uid); in mlx5_cmd_destroy_rqt()
182 u16 uid) in mlx5_cmd_alloc_transport_domain() argument
190 MLX5_SET(alloc_transport_domain_in, in, uid, uid); in mlx5_cmd_alloc_transport_domain()
201 u16 uid) in mlx5_cmd_dealloc_transport_domain() argument
207 MLX5_SET(dealloc_transport_domain_in, in, uid, uid); in mlx5_cmd_dealloc_transport_domain()
[all …]
Dcmd.h47 int mlx5_cmd_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn, u16 uid);
48 void mlx5_cmd_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u16 uid);
49 void mlx5_cmd_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u16 uid);
50 int mlx5_cmd_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn, u16 uid);
52 u16 uid);
54 u16 uid);
56 u32 qpn, u16 uid);
58 u32 qpn, u16 uid);
59 int mlx5_cmd_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn, u16 uid);
60 int mlx5_cmd_xrcd_dealloc(struct mlx5_core_dev *dev, u32 xrcdn, u16 uid);
Dqpc.c209 MLX5_SET(destroy_dct_in, in, uid, qp->uid); in _mlx5_core_destroy_dct()
228 qp->uid = MLX5_GET(create_dct_in, in, uid); in mlx5_core_create_dct()
252 qp->uid = MLX5_GET(create_qp_in, in, uid); in mlx5_qpc_create_qp()
266 MLX5_SET(destroy_qp_in, din, uid, qp->uid); in mlx5_qpc_create_qp()
279 MLX5_SET(drain_dct_in, in, uid, qp->uid); in mlx5_core_drain_dct()
299 MLX5_SET(destroy_qp_in, in, uid, qp->uid); in mlx5_core_destroy_qp()
373 struct mbox_info *mbox, u16 uid, u32 ece) in modify_qp_mbox_alloc() argument
385 MLX5_SET(typ##_in, in, uid, _uid); \ in modify_qp_mbox_alloc()
401 MOD_QP_IN_SET(qp_2rst, mbox->in, opcode, qpn, uid); in modify_qp_mbox_alloc()
406 MOD_QP_IN_SET(qp_2err, mbox->in, opcode, qpn, uid); in modify_qp_mbox_alloc()
[all …]
Dsrq_cmd.c112 MLX5_SET(create_srq_in, create_in, uid, in->uid); in create_srq_cmd()
127 srq->uid = in->uid; in create_srq_cmd()
139 MLX5_SET(destroy_srq_in, in, uid, srq->uid); in destroy_srq_cmd()
153 MLX5_SET(arm_rq_in, in, uid, srq->uid); in arm_srq_cmd()
203 MLX5_SET(create_xrc_srq_in, create_in, uid, in->uid); in create_xrc_srq_cmd()
221 srq->uid = in->uid; in create_xrc_srq_cmd()
234 MLX5_SET(destroy_xrc_srq_in, in, uid, srq->uid); in destroy_xrc_srq_cmd()
249 MLX5_SET(arm_xrc_srq_in, in, uid, srq->uid); in arm_xrc_srq_cmd()
311 MLX5_SET(create_rmp_in, create_in, uid, in->uid); in create_rmp_cmd()
319 srq->uid = in->uid; in create_rmp_cmd()
[all …]
/kernel/linux/common_modules/qos_auth/auth_ctl/
Dauth_ctrl.c200 unsigned int uid = data->uid; in auth_enable() local
205 auth_to_enable = idr_find(ua_idr, uid); in auth_enable()
244 ret = idr_alloc(ua_idr, auth_to_enable, uid, uid + 1, GFP_ATOMIC); in auth_enable()
259 unsigned int uid = data->uid; in auth_delete() local
262 auth_to_delete = (struct auth_struct *)idr_remove(ua_idr, uid); in auth_delete()
265 pr_err("[AUTH_CTRL] no auth data for this uid=%d, delete failed\n", uid); in auth_delete()
285 unsigned int uid = data->uid; in auth_get() local
288 auth_to_get = idr_find(ua_idr, uid); in auth_get()
291 pr_err("[AUTH_CTRL] no auth data for this uid=%d to get\n", uid); in auth_get()
320 unsigned int uid = data->uid; in auth_switch() local
[all …]
/kernel/linux/linux-5.10/security/keys/
Dpersistent.c40 static key_ref_t key_create_persistent(struct user_namespace *ns, kuid_t uid, in key_create_persistent() argument
58 uid, INVALID_GID, current_cred(), in key_create_persistent()
73 static long key_get_persistent(struct user_namespace *ns, kuid_t uid, in key_get_persistent() argument
86 index_key.desc_len = sprintf(buf, "_persistent.%u", from_kuid(ns, uid)); in key_get_persistent()
103 persistent_ref = key_create_persistent(ns, uid, &index_key); in key_get_persistent()
133 kuid_t uid; in keyctl_get_persistent() local
138 uid = current_uid(); in keyctl_get_persistent()
140 uid = make_kuid(ns, _uid); in keyctl_get_persistent()
141 if (!uid_valid(uid)) in keyctl_get_persistent()
147 if (!uid_eq(uid, current_uid()) && in keyctl_get_persistent()
[all …]
/kernel/linux/linux-5.10/fs/9p/
Dfid.c49 static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any) in v9fs_fid_find() argument
54 dentry, dentry, from_kuid(&init_user_ns, uid), in v9fs_fid_find()
62 if (any || uid_eq(fid->uid, uid)) { in v9fs_fid_find()
102 kuid_t uid, int any) in v9fs_fid_lookup_with_uid() argument
112 fid = v9fs_fid_find(dentry, uid, any); in v9fs_fid_lookup_with_uid()
122 fid = v9fs_fid_find(ds, uid, any); in v9fs_fid_lookup_with_uid()
131 fid = v9fs_fid_find(dentry->d_sb->s_root, uid, any); in v9fs_fid_lookup_with_uid()
142 fid = p9_client_attach(v9ses->clnt, NULL, uname, uid, in v9fs_fid_lookup_with_uid()
218 kuid_t uid; in v9fs_fid_lookup() local
228 uid = current_fsuid(); in v9fs_fid_lookup()
[all …]
/kernel/linux/linux-5.10/ipc/
Dcompat.c44 to->uid = v.uid; in get_compat_ipc64_perm()
56 to->uid = v.uid; in get_compat_ipc_perm()
65 to->uid = from->uid; in to_compat_ipc64_perm()
76 SET_UID(to->uid, from->uid); in to_compat_ipc_perm()
/kernel/linux/linux-5.10/drivers/staging/greybus/Documentation/firmware/
Dauthenticate.c18 struct cap_ioc_get_endpoint_uid uid; variable
54 ret = ioctl(fd, CAP_IOC_GET_ENDPOINT_UID, &uid); in main()
61 printf("UID received: 0x%llx\n", *(unsigned long long int *)(uid.uid)); in main()
78 memcpy(authenticate.uid, uid.uid, 8); in main()
/kernel/linux/linux-5.10/drivers/soc/ux500/
Dux500-soc-id.c171 u32 uid[5]; in db8500_read_soc_id() local
176 memcpy_fromio(uid, base + 0x1fc0, sizeof(uid)); in db8500_read_soc_id()
179 add_device_randomness(uid, sizeof(uid)); in db8500_read_soc_id()
181 uid[0], uid[1], uid[2], uid[3], uid[4]); in db8500_read_soc_id()
/kernel/linux/linux-5.10/block/
Dioprio.c44 if (!uid_eq(tcred->uid, cred->euid) && in set_task_ioprio()
45 !uid_eq(tcred->uid, cred->uid) && !capable(CAP_SYS_NICE)) { in set_task_ioprio()
106 kuid_t uid; in SYSCALL_DEFINE3() local
136 uid = make_kuid(current_user_ns(), who); in SYSCALL_DEFINE3()
137 if (!uid_valid(uid)) in SYSCALL_DEFINE3()
142 user = find_user(uid); in SYSCALL_DEFINE3()
148 if (!uid_eq(task_uid(p), uid) || in SYSCALL_DEFINE3()
198 kuid_t uid; in SYSCALL_DEFINE2() local
231 uid = make_kuid(current_user_ns(), who); in SYSCALL_DEFINE2()
235 user = find_user(uid); in SYSCALL_DEFINE2()
[all …]
/kernel/linux/linux-5.10/usr/
Dgen_init_cpio.c104 unsigned int mode, uid_t uid, gid_t gid) in cpio_mkslink() argument
115 (long) uid, /* uid */ in cpio_mkslink()
139 int uid; in cpio_mkslink_line() local
143 …scanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &uid, &gid)) { in cpio_mkslink_line()
147 rc = cpio_mkslink(name, target, mode, uid, gid); in cpio_mkslink_line()
153 uid_t uid, gid_t gid) in cpio_mkgeneric() argument
164 (long) uid, /* uid */ in cpio_mkgeneric()
210 int uid; in cpio_mkgeneric_line() local
214 if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) { in cpio_mkgeneric_line()
220 rc = cpio_mkgeneric(name, mode, uid, gid); in cpio_mkgeneric_line()
[all …]
Dgen_initramfs.sh17 $0 [-o <file>] [-l <dep_list>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
20 -u <uid> User ID to map to user ID 0 (root).
21 <uid> is only meaningful if <cpio_source> is a
22 directory. "squash" forces all files to uid 0.
92 local uid="$3"
96 [ "$root_uid" = "squash" ] && uid=0 || [ "$uid" -eq "$root_uid" ] && uid=0
98 local str="${mode} ${uid} ${gid}"
/kernel/linux/linux-5.10/arch/arm/mach-lpc32xx/
Dcommon.c111 u32 uid[4]; in lpc32xx_check_uid() local
113 lpc32xx_get_uid(uid); in lpc32xx_check_uid()
116 uid[3], uid[2], uid[1], uid[0]); in lpc32xx_check_uid()
119 system_serial_low = uid[0]; in lpc32xx_check_uid()
120 system_serial_high = uid[1]; in lpc32xx_check_uid()
/kernel/linux/linux-5.10/drivers/acpi/x86/
Dutils.c40 const char *uid; member
45 #define ENTRY(status, hid, uid, path, cpu_model, dmi...) { \ argument
49 uid, \
54 #define PRESENT_ENTRY_HID(hid, uid, cpu_model, dmi...) \ argument
55 ENTRY(ACPI_STA_DEFAULT, hid, uid, NULL, cpu_model, dmi)
57 #define NOT_PRESENT_ENTRY_HID(hid, uid, cpu_model, dmi...) \ argument
58 ENTRY(0, hid, uid, NULL, cpu_model, dmi)
169 strcmp(adev->pnp.unique_id, override_status_ids[i].uid)) in acpi_device_override_status()
/kernel/linux/linux-5.10/fs/quota/
Dkqid.c19 return uid_eq(left.uid, right.uid); in qid_eq()
45 return uid_lt(left.uid, right.uid); in qid_lt()
72 return from_kuid(targ, kqid.uid); in from_kqid()
105 return from_kuid_munged(targ, kqid.uid); in from_kqid_munged()
124 return uid_valid(qid.uid); in qid_valid()
/kernel/linux/linux-5.10/sound/pci/mixart/
Dmixart_hwdep.c150 request.uid = (struct mixart_uid){0,0}; /* board num = 0 */ in mixart_enum_connectors()
171 pipe->uid_right_connector = connector->uid[k]; /* odd */ in mixart_enum_connectors()
173 pipe->uid_left_connector = connector->uid[k]; /* even */ in mixart_enum_connectors()
180 request.uid = connector->uid[k]; in mixart_enum_connectors()
194 request.uid = (struct mixart_uid){0,0}; /* board num = 0 */ in mixart_enum_connectors()
215 pipe->uid_right_connector = connector->uid[k]; /* odd */ in mixart_enum_connectors()
217 pipe->uid_left_connector = connector->uid[k]; /* even */ in mixart_enum_connectors()
224 request.uid = connector->uid[k]; in mixart_enum_connectors()
260 request.uid = get_console_mgr; in mixart_enum_physio()
274 mgr->uid_console_manager = console_mgr.uid; in mixart_enum_physio()
[all …]
/kernel/linux/linux-5.10/drivers/misc/
Dad525x_dpot.c89 unsigned int uid; member
135 if (dpot->uid == DPOT_UID(AD5291_ID) || in dpot_read_spi()
136 dpot->uid == DPOT_UID(AD5292_ID) || in dpot_read_spi()
137 dpot->uid == DPOT_UID(AD5293_ID)) { in dpot_read_spi()
142 if (dpot->uid == DPOT_UID(AD5291_ID)) in dpot_read_spi()
146 } else if (dpot->uid == DPOT_UID(AD5270_ID) || in dpot_read_spi()
147 dpot->uid == DPOT_UID(AD5271_ID)) { in dpot_read_spi()
155 if (dpot->uid == DPOT_UID(AD5271_ID)) in dpot_read_spi()
179 switch (dpot->uid) { in dpot_read_i2c()
216 if (dpot->uid == DPOT_UID(AD5274_ID)) in dpot_read_i2c()
[all …]

12345678910>>...27