Home
last modified time | relevance | path

Searched full:uid (Results 1 – 25 of 872) sorted by relevance

12345678910>>...35

/linux/include/linux/
H A Dhighuid.h26 * This is the "overflow" UID and GID. They are used to signify uid/gid
27 * overflow to old programs when they request uid/gid information but are
30 * processes are owned by this uid/gid.
46 /* prevent uid mod 65536 effect by returning a default value for high UIDs */
47 #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
69 /* uid/gid input should be always 32bit uid_t */
[all …]
H A Duidgid.h9 * the kernel are values used by userspace and which uid and gid values are
26 static inline uid_t __kuid_val(kuid_t uid) in __kuid_val() argument
28 return uid.val; in __kuid_val()
36 static inline uid_t __kuid_val(kuid_t uid) in __kuid_val() argument
103 static inline bool uid_valid(kuid_t uid) in uid_valid() argument
105 return __kuid_val(uid) != (uid_t) -1; in uid_valid()
115 extern kuid_t make_kuid(struct user_namespace *from, uid_t uid);
118 extern uid_t from_kuid(struct user_namespace *to, kuid_t uid);
120 extern uid_t from_kuid_munged(struct user_namespace *to, kuid_t uid);
123 static inline bool kuid_has_mapping(struct user_namespace *ns, kuid_t uid) in kuid_has_mapping() argument
[all …]
/linux/security/safesetid/
H A Dlsm.c39 if (policy->type == UID) { in _setid_policy_lookup()
40 hash_for_each_possible(policy->rules, rule, next, __kuid_val(src.uid)) { in _setid_policy_lookup()
41 if (!uid_eq(rule->src_id.uid, src.uid)) in _setid_policy_lookup()
43 if (uid_eq(rule->dst_id.uid, dst.uid)) in _setid_policy_lookup()
73 if (new_type == UID) in setid_policy_lookup()
114 if (setid_policy_lookup((kid_t){.uid = cred->uid}, INVALID_ID, UID) == SIDPOL_DEFAULT) in safesetid_security_capable()
118 * set*uid() (e.g. setting up userns uid mappings). in safesetid_security_capable()
120 …ation requires CAP_SETUID, which is not available to UID %u for operations besides approved set*ui… in safesetid_security_capable()
121 __kuid_val(cred->uid)); in safesetid_security_capable()
153 if (new_type == UID) { in id_permitted_for_cred()
[all …]
H A Dsecurityfs.c38 /* Format of |buf| string should be <UID>:<UID> or <GID>:<GID> */ in parse_policy_line()
53 if (rule->type == UID){ in parse_policy_line()
54 rule->src_id.uid = make_kuid(file->f_cred->user_ns, parsed_parent); in parse_policy_line()
55 rule->dst_id.uid = make_kuid(file->f_cred->user_ns, parsed_child); in parse_policy_line()
56 if (!uid_valid(rule->src_id.uid) || !uid_valid(rule->dst_id.uid)) in parse_policy_line()
90 if (pol->type == UID) in insert_rule()
91 hash_add(pol->rules, &rule->next, __kuid_val(rule->src_id.uid)); in insert_rule()
94 else /* Error, pol->type is neither UID or GID */ in insert_rule()
106 if (pol->type == UID) { in verify_ruleset()
107 …pr_warn("insecure policy detected: uid %d is constrained but transitively unconstrained through ui… in verify_ruleset()
[all …]
/linux/drivers/infiniband/hw/mlx5/
H A Dcmd.c57 void mlx5_cmd_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u16 uid) in mlx5_cmd_destroy_tir() argument
63 MLX5_SET(destroy_tir_in, in, uid, uid); in mlx5_cmd_destroy_tir()
67 void mlx5_cmd_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u16 uid) in mlx5_cmd_destroy_tis() argument
73 MLX5_SET(destroy_tis_in, in, uid, uid); in mlx5_cmd_destroy_tis()
77 int mlx5_cmd_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn, u16 uid) in mlx5_cmd_destroy_rqt() argument
83 MLX5_SET(destroy_rqt_in, in, uid, uid); in mlx5_cmd_destroy_rqt()
88 u16 uid) in mlx5_cmd_alloc_transport_domain() argument
96 MLX5_SET(alloc_transport_domain_in, in, uid, uid); in mlx5_cmd_alloc_transport_domain()
107 u16 uid) in mlx5_cmd_dealloc_transport_domain() argument
113 MLX5_SET(dealloc_transport_domain_in, in, uid, uid); in mlx5_cmd_dealloc_transport_domain()
[all …]
H A Dqpc.c203 MLX5_SET(destroy_dct_in, in, uid, qp->uid); in _mlx5_core_destroy_dct()
221 qp->uid = MLX5_GET(create_dct_in, in, uid); in mlx5_core_create_dct()
245 qp->uid = MLX5_GET(create_qp_in, in, uid); in mlx5_qpc_create_qp()
260 MLX5_SET(destroy_qp_in, din, uid, qp->uid); in mlx5_qpc_create_qp()
273 MLX5_SET(drain_dct_in, in, uid, qp->uid); in mlx5_core_drain_dct()
318 MLX5_SET(destroy_qp_in, in, uid, qp->uid); in mlx5_core_destroy_qp()
391 struct mbox_info *mbox, u16 uid, u32 ece) in modify_qp_mbox_alloc() argument
403 MLX5_SET(typ##_in, in, uid, _uid); \ in modify_qp_mbox_alloc()
419 MOD_QP_IN_SET(qp_2rst, mbox->in, opcode, qpn, uid); in modify_qp_mbox_alloc()
424 MOD_QP_IN_SET(qp_2err, mbox->in, opcode, qpn, uid); in modify_qp_mbox_alloc()
[all …]
H A Dcmd.h43 int mlx5_cmd_dealloc_pd(struct mlx5_core_dev *dev, u32 pdn, u16 uid);
44 void mlx5_cmd_destroy_tir(struct mlx5_core_dev *dev, u32 tirn, u16 uid);
45 void mlx5_cmd_destroy_tis(struct mlx5_core_dev *dev, u32 tisn, u16 uid);
46 int mlx5_cmd_destroy_rqt(struct mlx5_core_dev *dev, u32 rqtn, u16 uid);
48 u16 uid);
50 u16 uid);
52 u32 qpn, u16 uid);
54 u32 qpn, u16 uid);
55 int mlx5_cmd_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn, u16 uid);
56 int mlx5_cmd_xrcd_dealloc(struct mlx5_core_dev *dev, u32 xrcdn, u16 uid);
[all …]
H A Dsrq_cmd.c137 MLX5_SET(create_srq_in, create_in, uid, in->uid); in create_srq_cmd()
158 srq->uid = in->uid; in create_srq_cmd()
170 MLX5_SET(destroy_srq_in, in, uid, srq->uid); in destroy_srq_cmd()
184 MLX5_SET(arm_rq_in, in, uid, srq->uid); in arm_srq_cmd()
240 MLX5_SET(create_xrc_srq_in, create_in, uid, in->uid); in create_xrc_srq_cmd()
264 srq->uid = in->uid; in create_xrc_srq_cmd()
277 MLX5_SET(destroy_xrc_srq_in, in, uid, srq->uid); in destroy_xrc_srq_cmd()
292 MLX5_SET(arm_xrc_srq_in, in, uid, srq->uid); in arm_xrc_srq_cmd()
361 MLX5_SET(create_rmp_in, create_in, uid, in->uid); in create_rmp_cmd()
377 srq->uid = in->uid; in create_rmp_cmd()
[all …]
/linux/drivers/platform/surface/aggregator/
H A Dbus.c28 sdev->uid.domain, sdev->uid.category, sdev->uid.target, in modalias_show()
29 sdev->uid.instance, sdev->uid.function); in modalias_show()
46 sdev->uid.domain, sdev->uid.category, in ssam_device_uevent()
47 sdev->uid.target, sdev->uid.instance, in ssam_device_uevent()
48 sdev->uid.function); in ssam_device_uevent()
71 * @uid: The UID of the device to be added.
75 * UID. Note that the device still has to be added via ssam_device_add().
82 struct ssam_device_uid uid) in ssam_device_alloc() argument
95 sdev->uid = uid; in ssam_device_alloc()
98 sdev->uid.domain, sdev->uid.category, sdev->uid.target, in ssam_device_alloc()
[all …]
H A Dtrace.h105 * ssam_trace_ptr_uid() - Convert the pointer to a non-pointer UID string.
107 * @uid_str: A buffer of length SSAM_PTR_UID_LEN where the UID will be stored.
109 * Converts the given pointer into a UID string that is safe to be shared
400 __array(char, uid, SSAM_PTR_UID_LEN)
408 ssam_trace_ptr_uid(packet, __entry->uid);
414 TP_printk("uid=%s, seq=%s, ty=%s, pri=%#04x, len=%u, sta=%s",
415 __entry->uid,
438 __array(char, uid, SSAM_PTR_UID_LEN)
447 ssam_trace_ptr_uid(packet, __entry->uid);
453 TP_printk("uid=%s, seq=%s, ty=%s, pri=%#04x, len=%u, sta=%s, status=%d",
[all …]
/linux/drivers/vdpa/mlx5/core/
H A Dresources.c8 static int alloc_pd(struct mlx5_vdpa_dev *dev, u32 *pdn, u16 uid) in alloc_pd() argument
17 MLX5_SET(alloc_pd_in, in, uid, uid); in alloc_pd()
26 static int dealloc_pd(struct mlx5_vdpa_dev *dev, u32 pdn, u16 uid) in dealloc_pd() argument
33 MLX5_SET(dealloc_pd_in, in, uid, uid); in dealloc_pd()
51 static int create_uctx(struct mlx5_vdpa_dev *mvdev, u16 *uid) in create_uctx() argument
76 *uid = MLX5_GET(create_uctx_out, out, uid); in create_uctx()
81 static void destroy_uctx(struct mlx5_vdpa_dev *mvdev, u32 uid) in destroy_uctx() argument
86 if (!uid) in destroy_uctx()
90 MLX5_SET(destroy_uctx_in, in, uid, uid); in destroy_uctx()
101 MLX5_SET(create_tis_in, in, uid, mvdev->res.uid); in mlx5_vdpa_create_tis()
[all …]
/linux/drivers/s390/block/
H A Ddasd_alias.c45 static struct alias_server *_find_server(struct dasd_uid *uid) in _find_server() argument
49 if (!strncmp(pos->uid.vendor, uid->vendor, in _find_server()
50 sizeof(uid->vendor)) in _find_server()
51 && !strncmp(pos->uid.serial, uid->serial, in _find_server()
52 sizeof(uid->serial))) in _find_server()
59 struct dasd_uid *uid) in _find_lcu() argument
63 if (pos->uid.ssid == uid->ssid) in _find_lcu()
70 struct dasd_uid *uid) in _find_group() argument
85 if (uid->type == UA_BASE_DEVICE) in _find_group()
86 search_unit_addr = uid->real_unit_addr; in _find_group()
[all …]
/linux/fs/9p/
H A Dfid.c56 * @uid: return a fid belonging to the specified user
57 * @any: ignore uid as a selection criteria
61 kuid_t uid, bool any) in v9fs_fid_find_inode() argument
71 if (any || uid_eq(fid->uid, uid)) { in v9fs_fid_find_inode()
106 * v9fs_fid_find - retrieve a fid that belongs to the specified uid
108 * @uid: return fid that belongs to the specified user
113 static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any) in v9fs_fid_find() argument
117 p9_debug(P9_DEBUG_VFS, " dentry: %pd (%p) uid %d any %d\n", in v9fs_fid_find()
118 dentry, dentry, from_kuid(&init_user_ns, uid), in v9fs_fid_find()
127 if (any || uid_eq(fid->uid, uid)) { in v9fs_fid_find()
[all …]
/linux/kernel/
H A Duser.c87 * UID task count cache, to get fast user lookup in "alloc_uid"
94 #define __uidhashfn(uid) (((uid >> UIDHASH_BITS) + uid) & UIDHASH_MASK) argument
95 #define uidhashentry(uid) (uidhash_table + __uidhashfn((__kuid_val(uid)))) argument
114 .uid = GLOBAL_ROOT_UID,
131 static struct user_struct *uid_hash_find(kuid_t uid, struct hlist_head *hashent) in uid_hash_find() argument
136 if (uid_eq(user->uid, uid)) { in uid_hash_find()
175 * Locate the user_struct for the passed UID. If found, take a ref on it. The
180 struct user_struct *find_user(kuid_t uid) in find_user() argument
186 ret = uid_hash_find(uid, uidhashentry(uid)); in find_user()
203 struct user_struct *alloc_uid(kuid_t uid) in alloc_uid() argument
[all …]
H A Ducount.c13 .uid = GLOBAL_ROOT_UID,
21 #define ucounts_hashfn(ns, uid) \ argument
22 hash_long((unsigned long)__kuid_val(uid) + (unsigned long)(ns), \
24 #define ucounts_hashentry(ns, uid) \ argument
25 (ucounts_hashtable + ucounts_hashfn(ns, uid))
130 static struct ucounts *find_ucounts(struct user_namespace *ns, kuid_t uid, struct hlist_head *hashe… in find_ucounts() argument
135 if (uid_eq(ucounts->uid, uid) && (ucounts->ns == ns)) in find_ucounts()
143 struct hlist_head *hashent = ucounts_hashentry(ucounts->ns, ucounts->uid); in hlist_add_ucounts()
164 struct ucounts *alloc_ucounts(struct user_namespace *ns, kuid_t uid) in alloc_ucounts() argument
166 struct hlist_head *hashent = ucounts_hashentry(ns, uid); in alloc_ucounts()
[all …]
/linux/tools/crypto/ccp/
H A Ddbc_cli.py46 choices=["get-nonce", "get-param", "set-param", "set-uid"],
53 parser.add_argument("--uid", help="File containing UID to pass")
68 uid = None variable
80 if args.uid:
81 if not os.path.exists(args.uid):
82 raise ValueError("Invalid uid file %s" % args.uid)
83 with open(args.uid, "rb") as f:
84 uid = f.read() variable
85 if len(uid) != DBC_UID_SIZE:
87 "Invalid UID length %d (expected %d)" % (len(uid), DBC_UID_SIZE)
[all …]
/linux/security/keys/
H A Dpersistent.c2 /* General persistent per-UID keyrings register
40 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()
70 * Get the persistent keyring for a specific UID and link it to the nominated
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()
126 * Get the persistent keyring for a specific UID and link it to the nominated
133 kuid_t uid; in keyctl_get_persistent() local
138 uid = current_uid(); in keyctl_get_persistent()
[all …]
/linux/sound/soc/intel/boards/
H A Dsof_cirrus_common.c147 * UID Mapping is fixed:
148 * UID 0x0 -> WL
149 * UID 0x1 -> WR
150 * UID 0x2 -> TL
151 * UID 0x3 -> TR
159 unsigned int uid, sz = 0; in cs35l41_compute_codec_conf() local
163 for (uid = 0; uid < CS35L41_MAX_AMPS; uid++) { in cs35l41_compute_codec_conf()
164 adev = acpi_dev_get_first_match_dev(CS35L41_HID, uid_strings[uid], -1); in cs35l41_compute_codec_conf()
166 pr_devel("Cannot find match for HID %s UID %u (%s)\n", CS35L41_HID, uid, in cs35l41_compute_codec_conf()
167 cs35l41_name_prefixes[uid]); in cs35l41_compute_codec_conf()
[all …]
/linux/drivers/hid/surface-hid/
H A Dsurface_kbd.c40 rqst.target_category = shid->uid.category; in ssam_kbd_get_descriptor()
41 rqst.target_id = shid->uid.target; in ssam_kbd_get_descriptor()
43 rqst.instance_id = shid->uid.instance; in ssam_kbd_get_descriptor()
70 rqst.target_category = shid->uid.category; in ssam_kbd_set_caps_led()
71 rqst.target_id = shid->uid.target; in ssam_kbd_set_caps_led()
73 rqst.instance_id = shid->uid.instance; in ssam_kbd_set_caps_led()
88 rqst.target_category = shid->uid.category; in ssam_kbd_get_feature_report()
89 rqst.target_id = shid->uid.target; in ssam_kbd_get_feature_report()
91 rqst.instance_id = shid->uid.instance; in ssam_kbd_get_feature_report()
129 * Check against device UID manually, as registry and device target in ssam_kbd_event_fn()
[all …]
H A Dsurface_hid.c59 rqst.target_category = shid->uid.category; in ssam_hid_get_descriptor()
60 rqst.target_id = shid->uid.target; in ssam_hid_get_descriptor()
62 rqst.instance_id = shid->uid.instance; in ssam_hid_get_descriptor()
124 rqst.target_category = shid->uid.category; in ssam_hid_set_raw_report()
125 rqst.target_id = shid->uid.target; in ssam_hid_set_raw_report()
126 rqst.instance_id = shid->uid.instance; in ssam_hid_set_raw_report()
142 rqst.target_category = shid->uid.category; in ssam_hid_get_raw_report()
143 rqst.target_id = shid->uid.target; in ssam_hid_get_raw_report()
144 rqst.instance_id = shid->uid.instance; in ssam_hid_get_raw_report()
208 shid->uid = sdev->uid; in surface_hid_probe()
[all …]
/linux/drivers/staging/greybus/Documentation/firmware/
H A Dauthenticate.c18 struct cap_ioc_get_endpoint_uid uid; variable
51 /* Get UID */ in main()
52 printf("Get UID\n"); in main()
54 ret = ioctl(fd, CAP_IOC_GET_ENDPOINT_UID, &uid); in main()
56 printf("Failed to get UID: %s (%d)\n", capdev, ret); 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()
/linux/tools/perf/util/
H A Dtarget.c31 /* UID and PID are mutually exclusive */ in target__validate()
38 /* UID and CPU are mutually exclusive */ in target__validate()
52 /* UID and SYSTEM are mutually exclusive */ in target__validate()
73 /* BPF and UID are mutually exclusive */ in target__validate()
103 target->uid = UINT_MAX; in target__parse_uid()
112 * The user name not found. Maybe it's a UID number. in target__parse_uid()
115 int uid = strtol(str, &endptr, 10); in target__parse_uid() local
120 getpwuid_r(uid, &pwd, buf, sizeof(buf), &result); in target__parse_uid()
126 target->uid = result->pw_uid; in target__parse_uid()
135 "PID/TID switch overriding UID",
[all …]
/linux/usr/
H A Dgen_init_cpio.c88 (long) 0, /* uid */ in cpio_trailer()
109 unsigned int mode, uid_t uid, gid_t gid) in cpio_mkslink() argument
120 (long) uid, /* uid */ in cpio_mkslink()
144 int uid; in cpio_mkslink_line() local
148 …scanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &uid, &gid)) { in cpio_mkslink_line()
152 rc = cpio_mkslink(name, target, mode, uid, gid); in cpio_mkslink_line()
158 uid_t uid, gid_t gid) in cpio_mkgeneric() argument
169 (long) uid, /* uid */ in cpio_mkgeneric()
215 int uid; in cpio_mkgeneric_line() local
219 if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) { in cpio_mkgeneric_line()
[all …]
/linux/Documentation/admin-guide/
H A Dhighuid.rst18 maximum UID/GID. They are limited by the maximum file size on the
20 corresponding to the UID in question.
27 (currently, the old 16-bit UID and GID are still written to disk, and
28 part of the former pad space is used to store separate 32-bit UID and
31 - Need to validate that OS emulation calls the 16-bit UID
33 uses the 32-bit UID system calls properly otherwise.
40 (need to support whatever new 32-bit UID system calls are added to
59 Filesystems with simple fixups to prevent 16-bit UID wraparound:
78 - make sure that the UID mapping feature of AX25 networking works properly
/linux/Documentation/admin-guide/LSM/
H A DSafeSetID.rst5 UID/GID transitions from a given UID/GID to only those approved by a
8 allowing a user to set up user namespace UID/GID mappings.
39 do any unapproved actions (e.g. setuid to uid 0 or create/enter new user
40 namespace). The higher level goal is to allow for uid-based sandboxing of system
57 to do process spawning and UID/GID transitions). Unfortunately, there are a
70 programs in the tree could change to any desired UID/GID in the context of their
103 mounted. The format for adding a policy is '<UID>:<UID>' or '<GID>:<GID>',
106 for a UID/GID will prevent that UID/GID from obtaining auxiliary setid
107 privileges, such as allowing a user to set up user namespace UID/GID mappings.

12345678910>>...35