Home
last modified time | relevance | path

Searched refs:gid (Results 1 – 25 of 499) sorted by relevance

12345678910>>...20

/linux/include/linux/
A Dhighuid.h48 #define high2lowgid(gid) ((gid) & ~0xFFFF ? (old_gid_t)overflowgid : (old_gid_t)(gid)) argument
54 #define low2highgid(gid) ((gid) == (old_gid_t)-1 ? (gid_t)-1 : (gid_t)(gid)) argument
58 #define __convert_gid(size, gid) \ argument
59 (size >= sizeof(gid) ? (gid) : high2lowgid(gid))
65 #define __convert_gid(size, gid) (gid) argument
71 #define SET_GID(var, gid) do { (var) = __convert_gid(sizeof(var), (gid)); } while (0) argument
93 #define fs_high2lowgid(gid) ((gid) & ~0xFFFF ? (gid16_t)fs_overflowgid : (gid16_t)(gid)) argument
A Duidgid.h39 static inline gid_t __kgid_val(kgid_t gid) in __kgid_val() argument
41 return gid.val; in __kgid_val()
49 static inline gid_t __kgid_val(kgid_t gid) in __kgid_val() argument
116 static inline bool gid_valid(kgid_t gid) in gid_valid() argument
118 return __kgid_val(gid) != (gid_t) -1; in gid_valid()
150 return KGIDT_INIT(gid); in make_kgid()
173 gid_t gid = from_kgid(to, kgid); in from_kgid_munged() local
174 if (gid == (gid_t)-1) in from_kgid_munged()
175 gid = overflowgid; in from_kgid_munged()
176 return gid; in from_kgid_munged()
[all …]
/linux/include/rdma/
A Dib_addr.h99 union ib_gid *gid) in ib_addr_get_mgid() argument
101 memcpy(gid, dev_addr->broadcast + 4, sizeof *gid); in ib_addr_get_mgid()
120 (struct in6_addr *)gid); in rdma_ip2gid()
123 *(struct in6_addr *)&gid->raw = in rdma_ip2gid()
135 if (ipv6_addr_v4mapped((struct in6_addr *)gid)) { in rdma_gid2ip()
139 memcpy(&out_in->sin_addr.s_addr, gid->raw + 12, 4); in rdma_gid2ip()
144 memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16); in rdma_gid2ip()
156 sizeof(*gid)); in rdma_addr_get_sgid()
161 memcpy(dev_addr->src_dev_addr + rdma_addr_gid_offset(dev_addr), gid, sizeof *gid); in rdma_addr_set_sgid()
166 memcpy(gid, dev_addr->dst_dev_addr + rdma_addr_gid_offset(dev_addr), sizeof *gid); in rdma_addr_get_dgid()
[all …]
A Dib_cache.h14 union ib_gid *gid);
17 const union ib_gid *gid,
21 const union ib_gid *gid,
26 struct ib_device *device, const union ib_gid *gid, u32 port_num,
27 bool (*filter)(const union ib_gid *gid, const struct ib_gid_attr *,
108 bool rdma_is_zero_gid(const union ib_gid *gid);
A Dopa_addr.h33 static inline bool ib_is_opa_gid(const union ib_gid *gid) in ib_is_opa_gid() argument
35 return ((be64_to_cpu(gid->global.interface_id) >> 40) == in ib_is_opa_gid()
46 static inline u32 opa_get_lid_from_gid(const union ib_gid *gid) in opa_get_lid_from_gid() argument
48 return be64_to_cpu(gid->global.interface_id) & 0xFFFFFFFF; in opa_get_lid_from_gid()
/linux/security/safesetid/
A Dlsm.c48 if (!gid_eq(rule->src_id.gid, src.gid)) in _setid_policy_lookup()
50 if (gid_eq(rule->dst_id.gid, dst.gid)){ in _setid_policy_lookup()
133 if (setid_policy_lookup((kid_t){.gid = cred->gid}, INVALID_ID, GID) == SIDPOL_DEFAULT) in safesetid_security_capable()
163 if (gid_eq(new_id.gid, old->gid) || gid_eq(new_id.gid, old->egid) || in id_permitted_for_cred()
164 gid_eq(new_id.gid, old->sgid)) in id_permitted_for_cred()
183 __kgid_val(old->gid), __kgid_val(old->egid), in id_permitted_for_cred()
184 __kgid_val(old->sgid), __kgid_val(new_id.gid)); in id_permitted_for_cred()
226 if (setid_policy_lookup((kid_t){.gid = old->gid}, INVALID_ID, GID) == SIDPOL_DEFAULT) in safesetid_task_fix_setgid()
229 if (id_permitted_for_cred(old, (kid_t){.gid = new->gid}, GID) && in safesetid_task_fix_setgid()
230 id_permitted_for_cred(old, (kid_t){.gid = new->egid}, GID) && in safesetid_task_fix_setgid()
[all …]
A Dsecurityfs.c59 rule->src_id.gid = make_kgid(file->f_cred->user_ns, parsed_parent); in parse_policy_line()
60 rule->dst_id.gid = make_kgid(file->f_cred->user_ns, parsed_child); in parse_policy_line()
61 if (!gid_valid(rule->src_id.gid) || !gid_valid(rule->dst_id.gid)) in parse_policy_line()
93 hash_add(pol->rules, &rule->next, __kgid_val(rule->src_id.gid)); in insert_rule()
112 __kgid_val(rule->src_id.gid), in verify_ruleset()
113 __kgid_val(rule->dst_id.gid)); in verify_ruleset()
129 nrule->src_id.gid = rule->dst_id.gid; in verify_ruleset()
130 nrule->dst_id.gid = rule->dst_id.gid; in verify_ruleset()
/linux/drivers/pinctrl/mvebu/
A Dpinctrl-mvebu.c42 unsigned gid; member
285 unsigned gid) in mvebu_pinmux_set() argument
379 unsigned gid) in mvebu_pinctrl_get_group_name() argument
382 return pctl->groups[gid].name; in mvebu_pinctrl_get_group_name()
573 unsigned gid, n, k; in mvebu_pinctrl_probe() local
646 gid = 0; in mvebu_pinctrl_probe()
652 pctl->groups[gid].gid = gid; in mvebu_pinctrl_probe()
666 pctl->groups[gid].npins = 1; in mvebu_pinctrl_probe()
671 gid++; in mvebu_pinctrl_probe()
672 pctl->groups[gid].gid = gid; in mvebu_pinctrl_probe()
[all …]
/linux/drivers/infiniband/core/
A Dcache.c159 return !memcmp(gid, &zgid, sizeof(*gid)); in rdma_is_zero_gid()
328 entry->attr.gid.raw); in store_gid_entry()
520 memcmp(gid, &data->attr.gid, sizeof(*gid))) in find_gid()
559 if (rdma_is_zero_gid(gid)) in __ib_cache_gid_add()
577 attr->gid = *gid; in __ib_cache_gid_add()
586 __func__, gid->raw, ret); in __ib_cache_gid_add()
626 __func__, gid->raw, ret); in _ib_cache_gid_del()
759 if (memcmp(gid, &entry->attr.gid, sizeof(*gid))) in rdma_find_gid_by_filter()
842 union ib_gid gid = { }; in ib_cache_gid_set_default_gid() local
970 memcpy(gid, &table->data_vec[index]->attr.gid, sizeof(*gid)); in rdma_query_gid()
[all …]
/linux/kernel/
A Dgroups.c18 gi = kvmalloc(struct_size(gi, gid, gidsetsize), GFP_KERNEL_ACCOUNT); in groups_alloc()
45 gid_t gid; in groups_to_user() local
46 gid = from_kgid_munged(user_ns, group_info->gid[i]); in groups_to_user()
47 if (put_user(gid, grouplist+i)) in groups_to_user()
62 gid_t gid; in groups_from_user() local
64 if (get_user(gid, grouplist+i)) in groups_from_user()
67 kgid = make_kgid(user_ns, gid); in groups_from_user()
71 group_info->gid[i] = kgid; in groups_from_user()
86 sort(group_info->gid, group_info->ngroups, sizeof(*group_info->gid), in groups_sort()
103 if (gid_gt(grp, group_info->gid[mid])) in groups_search()
[all …]
A Duid16.c43 SYSCALL_DEFINE1(setgid16, old_gid_t, gid) in SYSCALL_DEFINE1() argument
45 return __sys_setgid(low2highgid(gid)); in SYSCALL_DEFINE1()
93 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); in SYSCALL_DEFINE3()
109 SYSCALL_DEFINE1(setfsgid16, old_gid_t, gid) in SYSCALL_DEFINE1() argument
111 return __sys_setfsgid(low2highgid(gid)); in SYSCALL_DEFINE1()
123 kgid = group_info->gid[i]; in groups16_to_user()
148 group_info->gid[i] = kgid; in groups16_from_user()
/linux/drivers/infiniband/hw/mthca/
A Dmthca_mcg.c42 u8 gid[16]; member
64 u8 *gid, struct mthca_mailbox *mgm_mailbox, in find_mgm() argument
77 memcpy(mgid, gid, 16); in find_mgm()
86 mthca_dbg(dev, "Hash for %pI6 is %04x\n", gid, *hash); in find_mgm()
98 if (!memcmp(mgm->gid, zero_gid, 16)) { in find_mgm()
106 if (!memcmp(mgm->gid, gid, 16)) in find_mgm()
143 if (!memcmp(mgm->gid, zero_gid, 16)) in mthca_multicast_attach()
144 memcpy(mgm->gid, gid->raw, 16); in mthca_multicast_attach()
161 memcpy(mgm->gid, gid->raw, 16); in mthca_multicast_attach()
236 mthca_err(dev, "MGID %pI6 not found\n", gid->raw); in mthca_multicast_detach()
[all …]
/linux/usr/
A Dgen_init_cpio.c104 unsigned int mode, uid_t uid, gid_t gid) in cpio_mkslink() argument
116 (long) gid, /* gid */ in cpio_mkslink()
140 int gid; in cpio_mkslink_line() local
153 uid_t uid, gid_t gid) in cpio_mkgeneric() argument
165 (long) gid, /* gid */ in cpio_mkgeneric()
211 int gid; in cpio_mkgeneric_line() local
220 rc = cpio_mkgeneric(name, mode, uid, gid); in cpio_mkgeneric_line()
259 (long) gid, /* gid */ in cpio_mknod()
279 int gid; in cpio_mknod_line() local
355 (long) gid, /* gid */ in cpio_mkfile()
[all …]
A Dgen_initramfs.sh17 $0 [-o <file>] [-l <dep_list>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
23 -g <gid> Group ID to map to group ID 0 (root).
24 <gid> is only meaningful if <cpio_source> is a
25 directory. "squash" forces all files to gid 0.
93 local gid="$4"
97 [ "$root_gid" = "squash" ] && gid=0 || [ "$gid" -eq "$root_gid" ] && gid=0
98 local str="${mode} ${uid} ${gid}"
/linux/ipc/
A Dcompat.c45 to->gid = v.gid; in get_compat_ipc64_perm()
57 to->gid = v.gid; in get_compat_ipc_perm()
66 to->gid = from->gid; in to_compat_ipc64_perm()
77 SET_GID(to->gid, from->gid); in to_compat_ipc_perm()
/linux/drivers/misc/sgi-gru/
A Dgruprocfs.c161 long gid = *(long *)data; in cch_seq_show() local
163 struct gru_state *gru = GID_TO_GRU(gid); in cch_seq_show()
167 if (gid == 0) in cch_seq_show()
189 long gid = *(long *)data, ctxfree, cbrfree, dsrfree; in gru_seq_show() local
190 struct gru_state *gru = GID_TO_GRU(gid); in gru_seq_show()
192 if (gid == 0) { in gru_seq_show()
215 if (*gid < gru_max_gids) in seq_start()
216 return gid; in seq_start()
222 (*gid)++; in seq_next()
223 if (*gid < gru_max_gids) in seq_next()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/
A Dmcg.c42 void *gid; in mlx5_core_attach_mcg() local
46 gid = MLX5_ADDR_OF(attach_to_mcg_in, in, multicast_gid); in mlx5_core_attach_mcg()
47 memcpy(gid, mgid, sizeof(*mgid)); in mlx5_core_attach_mcg()
55 void *gid; in mlx5_core_detach_mcg() local
59 gid = MLX5_ADDR_OF(detach_from_mcg_in, in, multicast_gid); in mlx5_core_detach_mcg()
60 memcpy(gid, mgid, sizeof(*mgid)); in mlx5_core_detach_mcg()
A Drdma.c122 static void mlx5_rdma_make_default_gid(struct mlx5_core_dev *dev, union ib_gid *gid) in mlx5_rdma_make_default_gid() argument
127 gid->global.subnet_prefix = cpu_to_be64(0xfe80000000000000LL); in mlx5_rdma_make_default_gid()
128 addrconf_addr_eui48(&gid->raw[8], hw_id); in mlx5_rdma_make_default_gid()
133 union ib_gid gid; in mlx5_rdma_add_roce_addr() local
136 mlx5_rdma_make_default_gid(dev, &gid); in mlx5_rdma_add_roce_addr()
139 0, gid.raw, mac, in mlx5_rdma_add_roce_addr()
/linux/fs/quota/
A Dkqid.c21 return gid_eq(left.gid, right.gid); in qid_eq()
47 return gid_lt(left.gid, right.gid); in qid_lt()
74 return from_kgid(targ, kqid.gid); in from_kqid()
107 return from_kgid_munged(targ, kqid.gid); in from_kqid_munged()
126 return gid_valid(qid.gid); in qid_valid()
/linux/drivers/infiniband/hw/bnxt_re/
A Dqplib_sp.c225 memcpy(gid, &sgid_tbl->tbl[index].gid, sizeof(*gid)); in bnxt_qplib_get_sgid()
248 if (!memcmp(&sgid_tbl->tbl[index].gid, gid, sizeof(*gid)) && in bnxt_qplib_del_sgid()
335 req.gid[0] = cpu_to_be32(((u32 *)gid->data)[3]); in bnxt_qplib_add_sgid()
336 req.gid[1] = cpu_to_be32(((u32 *)gid->data)[2]); in bnxt_qplib_add_sgid()
337 req.gid[2] = cpu_to_be32(((u32 *)gid->data)[1]); in bnxt_qplib_add_sgid()
338 req.gid[3] = cpu_to_be32(((u32 *)gid->data)[0]); in bnxt_qplib_add_sgid()
365 memcpy(&sgid_tbl->tbl[free_idx], gid, sizeof(*gid)); in bnxt_qplib_add_sgid()
395 req.gid[0] = cpu_to_be32(((u32 *)gid->data)[3]); in bnxt_qplib_update_sgid()
396 req.gid[1] = cpu_to_be32(((u32 *)gid->data)[2]); in bnxt_qplib_update_sgid()
397 req.gid[2] = cpu_to_be32(((u32 *)gid->data)[1]); in bnxt_qplib_update_sgid()
[all …]
/linux/net/core/
A Dscm.c49 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds() local
51 if (!uid_valid(uid) || !gid_valid(gid)) in scm_check_creds()
58 ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || in scm_check_creds()
59 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { in scm_check_creds()
166 kgid_t gid; in __scm_send() local
187 gid = make_kgid(current_user_ns(), creds.gid); in __scm_send()
188 if (!uid_valid(uid) || !gid_valid(gid)) in __scm_send()
192 p->creds.gid = gid; in __scm_send()
/linux/fs/nfsd/
A Dflexfilelayoutxdr.c31 struct ff_idmap gid; in nfsd4_ff_encode_layoutget() local
36 gid.len = sprintf(gid.buf, "%u", from_kgid(&init_user_ns, fl->gid)); in nfsd4_ff_encode_layoutget()
40 8 + uid.len + 8 + gid.len; in nfsd4_ff_encode_layoutget()
70 p = xdr_encode_opaque(p, gid.buf, gid.len); in nfsd4_ff_encode_layoutget()
/linux/fs/tracefs/
A Dinode.c142 kgid_t gid; member
168 dentry->d_inode->i_gid = gid; in change_gid()
186 change_gid(this_parent, gid); in set_gid()
197 change_gid(dentry, gid); in set_gid()
241 kgid_t gid; in tracefs_parse_options() local
263 gid = make_kgid(current_user_ns(), option); in tracefs_parse_options()
264 if (!gid_valid(gid)) in tracefs_parse_options()
266 opts->gid = gid; in tracefs_parse_options()
267 set_gid(tracefs_mount->mnt_root, gid); in tracefs_parse_options()
294 inode->i_gid = opts->gid; in tracefs_apply_options()
[all …]
/linux/include/net/
A Dscm.h21 kgid_t gid; member
57 struct pid *pid, kuid_t uid, kgid_t gid) in scm_set_cred() argument
62 scm->creds.gid = gid; in scm_set_cred()
83 scm->creds.gid = INVALID_GID; in scm_send()
128 .gid = from_kgid_munged(current_ns, scm->creds.gid), in scm_recv()
/linux/drivers/net/ethernet/mellanox/mlx4/
A Dmcg.c712 memcpy(mgid, gid, 16); in find_entry()
738 if (!memcmp(mgm->gid, gid, 16) && in find_entry()
1116 u8 port = gid[5]; in mlx4_qp_attach_common()
1133 memcpy(mgm->gid, gid, 16); in mlx4_qp_attach_common()
1148 memcpy(mgm->gid, gid, 16); in mlx4_qp_attach_common()
1224 u8 port = gid[5]; in mlx4_qp_detach_common()
1290 memset(mgm->gid, 0, 16); in mlx4_qp_detach_common()
1350 memcpy(mailbox->buf, gid, 16); in mlx4_QP_ATTACH()
1368 u8 gid[16], u8 port, in mlx4_trans_to_dmfs_attach()
1534 gid[7] |= (MLX4_UC_STEER << 1); in mlx4_unicast_attach()
[all …]

Completed in 49 milliseconds

12345678910>>...20