Searched refs:gid (Results 1 - 200 of 403) sorted by relevance

123

/linux-4.1.27/include/linux/
H A Dhighuid.h25 * This is the "overflow" UID and GID. They are used to signify uid/gid
26 * overflow to old programs when they request uid/gid information but are
29 * processes are owned by this uid/gid.
47 #define high2lowgid(gid) ((gid) & ~0xFFFF ? (old_gid_t)overflowgid : (old_gid_t)(gid))
53 #define low2highgid(gid) ((gid) == (old_gid_t)-1 ? (gid_t)-1 : (gid_t)(gid))
57 #define __convert_gid(size, gid) \
58 (size >= sizeof(gid) ? (gid) : high2lowgid(gid))
64 #define __convert_gid(size, gid) (gid)
68 /* uid/gid input should be always 32bit uid_t */
70 #define SET_GID(var, gid) do { (var) = __convert_gid(sizeof(var), (gid)); } while (0)
92 #define fs_high2lowgid(gid) ((gid) & ~0xFFFF ? (gid16_t)fs_overflowgid : (gid16_t)(gid))
H A Duidgid.h8 * the kernel are values used by userspace and which uid and gid values are
38 static inline gid_t __kgid_val(kgid_t gid) __kgid_val() argument
40 return gid.val; __kgid_val()
48 static inline gid_t __kgid_val(kgid_t gid) __kgid_val() argument
115 static inline bool gid_valid(kgid_t gid) gid_valid() argument
117 return __kgid_val(gid) != (gid_t) -1; gid_valid()
123 extern kgid_t make_kgid(struct user_namespace *from, gid_t gid);
126 extern gid_t from_kgid(struct user_namespace *to, kgid_t gid);
128 extern gid_t from_kgid_munged(struct user_namespace *to, kgid_t gid);
135 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) kgid_has_mapping() argument
137 return from_kgid(ns, gid) != (gid_t) -1; kgid_has_mapping()
147 static inline kgid_t make_kgid(struct user_namespace *from, gid_t gid) make_kgid() argument
149 return KGIDT_INIT(gid); make_kgid()
172 gid_t gid = from_kgid(to, kgid); from_kgid_munged() local
173 if (gid == (gid_t)-1) from_kgid_munged()
174 gid = overflowgid; from_kgid_munged()
175 return gid; from_kgid_munged()
183 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) kgid_has_mapping() argument
H A Dipc.h18 kgid_t gid; member in struct:kern_ipc_perm
H A Dstat.h27 kgid_t gid; member in struct:kstat
H A Dshmem_fs.h35 kgid_t gid; /* Mount gid for root directory */ member in struct:shmem_sb_info
H A Dauto_dev-ioctl.h65 __u32 gid; member in struct:args_requester
158 /* Get mount last requesting uid and gid */
H A Dquota.h71 kgid_t gid; member in union:kqid::__anon12383
74 enum quota_type type; /* USRQUOTA (uid) or GRPQUOTA (gid) or PRJQUOTA (projid) */
108 kqid.gid = make_kgid(from, qid); make_kqid()
135 kqid.gid = INVALID_GID; make_kqid_invalid()
160 * @gid: The kgid to make the quota identifier from
162 static inline struct kqid make_kqid_gid(kgid_t gid) make_kqid_gid() argument
166 kqid.gid = gid; make_kqid_gid()
274 #define DQ_BLKS_B 1 /* uid/gid has been warned about blk limit */
275 #define DQ_INODES_B 2 /* uid/gid has been warned about inode limit */
294 struct kqid dq_id; /* ID this applies to (uid, gid, projid) */
H A Dproc_fs.h67 static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {} PDE_DATA() argument
H A Dacct.h38 * 0: old format (until 2.6.7) with 16 bit uid/gid
H A Damigaffs.h85 __be16 gid; member in struct:affs_tail
H A Dkey.h148 kgid_t gid; member in struct:key
216 kuid_t uid, kgid_t gid,
290 extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid,
H A Daudit.h75 kgid_t gid; member in union:audit_field::__anon11495
239 extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
264 static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode) audit_ipc_set_perm() argument
267 __audit_ipc_set_perm(qbytes, uid, gid, mode); audit_ipc_set_perm()
398 gid_t gid, umode_t mode) audit_ipc_set_perm()
397 audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode) audit_ipc_set_perm() argument
H A Dcred.h128 kgid_t gid; /* real GID of the task */ member in struct:cred
357 #define current_gid() (current_cred_xxx(gid))
381 *(_gid) = __cred->gid; \
/linux-4.1.27/include/rdma/
H A Dib_addr.h129 union ib_gid *gid) ib_addr_get_mgid()
131 memcpy(gid, dev_addr->broadcast + 4, sizeof *gid); ib_addr_get_mgid()
145 static inline int rdma_ip2gid(struct sockaddr *addr, union ib_gid *gid) rdma_ip2gid() argument
151 (struct in6_addr *)gid); rdma_ip2gid()
154 memcpy(gid->raw, &((struct sockaddr_in6 *)addr)->sin6_addr, 16); rdma_ip2gid()
163 static inline void rdma_gid2ip(struct sockaddr *out, union ib_gid *gid) rdma_gid2ip() argument
165 if (ipv6_addr_v4mapped((struct in6_addr *)gid)) { rdma_gid2ip()
169 memcpy(&out_in->sin_addr.s_addr, gid->raw + 12, 4); rdma_gid2ip()
174 memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16); rdma_gid2ip()
179 union ib_gid *gid) iboe_addr_get_sgid()
189 (struct in6_addr *)gid); iboe_addr_get_sgid()
194 static inline void rdma_addr_get_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) rdma_addr_get_sgid() argument
198 iboe_addr_get_sgid(dev_addr, gid); rdma_addr_get_sgid()
200 memcpy(gid, dev_addr->src_dev_addr + rdma_addr_get_sgid()
201 rdma_addr_gid_offset(dev_addr), sizeof *gid); rdma_addr_get_sgid()
204 static inline void rdma_addr_set_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) rdma_addr_set_sgid() argument
206 memcpy(dev_addr->src_dev_addr + rdma_addr_gid_offset(dev_addr), gid, sizeof *gid); rdma_addr_set_sgid()
209 static inline void rdma_addr_get_dgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) rdma_addr_get_dgid() argument
211 memcpy(gid, dev_addr->dst_dev_addr + rdma_addr_gid_offset(dev_addr), sizeof *gid); rdma_addr_get_dgid()
214 static inline void rdma_addr_set_dgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) rdma_addr_set_dgid() argument
216 memcpy(dev_addr->dst_dev_addr + rdma_addr_gid_offset(dev_addr), gid, sizeof *gid); rdma_addr_set_dgid()
128 ib_addr_get_mgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) ib_addr_get_mgid() argument
178 iboe_addr_get_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) iboe_addr_get_sgid() argument
H A Dib_cache.h45 * @gid: The GID value found at the specified index.
53 union ib_gid *gid);
59 * @gid: The GID value to search for.
68 union ib_gid *gid,
/linux-4.1.27/drivers/infiniband/hw/mthca/
H A Dmthca_mcg.c42 u8 gid[16]; member in struct:mthca_mgm
49 * Caller must hold MCG table semaphore. gid and mgm parameters must
60 * If no AMGM exists for given gid, *index = -1, *prev = index of last
64 u8 *gid, struct mthca_mailbox *mgm_mailbox, find_mgm()
77 memcpy(mgid, gid, 16); find_mgm()
86 mthca_dbg(dev, "Hash for %pI6 is %04x\n", gid, *hash); find_mgm()
98 if (!memcmp(mgm->gid, zero_gid, 16)) { find_mgm()
106 if (!memcmp(mgm->gid, gid, 16)) find_mgm()
120 int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) mthca_multicast_attach() argument
138 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); mthca_multicast_attach()
143 if (!memcmp(mgm->gid, zero_gid, 16)) mthca_multicast_attach()
144 memcpy(mgm->gid, gid->raw, 16); mthca_multicast_attach()
161 memcpy(mgm->gid, gid->raw, 16); mthca_multicast_attach()
214 int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) mthca_multicast_detach() argument
231 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); mthca_multicast_detach()
236 mthca_err(dev, "MGID %pI6 not found\n", gid->raw); mthca_multicast_detach()
277 memset(mgm->gid, 0, 16); mthca_multicast_detach()
63 find_mgm(struct mthca_dev *dev, u8 *gid, struct mthca_mailbox *mgm_mailbox, u16 *hash, int *prev, int *index) find_mgm() argument
/linux-4.1.27/usr/
H A Dgen_init_cpio.c83 (long) 0, /* gid */ cpio_trailer()
103 unsigned int mode, uid_t uid, gid_t gid) cpio_mkslink()
115 (long) gid, /* gid */ cpio_mkslink()
139 int gid; cpio_mkslink_line() local
142 if (5 != sscanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &uid, &gid)) { cpio_mkslink_line()
146 rc = cpio_mkslink(name, target, mode, uid, gid); cpio_mkslink_line()
152 uid_t uid, gid_t gid) cpio_mkgeneric()
164 (long) gid, /* gid */ cpio_mkgeneric()
210 int gid; cpio_mkgeneric_line() local
213 if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) { cpio_mkgeneric_line()
219 rc = cpio_mkgeneric(name, mode, uid, gid); cpio_mkgeneric_line()
240 uid_t uid, gid_t gid, char dev_type, cpio_mknod()
258 (long) gid, /* gid */ cpio_mknod()
278 int gid; cpio_mknod_line() local
285 name, &mode, &uid, &gid, &dev_type, &maj, &min)) { cpio_mknod_line()
289 rc = cpio_mknod(name, mode, uid, gid, dev_type, maj, min); cpio_mknod_line()
295 unsigned int mode, uid_t uid, gid_t gid, cpio_mkfile()
348 (long) gid, /* gid */ cpio_mkfile()
406 int gid; cpio_mkfile_line() local
413 name, location, &mode, &uid, &gid, &end)) { cpio_mkfile_line()
445 mode, uid, gid, nlinks); cpio_mkfile_line()
460 "file <name> <location> <mode> <uid> <gid> [<hard links>]\n" usage()
461 "dir <name> <mode> <uid> <gid>\n" usage()
462 "nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n" usage()
463 "slink <name> <target> <mode> <uid> <gid>\n" usage()
464 "pipe <name> <mode> <uid> <gid>\n" usage()
465 "sock <name> <mode> <uid> <gid>\n" usage()
473 "<gid> group id (0=root)\n" usage()
102 cpio_mkslink(const char *name, const char *target, unsigned int mode, uid_t uid, gid_t gid) cpio_mkslink() argument
151 cpio_mkgeneric(const char *name, unsigned int mode, uid_t uid, gid_t gid) cpio_mkgeneric() argument
239 cpio_mknod(const char *name, unsigned int mode, uid_t uid, gid_t gid, char dev_type, unsigned int maj, unsigned int min) cpio_mknod() argument
294 cpio_mkfile(const char *name, const char *location, unsigned int mode, uid_t uid, gid_t gid, unsigned int nlinks) cpio_mkfile() argument
/linux-4.1.27/drivers/misc/sgi-gru/
H A Dgruprocfs.c174 long gid = *(long *)data; cch_seq_show() local
176 struct gru_state *gru = GID_TO_GRU(gid); cch_seq_show()
180 if (gid == 0) cch_seq_show()
181 seq_printf(file, "#%5s%5s%6s%7s%9s%6s%8s%8s\n", "gid", "bid", cch_seq_show()
190 is_kernel_context(ts) ? 0 : ts->ts_gms->ms_asids[gid].mt_asid, cch_seq_show()
203 long gid = *(long *)data, ctxfree, cbrfree, dsrfree; gru_seq_show() local
204 struct gru_state *gru = GID_TO_GRU(gid); gru_seq_show()
206 if (gid == 0) { gru_seq_show()
207 seq_printf(file, "#%5s%5s%7s%6s%6s%8s%6s%6s\n", "gid", "nid", gru_seq_show()
229 static void *seq_start(struct seq_file *file, loff_t *gid) seq_start() argument
231 if (*gid < gru_max_gids) seq_start()
232 return gid; seq_start()
236 static void *seq_next(struct seq_file *file, void *data, loff_t *gid) seq_next() argument
238 (*gid)++; seq_next()
239 if (*gid < gru_max_gids) seq_next()
240 return gid; seq_next()
H A Dgrukdump.c176 hdr.gid = gru->gs_gid; gru_dump_context()
198 /* Currently, only dump by gid is implemented */ gru_dump_chiplet_request()
199 if (req.gid >= gru_max_gids || req.gid < 0) gru_dump_chiplet_request()
202 gru = GID_TO_GRU(req.gid); gru_dump_chiplet_request()
H A Dgrulib.h116 unsigned int gid; member in struct:gru_dump_chiplet_state_req
132 unsigned int gid; member in struct:gru_dump_context_header
H A Dgrutables.h510 /* Convert a gid to a pointer to the GRU */
511 #define GID_TO_GRU(gid) \
512 (gru_base[(gid) / GRU_CHIPLETS_PER_BLADE] ? \
513 (&gru_base[(gid) / GRU_CHIPLETS_PER_BLADE]-> \
514 bs_grus[(gid) % GRU_CHIPLETS_PER_BLADE]) : \
518 #define for_each_gru_in_bitmap(gid, map) \
519 for_each_set_bit((gid), (map), GRU_MAX_GRUS)
528 #define foreach_gid(gid) \
529 for ((gid) = 0; (gid) < gru_max_gids; (gid)++)
H A Dgrutlbpurge.c165 int grupagesize, pagesize, pageshift, gid, asid; gru_flush_tlb_range() local
178 for_each_gru_in_bitmap(gid, gms->ms_asidmap) { gru_flush_tlb_range()
180 gru = GID_TO_GRU(gid); gru_flush_tlb_range()
181 asids = gms->ms_asids + gid; gru_flush_tlb_range()
188 gid, asid, start, grupagesize, num, asids->mt_ctxbitmap); gru_flush_tlb_range()
199 gid, asid, asids->mt_ctxbitmap, gru_flush_tlb_range()
213 gru_dbg(grudev, "gid %d\n", gru->gs_gid); gru_flush_all_tlb()
H A Dgrumain.c99 gru_dbg(grudev, "gid %d\n", gru->gs_gid); gru_wrap_asid()
108 int i, gid, inuse_asid, limit; gru_reset_asid_limit() local
110 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid); gru_reset_asid_limit()
116 gid = gru->gs_gid; gru_reset_asid_limit()
121 inuse_asid = gru->gs_gts[i]->ts_gms->ms_asids[gid].mt_asid; gru_reset_asid_limit()
122 gru_dbg(grudev, "gid %d, gts %p, gms %p, inuse 0x%x, cxt %d\n", gru_reset_asid_limit()
144 gru_dbg(grudev, "gid %d, new asid 0x%x, new_limit 0x%x\n", gru->gs_gid, gru_reset_asid_limit()
159 gru_dbg(grudev, "gid %d, asid 0x%x\n", gru->gs_gid, asid); gru_assign_asid()
267 "gid %d, gts %p, gms %p, ctxnum %d, asid 0x%x, asidmap 0x%lx\n", gru_load_mm_tracker()
286 gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n", gru_unload_mm_tracker()
442 gru_dbg(grudev, "gts %p, gid %d\n", gts, gru->gs_gid); gru_free_gru_context()
648 gru_dbg(grudev, "gid %d, gts %p, cbrmap 0x%lx, dsrmap 0x%lx, tie %d, tis %d\n", gru_load_context()
848 "stole gid %d, ctxnum %d from gts %p. Need cb %d, ds %d;" gru_steal_context()
910 "gseg %p, gts %p, gid %d, ctx %d, cbr %d, dsr %d\n",
H A Dgrufault.c346 "%s: gid %d, gts 0x%p, tfh 0x%p, vaddr 0x%lx, asid 0x%x, rw %d, ps %d, gpa 0x%lx\n", gru_preload_tlb()
446 "%s: gid %d, gts 0x%p, tfh 0x%p, vaddr 0x%lx, asid 0x%x, indexway 0x%x," gru_try_dropin()
547 "cpu %d, chiplet %d, gid %d, imap %016lx %016lx, dmap %016lx %016lx\n", gru_intr()
557 gru_dbg(grudev, "gid %d, cbr_done %d, done %d\n", for_each_cbr_in_tfm()
663 gru_dbg(grudev, "address 0x%lx, gid %d, gts 0x%p\n", cb, gts->ts_gru ? gts->ts_gru->gs_gid : -1, gts); gru_handle_user_call_os()
710 gru_dbg(grudev, "address 0x%lx, gid %d, gts 0x%p\n", excdet.cb, gts->ts_gru ? gts->ts_gru->gs_gid : -1, gts); gru_get_exception_detail()
750 int gid, ctxnum; gru_unload_all_contexts() local
754 foreach_gid(gid) { foreach_gid()
755 gru = GID_TO_GRU(gid); foreach_gid()
/linux-4.1.27/fs/gfs2/
H A Dquota.h21 extern int gfs2_quota_hold(struct gfs2_inode *ip, kuid_t uid, kgid_t gid);
24 extern int gfs2_quota_lock(struct gfs2_inode *ip, kuid_t uid, kgid_t gid);
27 extern int gfs2_quota_check(struct gfs2_inode *ip, kuid_t uid, kgid_t gid,
30 kuid_t uid, kgid_t gid);
H A Dquota.c530 int gfs2_quota_hold(struct gfs2_inode *ip, kuid_t uid, kgid_t gid) gfs2_quota_hold() argument
572 if (!gid_eq(gid, NO_GID_QUOTA_CHANGE) && gfs2_quota_hold()
573 !gid_eq(gid, ip->i_inode.i_gid)) { gfs2_quota_hold()
574 error = qdsb_get(sdp, make_kqid_gid(gid), qd); gfs2_quota_hold()
961 int gfs2_quota_lock(struct gfs2_inode *ip, kuid_t uid, kgid_t gid) gfs2_quota_lock() argument
968 error = gfs2_quota_hold(ip, uid, gid); gfs2_quota_lock()
1101 * @gid: The gid to check against
1114 int gfs2_quota_check(struct gfs2_inode *ip, kuid_t uid, kgid_t gid, gfs2_quota_check() argument
1134 qid_eq(qd->qd_id, make_kqid_gid(gid)))) gfs2_quota_check()
1172 kuid_t uid, kgid_t gid) gfs2_quota_change()
1186 qid_eq(qd->qd_id, make_kqid_gid(gid))) { gfs2_quota_change()
1171 gfs2_quota_change(struct gfs2_inode *ip, s64 change, kuid_t uid, kgid_t gid) gfs2_quota_change() argument
/linux-4.1.27/fs/quota/
H A Dkqid.c20 return gid_eq(left.gid, right.gid); qid_eq()
46 return gid_lt(left.gid, right.gid); qid_lt()
73 return from_kgid(targ, kqid.gid); from_kqid()
106 return from_kgid_munged(targ, kqid.gid); from_kqid_munged()
125 return gid_valid(qid.gid); qid_valid()
/linux-4.1.27/include/net/
H A Dscm.h18 kgid_t gid; member in struct:scm_creds
54 struct pid *pid, kuid_t uid, kgid_t gid) scm_set_cred()
59 scm->creds.gid = gid; scm_set_cred()
80 scm->creds.gid = INVALID_GID; scm_send()
125 .gid = from_kgid_munged(current_ns, scm->creds.gid), scm_recv()
53 scm_set_cred(struct scm_cookie *scm, struct pid *pid, kuid_t uid, kgid_t gid) scm_set_cred() argument
H A Daf_unix.h33 kgid_t gid; member in struct:unix_skb_parms
H A Dgarp.h106 struct rb_root gid; member in struct:garp_applicant
/linux-4.1.27/drivers/infiniband/hw/ehca/
H A Dehca_mcast.c55 #define EHCA_VALID_MULTICAST_GID(gid) ((gid)[0] == 0xFF)
59 int ehca_attach_mcast(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) ehca_attach_mcast() argument
72 if (!(EHCA_VALID_MULTICAST_GID(gid->raw))) { ehca_attach_mcast()
73 ehca_err(ibqp->device, "invalid mulitcast gid"); ehca_attach_mcast()
80 memcpy(&my_gid, gid->raw, sizeof(union ib_gid)); ehca_attach_mcast()
96 int ehca_detach_mcast(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) ehca_detach_mcast() argument
109 if (!(EHCA_VALID_MULTICAST_GID(gid->raw))) { ehca_detach_mcast()
110 ehca_err(ibqp->device, "invalid mulitcast gid"); ehca_detach_mcast()
117 memcpy(&my_gid, gid->raw, sizeof(union ib_gid)); ehca_detach_mcast()
H A Dehca_av.c130 union ib_gid gid; ehca_create_ah() local
141 memset(&gid, 0, sizeof(gid)); ehca_create_ah()
144 ah_attr->grh.sgid_index, &gid); ehca_create_ah()
152 memcpy(&av->av.grh.word_1, &gid, sizeof(gid)); ehca_create_ah()
194 union ib_gid gid; ehca_modify_ah() local
205 memset(&gid, 0, sizeof(gid)); ehca_modify_ah()
208 ah_attr->grh.sgid_index, &gid); ehca_modify_ah()
218 memcpy(&new_ehca_av.grh.word_1, &gid, sizeof(gid)); ehca_modify_ah()
H A Dehca_iverbs.h58 union ib_gid *gid);
179 int ehca_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid);
181 int ehca_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid);
H A Dehca_hca.c316 int index, union ib_gid *gid) ehca_query_gid()
342 memcpy(&gid->raw[0], &rblock->gid_prefix, sizeof(u64)); ehca_query_gid()
343 memcpy(&gid->raw[8], &rblock->guid_entries[index], sizeof(u64)); ehca_query_gid()
315 ehca_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) ehca_query_gid() argument
/linux-4.1.27/drivers/pinctrl/mvebu/
H A Dpinctrl-mvebu.c44 unsigned gid; member in struct:mvebu_pinctrl_group
141 unsigned gid, unsigned long *config) mvebu_pinconf_group_get()
144 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; mvebu_pinconf_group_get()
153 unsigned gid, unsigned long *configs, mvebu_pinconf_group_set()
157 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; mvebu_pinconf_group_set()
173 struct seq_file *s, unsigned gid) mvebu_pinconf_group_dbg_show()
176 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; mvebu_pinconf_group_dbg_show()
181 if (mvebu_pinconf_group_get(pctldev, gid, &config)) mvebu_pinconf_group_dbg_show()
263 unsigned gid) mvebu_pinmux_set()
267 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; mvebu_pinmux_set()
277 func->name, func->groups[gid]); mvebu_pinmux_set()
282 ret = mvebu_pinconf_group_set(pctldev, grp->gid, &config, 1); mvebu_pinmux_set()
285 func->groups[gid], func->name); mvebu_pinmux_set()
313 return mvebu_pinconf_group_set(pctldev, grp->gid, &config, 1); mvebu_pinmux_gpio_request_enable()
357 unsigned gid) mvebu_pinctrl_get_group_name()
360 return pctl->groups[gid].name; mvebu_pinctrl_get_group_name()
364 unsigned gid, const unsigned **pins, mvebu_pinctrl_get_group_pins()
368 *pins = pctl->groups[gid].pins; mvebu_pinctrl_get_group_pins()
369 *num_pins = pctl->groups[gid].npins; mvebu_pinctrl_get_group_pins()
553 unsigned gid, n, k; mvebu_pinctrl_probe() local
629 gid = 0; mvebu_pinctrl_probe()
632 pctl->groups[gid].gid = gid; mvebu_pinctrl_probe()
633 pctl->groups[gid].ctrl = ctrl; mvebu_pinctrl_probe()
634 pctl->groups[gid].name = ctrl->name; mvebu_pinctrl_probe()
635 pctl->groups[gid].pins = ctrl->pins; mvebu_pinctrl_probe()
636 pctl->groups[gid].npins = ctrl->npins; mvebu_pinctrl_probe()
644 pctl->groups[gid].name = noname_buf; mvebu_pinctrl_probe()
645 pctl->groups[gid].npins = 1; mvebu_pinctrl_probe()
650 gid++; mvebu_pinctrl_probe()
651 pctl->groups[gid].gid = gid; mvebu_pinctrl_probe()
652 pctl->groups[gid].ctrl = ctrl; mvebu_pinctrl_probe()
653 pctl->groups[gid].name = noname_buf; mvebu_pinctrl_probe()
654 pctl->groups[gid].pins = &ctrl->pins[k]; mvebu_pinctrl_probe()
655 pctl->groups[gid].npins = 1; mvebu_pinctrl_probe()
660 gid++; mvebu_pinctrl_probe()
140 mvebu_pinconf_group_get(struct pinctrl_dev *pctldev, unsigned gid, unsigned long *config) mvebu_pinconf_group_get() argument
152 mvebu_pinconf_group_set(struct pinctrl_dev *pctldev, unsigned gid, unsigned long *configs, unsigned num_configs) mvebu_pinconf_group_set() argument
172 mvebu_pinconf_group_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, unsigned gid) mvebu_pinconf_group_dbg_show() argument
262 mvebu_pinmux_set(struct pinctrl_dev *pctldev, unsigned fid, unsigned gid) mvebu_pinmux_set() argument
356 mvebu_pinctrl_get_group_name(struct pinctrl_dev *pctldev, unsigned gid) mvebu_pinctrl_get_group_name() argument
363 mvebu_pinctrl_get_group_pins(struct pinctrl_dev *pctldev, unsigned gid, const unsigned **pins, unsigned *num_pins) mvebu_pinctrl_get_group_pins() argument
/linux-4.1.27/net/core/
H A Dscm.c51 kgid_t gid = make_kgid(cred->user_ns, creds->gid); scm_check_creds() local
53 if (!uid_valid(uid) || !gid_valid(gid)) scm_check_creds()
60 ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || scm_check_creds()
61 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { scm_check_creds()
168 kgid_t gid; for_each_cmsghdr() local
189 gid = make_kgid(current_user_ns(), creds.gid); for_each_cmsghdr()
190 if (!uid_valid(uid) || !gid_valid(gid)) for_each_cmsghdr()
194 p->creds.gid = gid; for_each_cmsghdr()
/linux-4.1.27/fs/hfsplus/
H A Doptions.c35 { opt_gid, "gid=%u" },
57 opts->gid = current_gid(); hfsplus_fill_defaults()
146 pr_err("gid requires an argument\n"); hfsplus_parse_options()
149 sbi->gid = make_kgid(current_user_ns(), (gid_t)tmp); hfsplus_parse_options()
150 if (!gid_valid(sbi->gid)) { hfsplus_parse_options()
151 pr_err("invalid gid specified\n"); hfsplus_parse_options()
224 seq_printf(seq, ",umask=%o,uid=%u,gid=%u", sbi->umask, hfsplus_show_options()
226 from_kgid_munged(&init_user_ns, sbi->gid)); hfsplus_show_options()
/linux-4.1.27/include/uapi/linux/
H A Dauxvec.h21 #define AT_GID 13 /* real gid */
22 #define AT_EGID 14 /* effective gid */
H A Dncp_mount.h39 __kernel_gid_t gid; member in struct:ncp_mount_data
63 unsigned long gid; member in struct:ncp_mount_data_v4
H A Dipc.h13 __kernel_gid_t gid; member in struct:ipc_perm
H A Dminix_fs.h32 * Note the 8-bit gid and atime and ctime.
H A Dcramfs_fs.h32 __u32 size:CRAMFS_SIZE_WIDTH, gid:CRAMFS_GID_WIDTH; member in struct:cramfs_inode
H A Dauto_fs4.h136 __u32 gid; member in struct:autofs_v5_packet
H A Dcn_proc.h89 __u32 rgid; /* task gid */
H A Djffs2.h135 /* The uid, gid, atime, mtime and ctime members could be longer, but
150 jint16_t gid; /* The file's group. */ member in struct:jffs2_raw_inode
H A Dfuse.h161 uint32_t gid; member in struct:fuse_attr
464 uint32_t gid; member in struct:fuse_setattr_in
679 uint32_t gid; member in struct:fuse_in_header
/linux-4.1.27/arch/sparc/include/uapi/asm/
H A Dipcbuf.h19 __kernel_gid_t gid; member in struct:ipc64_perm
/linux-4.1.27/arch/s390/include/uapi/asm/
H A Dipcbuf.h18 __kernel_gid32_t gid; member in struct:ipc64_perm
/linux-4.1.27/scripts/
H A Dgen_initramfs_list.sh18 $0 [-o <file>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
24 -g <gid> Group ID to map to group ID 0 (root).
25 <gid> is only meaningful if <cpio_source> is a
26 directory. "squash" forces all files to gid 0.
104 # <filetype> <name> <path to file> <octal mode> <uid> <gid>
113 local gid="$4"
115 # remap uid/gid to 0 if necessary
117 [ "$root_gid" = "squash" ] && gid=0 || [ "$gid" -eq "$root_gid" ] && gid=0
118 local str="${mode} ${uid} ${gid}"
273 "-g") # map $1 to gid=0 (root)
/linux-4.1.27/arch/s390/kernel/
H A Dcompat_linux.c77 #define high2lowgid(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid)
79 #define low2highgid(gid) ((gid) == (u16)-1) ? (gid_t)-1 : (gid_t)(gid)
81 #define SET_GID16(var, gid) var = high2lowgid(gid)
83 #define NEW_TO_OLD_GID(gid) high2lowgid(gid)
85 #define SET_OLDSTAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
87 #define SET_STAT_GID(stat, gid) (stat).st_gid = high2lowgid(gid)
111 COMPAT_SYSCALL_DEFINE1(s390_setgid16, u16, gid) COMPAT_SYSCALL_DEFINE1()
113 return sys_setgid((gid_t)gid); COMPAT_SYSCALL_DEFINE1()
163 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); COMPAT_SYSCALL_DEFINE3()
179 COMPAT_SYSCALL_DEFINE1(s390_setfsgid16, u16, gid) COMPAT_SYSCALL_DEFINE1()
181 return sys_setfsgid((gid_t)gid); COMPAT_SYSCALL_DEFINE1()
370 tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); cp_stat64()
H A Dcompat_linux.h94 long compat_sys_s390_setgid16(u16 gid);
102 long compat_sys_s390_setfsgid16(u16 gid);
/linux-4.1.27/kernel/
H A Dgroups.c72 gid_t gid; groups_to_user() local
73 gid = from_kgid_munged(user_ns, GROUP_AT(group_info, i)); groups_to_user()
74 if (put_user(gid, grouplist+i)) groups_to_user()
89 gid_t gid; groups_from_user() local
91 if (get_user(gid, grouplist+i)) groups_from_user()
94 kgid = make_kgid(user_ns, gid); groups_from_user()
H A Duid16.c39 SYSCALL_DEFINE1(setgid16, old_gid_t, gid) SYSCALL_DEFINE1()
41 return sys_setgid(low2highgid(gid)); SYSCALL_DEFINE1()
90 rgid = high2lowgid(from_kgid_munged(cred->user_ns, cred->gid)); SYSCALL_DEFINE3()
106 SYSCALL_DEFINE1(setfsgid16, old_gid_t, gid) SYSCALL_DEFINE1()
108 return sys_setfsgid(low2highgid(gid)); SYSCALL_DEFINE1()
H A Duser_namespace.c294 * make_kgid - Map a user-namespace gid pair into a kgid.
295 * @ns: User namespace that the gid is in
296 * @gid: group identifier
298 * Maps a user-namespace gid pair into a kernel internal kgid,
301 * When there is no mapping defined for the user-namespace gid
306 kgid_t make_kgid(struct user_namespace *ns, gid_t gid) make_kgid() argument
308 /* Map the gid to a global kernel gid */ make_kgid()
309 return KGIDT_INIT(map_id_down(&ns->gid_map, gid)); make_kgid()
314 * from_kgid - Create a gid from a kgid user-namespace pair.
315 * @targ: The user namespace we want a gid in.
316 * @kgid: The kernel internal gid to start with.
319 * return the resulting gid.
327 /* Map the gid from a global kernel gid */ from_kgid()
333 * from_kgid_munged - Create a gid from a kgid user-namespace pair.
334 * @targ: The user namespace we want a gid in.
335 * @kgid: The kernel internal gid to start with.
338 * return the resulting gid.
343 * returns a valid gid. This makes from_kgid_munged appropriate
345 * system call and failing to provide a valid gid are not options.
351 gid_t gid; from_kgid_munged() local
352 gid = from_kgid(targ, kgid); from_kgid_munged()
354 if (gid == (gid_t) -1) from_kgid_munged()
355 gid = overflowgid; from_kgid_munged()
356 return gid; from_kgid_munged()
831 kgid_t gid = make_kgid(ns->parent, id); new_idmap_permitted() local
833 gid_eq(gid, cred->egid)) new_idmap_permitted()
936 /* It is not safe to use setgroups until a gid mapping in userns_may_setgroups()
H A Dauditsc.c334 static int audit_compare_gid(kgid_t gid, audit_compare_gid() argument
343 rc = audit_gid_comparator(gid, f->op, name->gid); audit_compare_gid()
350 rc = audit_gid_comparator(gid, f->op, n->gid); audit_compare_gid()
369 return audit_compare_gid(cred->gid, name, f, ctx); audit_field_compare()
408 /* gid comparisons */ audit_field_compare()
410 return audit_gid_comparator(cred->gid, f->op, cred->egid); audit_field_compare()
412 return audit_gid_comparator(cred->gid, f->op, cred->sgid); audit_field_compare()
414 return audit_gid_comparator(cred->gid, f->op, cred->fsgid); audit_field_compare()
482 result = audit_gid_comparator(cred->gid, f->op, f->gid); audit_filter_rules()
485 result = in_group_p(f->gid); audit_filter_rules()
488 result = !in_group_p(f->gid); audit_filter_rules()
492 result = audit_gid_comparator(cred->egid, f->op, f->gid); audit_filter_rules()
495 result = in_egroup_p(f->gid); audit_filter_rules()
498 result = !in_egroup_p(f->gid); audit_filter_rules()
502 result = audit_gid_comparator(cred->sgid, f->op, f->gid); audit_filter_rules()
505 result = audit_gid_comparator(cred->fsgid, f->op, f->gid); audit_filter_rules()
583 result = audit_gid_comparator(name->gid, f->op, f->gid); audit_filter_rules()
586 if (audit_gid_comparator(n->gid, f->op, f->gid)) { audit_filter_rules()
705 * structure at this point, we can only check uid and gid.
1193 from_kgid(&init_user_ns, context->ipc.gid), show_special()
2125 context->ipc.gid = ipcp->gid; __audit_ipc_obj()
2136 * @gid: msgq group id
2141 void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode) __audit_ipc_set_perm() argument
2147 context->ipc.perm_gid = gid; __audit_ipc_set_perm()
2362 kgid_t gid; audit_log_task() local
2368 current_uid_gid(&uid, &gid); audit_log_task()
2370 audit_log_format(ab, "auid=%u uid=%u gid=%u ses=%u", audit_log_task()
2373 from_kgid(&init_user_ns, gid), audit_log_task()
H A Dsys.c311 * Unprivileged users may change the real gid to the effective gid
314 * If you set the real gid at all, or set the effective gid to a value not
315 * equal to the real gid, then the saved gid is set to the new effective gid.
352 if (gid_eq(old->gid, krgid) || SYSCALL_DEFINE2()
355 new->gid = krgid; SYSCALL_DEFINE2()
360 if (gid_eq(old->gid, kegid) || SYSCALL_DEFINE2()
370 (egid != (gid_t) -1 && !gid_eq(kegid, old->gid))) SYSCALL_DEFINE2()
386 SYSCALL_DEFINE1(setgid, gid_t, gid) SYSCALL_DEFINE1()
394 kgid = make_kgid(ns, gid); SYSCALL_DEFINE1()
405 new->gid = new->egid = new->sgid = new->fsgid = kgid; SYSCALL_DEFINE1()
406 else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid)) SYSCALL_DEFINE1()
693 if (rgid != (gid_t) -1 && !gid_eq(krgid, old->gid) && SYSCALL_DEFINE3()
696 if (egid != (gid_t) -1 && !gid_eq(kegid, old->gid) && SYSCALL_DEFINE3()
699 if (sgid != (gid_t) -1 && !gid_eq(ksgid, old->gid) && SYSCALL_DEFINE3()
705 new->gid = krgid; SYSCALL_DEFINE3()
725 rgid = from_kgid_munged(cred->user_ns, cred->gid); SYSCALL_DEFINE3()
785 SYSCALL_DEFINE1(setfsgid, gid_t, gid) SYSCALL_DEFINE1()
795 kgid = make_kgid(old->user_ns, gid); SYSCALL_DEFINE1()
803 if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->egid) || SYSCALL_DEFINE1()
1438 gid_eq(cred->gid, tcred->egid) && check_prlimit_permission()
1439 gid_eq(cred->gid, tcred->sgid) && check_prlimit_permission()
1440 gid_eq(cred->gid, tcred->gid)) check_prlimit_permission()
1812 !gid_eq(cred->gid, make_kgid(ns, 0))) validate_prctl_map()
H A Daudit.h87 kgid_t gid; member in struct:audit_names
138 kgid_t gid, egid, sgid, fsgid; member in struct:audit_context
161 kgid_t gid; member in struct:audit_context::__anon13951::__anon13953
H A Dcred.c45 .gid = GLOBAL_ROOT_GID,
474 if (!gid_eq(new->gid, old->gid) || commit_creds()
737 printk(KERN_ERR "CRED: ->*gid = { %d,%d,%d,%d }\n", dump_invalid_creds()
738 from_kgid_munged(&init_user_ns, cred->gid), dump_invalid_creds()
H A Dtsacct.c64 stats->ac_gid = from_kgid_munged(user_ns, tcred->gid); bacct_add_tsk()
H A Dauditfilter.c468 f->gid = make_kgid(current_user_ns(), f->val); audit_data_to_entry()
469 if (!gid_valid(f->gid)) audit_data_to_entry()
697 if (!gid_eq(a->fields[i].gid, b->fields[i].gid)) audit_compare_rule()
1274 result = audit_gid_comparator(current_gid(), f->op, f->gid); audit_filter_user_rules()
/linux-4.1.27/include/trace/events/
H A Diommu.h25 __field(int, gid)
30 __entry->gid = group_id;
35 __entry->gid, __get_str(device)
H A Dext3.h19 __field( gid_t, gid )
28 __entry->gid = i_gid_read(inode);
32 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %lu",
35 __entry->mode, __entry->uid, __entry->gid,
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx5/core/
H A Dmcg.c44 u8 gid[16]; member in struct:mlx5_attach_mcg_mbox_in
56 u8 gid[16]; member in struct:mlx5_detach_mcg_mbox_in
73 memcpy(in.gid, mgid, sizeof(*mgid)); mlx5_core_attach_mcg()
95 memcpy(in.gid, mgid, sizeof(*mgid)); mlx5_core_detach_mcg()
/linux-4.1.27/arch/xtensa/include/uapi/asm/
H A Dipcbuf.h28 __kernel_gid32_t gid; member in struct:ipc64_perm
/linux-4.1.27/include/uapi/asm-generic/
H A Dipcbuf.h22 __kernel_gid32_t gid; member in struct:ipc64_perm
/linux-4.1.27/arch/parisc/include/uapi/asm/
H A Dipcbuf.h15 gid_t gid; member in struct:ipc64_perm
/linux-4.1.27/net/sunrpc/
H A Dauth_generic.c54 .gid = RPC_MACHINE_CRED_GROUPID, rpc_lookup_machine_cred()
96 gcred->acred.gid = acred->gid; generic_create_cred()
104 dprintk("RPC: allocated %s cred %p for uid %d gid %d\n", generic_create_cred()
108 from_kgid(&init_user_ns, acred->gid)); generic_create_cred()
142 !gid_eq(gcred->acred.gid, acred->gid)) machine_cred_match()
160 !gid_eq(gcred->acred.gid, acred->gid) || generic_match()
H A Dauth_unix.c67 dprintk("RPC: allocating UNIX cred for uid %d gid %d\n", unx_create_cred()
69 from_kgid(&init_user_ns, acred->gid)); unx_create_cred()
82 cred->uc_gid = acred->gid; unx_create_cred()
124 if (!uid_eq(cred->uc_uid, acred->uid) || !gid_eq(cred->uc_gid, acred->gid)) unx_match()
165 *hold = htonl(p - hold - 1); /* gid array length */ unx_marshal()
H A Dsvcauth_unix.c26 * AUTHNULL is treated just like AUTHUNIX except that the uid/gid
404 * auth.unix.gid cache
511 int gid; unix_gid_parse() local
513 rv = get_int(&mesg, &gid); unix_gid_parse()
517 kgid = make_kgid(&init_user_ns, gid); unix_gid_parse()
575 .name = "auth.unix.gid",
749 /* Signal that mapping to nobody uid/gid is required */ svcauth_null_accept()
814 * Instead, -1 uid or gid is later mapped to the svcauth_unix_accept()
816 * Supplementary gid's will be left alone. svcauth_unix_accept()
819 cred->cr_gid = make_kgid(&init_user_ns, svc_getnl(argv)); /* gid */ svcauth_unix_accept()
/linux-4.1.27/drivers/net/ethernet/mellanox/mlx4/
H A Dmcg.c681 * Caller must hold MCG table semaphore. gid and mgm parameters must
692 * If no AMGM exists for given gid, *index = -1, *prev = index of last
696 u8 *gid, enum mlx4_protocol prot, find_entry()
713 memcpy(mgid, gid, 16); find_entry()
721 mlx4_dbg(dev, "Hash for %pI6 is %04x\n", gid, hash); find_entry()
739 if (!memcmp(mgm->gid, gid, 16) && find_entry()
952 "dst-gid = %pI6\n", cur->ib.dst_gid); mlx4_err_rule()
954 "dst-gid-mask = %pI6\n", mlx4_err_rule()
1097 int mlx4_qp_attach_common(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], mlx4_qp_attach_common() argument
1109 u8 port = gid[5]; mlx4_qp_attach_common()
1118 err = find_entry(dev, port, gid, prot, mlx4_qp_attach_common()
1126 memcpy(mgm->gid, gid, 16); mlx4_qp_attach_common()
1141 memcpy(mgm->gid, gid, 16); mlx4_qp_attach_common()
1206 int mlx4_qp_detach_common(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], mlx4_qp_detach_common() argument
1216 u8 port = gid[5]; mlx4_qp_detach_common()
1226 err = find_entry(dev, port, gid, prot, mlx4_qp_detach_common()
1232 mlx4_err(dev, "MGID %pI6 not found\n", gid); mlx4_qp_detach_common()
1282 memset(mgm->gid, 0, 16); mlx4_qp_detach_common()
1328 u8 gid[16], u8 attach, u8 block_loopback, mlx4_QP_ATTACH()
1342 memcpy(mailbox->buf, gid, 16); mlx4_QP_ATTACH()
1360 u8 gid[16], u8 port, mlx4_trans_to_dmfs_attach()
1382 memcpy(spec.eth.dst_mac, &gid[10], ETH_ALEN); mlx4_trans_to_dmfs_attach()
1388 memcpy(spec.ib.dst_gid, gid, 16); mlx4_trans_to_dmfs_attach()
1399 int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], mlx4_multicast_attach() argument
1410 gid[7] |= (MLX4_MC_STEER << 1); mlx4_multicast_attach()
1413 return mlx4_QP_ATTACH(dev, qp, gid, 1, mlx4_multicast_attach()
1415 return mlx4_qp_attach_common(dev, qp, gid, mlx4_multicast_attach()
1420 return mlx4_trans_to_dmfs_attach(dev, qp, gid, port, mlx4_multicast_attach()
1429 int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], mlx4_multicast_detach() argument
1439 gid[7] |= (MLX4_MC_STEER << 1); mlx4_multicast_detach()
1442 return mlx4_QP_ATTACH(dev, qp, gid, 0, 0, prot); mlx4_multicast_detach()
1444 return mlx4_qp_detach_common(dev, qp, gid, prot, mlx4_multicast_detach()
1515 struct mlx4_qp *qp, u8 gid[16], mlx4_unicast_attach()
1519 gid[7] |= (MLX4_UC_STEER << 1); mlx4_unicast_attach()
1522 return mlx4_QP_ATTACH(dev, qp, gid, 1, mlx4_unicast_attach()
1525 return mlx4_qp_attach_common(dev, qp, gid, block_mcast_loopback, mlx4_unicast_attach()
1531 u8 gid[16], enum mlx4_protocol prot) mlx4_unicast_detach()
1534 gid[7] |= (MLX4_UC_STEER << 1); mlx4_unicast_detach()
1537 return mlx4_QP_ATTACH(dev, qp, gid, 0, 0, prot); mlx4_unicast_detach()
1539 return mlx4_qp_detach_common(dev, qp, gid, prot, MLX4_UC_STEER); mlx4_unicast_detach()
695 find_entry(struct mlx4_dev *dev, u8 port, u8 *gid, enum mlx4_protocol prot, struct mlx4_cmd_mailbox *mgm_mailbox, int *prev, int *index) find_entry() argument
1327 mlx4_QP_ATTACH(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], u8 attach, u8 block_loopback, enum mlx4_protocol prot) mlx4_QP_ATTACH() argument
1359 mlx4_trans_to_dmfs_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], u8 port, int block_mcast_loopback, enum mlx4_protocol prot, u64 *reg_id) mlx4_trans_to_dmfs_attach() argument
1514 mlx4_unicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], int block_mcast_loopback, enum mlx4_protocol prot) mlx4_unicast_attach() argument
1530 mlx4_unicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], enum mlx4_protocol prot) mlx4_unicast_detach() argument
H A Dresource_tracker.c85 u8 gid[16]; member in struct:res_gid
3764 struct res_qp *rqp, u8 *gid) find_gid()
3769 if (!memcmp(res->gid, gid, 16)) find_gid()
3776 u8 *gid, enum mlx4_protocol prot, add_mcg_res()
3787 if (find_gid(dev, slave, rqp, gid)) { add_mcg_res()
3791 memcpy(res->gid, gid, 16); add_mcg_res()
3804 u8 *gid, enum mlx4_protocol prot, rem_mcg_res()
3811 res = find_gid(dev, slave, rqp, gid); rem_mcg_res()
3826 u8 gid[16], int block_loopback, enum mlx4_protocol prot, qp_attach()
3831 int port = mlx4_slave_convert_port(dev, slave, gid[5]); qp_attach()
3834 return mlx4_trans_to_dmfs_attach(dev, qp, gid, port, qp_attach()
3840 int port = mlx4_slave_convert_port(dev, slave, gid[5]); qp_attach()
3843 gid[5] = port; qp_attach()
3845 return mlx4_qp_attach_common(dev, qp, gid, qp_attach()
3853 u8 gid[16], enum mlx4_protocol prot, qp_detach()
3860 return mlx4_qp_detach_common(dev, qp, gid, prot, type); qp_detach()
3867 u8 *gid, enum mlx4_protocol prot) mlx4_adjust_port()
3876 real_port = mlx4_slave_convert_port(dev, slave, gid[5]); mlx4_adjust_port()
3879 gid[5] = real_port; mlx4_adjust_port()
3892 u8 *gid = inbox->buf; mlx4_QP_ATTACH_wrapper() local
3901 enum mlx4_steer_type type = (gid[7] & steer_type_mask) >> 1; mlx4_QP_ATTACH_wrapper()
3910 err = qp_attach(dev, slave, &qp, gid, block_loopback, prot, mlx4_QP_ATTACH_wrapper()
3916 err = add_mcg_res(dev, slave, rqp, gid, prot, type, reg_id); mlx4_QP_ATTACH_wrapper()
3920 err = mlx4_adjust_port(dev, slave, gid, prot); mlx4_QP_ATTACH_wrapper()
3924 err = rem_mcg_res(dev, slave, rqp, gid, prot, type, &reg_id); mlx4_QP_ATTACH_wrapper()
3928 err = qp_detach(dev, &qp, gid, prot, type, reg_id); mlx4_QP_ATTACH_wrapper()
3937 qp_detach(dev, &qp, gid, prot, type, reg_id); mlx4_QP_ATTACH_wrapper()
4242 (void) mlx4_qp_detach_common(dev, &qp, rgid->gid, detach_qp()
3763 find_gid(struct mlx4_dev *dev, int slave, struct res_qp *rqp, u8 *gid) find_gid() argument
3775 add_mcg_res(struct mlx4_dev *dev, int slave, struct res_qp *rqp, u8 *gid, enum mlx4_protocol prot, enum mlx4_steer_type steer, u64 reg_id) add_mcg_res() argument
3803 rem_mcg_res(struct mlx4_dev *dev, int slave, struct res_qp *rqp, u8 *gid, enum mlx4_protocol prot, enum mlx4_steer_type steer, u64 *reg_id) rem_mcg_res() argument
3825 qp_attach(struct mlx4_dev *dev, int slave, struct mlx4_qp *qp, u8 gid[16], int block_loopback, enum mlx4_protocol prot, enum mlx4_steer_type type, u64 *reg_id) qp_attach() argument
3852 qp_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], enum mlx4_protocol prot, enum mlx4_steer_type type, u64 reg_id) qp_detach() argument
3866 mlx4_adjust_port(struct mlx4_dev *dev, int slave, u8 *gid, enum mlx4_protocol prot) mlx4_adjust_port() argument
H A Dport.c813 mlx4_warn(dev, "requested gid entry for slave:%d is a duplicate of gid at index %d\n", mlx4_common_set_port()
1178 int mlx4_get_slave_from_roce_gid(struct mlx4_dev *dev, int port, u8 *gid, mlx4_get_slave_from_roce_gid() argument
1196 if (!memcmp(priv->port[port].gid_table.roce_gids[i].raw, gid, mlx4_get_slave_from_roce_gid()
1204 /* Calculate a slave_gid which is the slave number in the gid mlx4_get_slave_from_roce_gid()
1278 u8 *gid) mlx4_get_roce_gid_from_slave()
1285 memcpy(gid, priv->port[port].gid_table.roce_gids[slave_id].raw, mlx4_get_roce_gid_from_slave()
1277 mlx4_get_roce_gid_from_slave(struct mlx4_dev *dev, int port, int slave_id, u8 *gid) mlx4_get_roce_gid_from_slave() argument
/linux-4.1.27/arch/x86/tools/
H A Dgen-insn-attr-x86.awk21 gid = -1 # group id
152 gid = group[$2]
153 tname = "inat_group_table_" gid
168 if (gid != -1) {
173 gtable[gid,0] = tname
178 gtable[gid,1] = tname "_1"
183 gtable[gid,2] = tname "_2"
188 gtable[gid,3] = tname "_3"
/linux-4.1.27/fs/autofs4/
H A Dinode.c40 ino->gid = GLOBAL_ROOT_GID; autofs4_clean_ino()
84 seq_printf(m, ",gid=%u", autofs4_show_options()
119 {Opt_gid, "gid=%u"},
129 static int parse_options(char *options, int *pipefd, kuid_t *uid, kgid_t *gid, parse_options() argument
138 *gid = current_gid(); parse_options()
169 *gid = make_kgid(current_user_ns(), option); parse_options()
170 if (!gid_valid(*gid)) parse_options()
H A Dwaitq.c160 packet->gid = from_kgid_munged(user_ns, wq->gid); autofs4_notify_daemon()
431 wq->gid = current_gid(); autofs4_wait()
497 * uid and gid in the dentry info struct. This is so it can be autofs4_wait()
500 * to existing, active, autofs mounts. The uid and gid (and autofs4_wait()
521 ino->gid = wq->gid; autofs4_wait()
H A Dautofs_i.h78 kgid_t gid; member in struct:autofs_info
97 kgid_t gid; member in struct:autofs_wait_queue
H A Ddev-ioctl.c425 * Return the uid and gid of the last request for the mount
429 * process uid and gid (or string variations of them) for mount
448 param->requester.uid = param->requester.gid = -1; autofs_dev_ioctl_requester()
460 param->requester.gid = from_kgid_munged(current_user_ns(), ino->gid); autofs_dev_ioctl_requester()
/linux-4.1.27/fs/affs/
H A Dinode.c82 id = be16_to_cpu(tail->gid); affs_iget()
172 gid_t gid; affs_write_inode() local
193 gid = i_gid_read(inode); affs_write_inode()
197 if (gid == 0 || gid == 0xFFFF) affs_write_inode()
198 gid = gid ^ ~0; affs_write_inode()
203 tail->gid = cpu_to_be16(gid); affs_write_inode()
H A Dsuper.c190 parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved, s32 *root, parse_options() argument
199 *gid = current_gid(); parse_options()
258 *gid = make_kgid(current_user_ns(), option); parse_options()
259 if (!gid_valid(*gid)) parse_options()
310 kgid_t gid; affs_fill_super() local
336 if (!parse_options(data,&uid,&gid,&i,&reserved,&root_block, affs_fill_super()
347 sbi->s_gid = gid; affs_fill_super()
518 kgid_t gid; affs_remount() local
538 if (!parse_options(data, &uid, &gid, &mode, &reserved, &root_block, affs_remount()
553 sbi->s_gid = gid; affs_remount()
H A Daffs.h91 kgid_t s_gid; /* gid to override */
114 #define AFFS_MOUNT_SF_SETGID 0x0020 /* Ignore Amiga gid */
116 #define AFFS_MOUNT_SF_MUFS 0x0100 /* Use MUFS uid/gid mapping */
/linux-4.1.27/fs/squashfs/
H A Did.c27 * For space efficiency regular files store uid and gid indexes, which are
43 * Map uid/gid index into real 32-bit uid/gid using the id look up table
/linux-4.1.27/arch/s390/hypfs/
H A Dinode.c35 kgid_t gid; /* gid used for files and dirs */ member in struct:hypfs_sb_info
106 ret->i_gid = hypfs_info->gid; hypfs_make_inode()
217 {opt_gid, "gid=%u"},
226 kgid_t gid; hypfs_parse_options() local
249 gid = make_kgid(current_user_ns(), option); hypfs_parse_options()
250 if (!gid_valid(gid)) hypfs_parse_options()
252 hypfs_info->gid = gid; hypfs_parse_options()
268 seq_printf(s, ",gid=%u", from_kgid_munged(&init_user_ns, hypfs_info->gid)); hypfs_show_options()
284 sbi->gid = current_gid(); hypfs_fill_super()
/linux-4.1.27/security/keys/
H A Dpermission.c47 if (gid_valid(key->gid) && key->perm & KEY_GRP_ALL) { key_task_permission()
48 if (gid_eq(key->gid, cred->fsgid)) { key_task_permission()
53 ret = groups_search(cred->group_info, key->gid); key_task_permission()
H A Dprocess_keys.c135 keyring = keyring_alloc("_tid", new->uid, new->gid, new, install_thread_keyring_to_cred()
181 keyring = keyring_alloc("_pid", new->uid, new->gid, new, install_process_keyring_to_cred()
232 keyring = keyring_alloc("_ses", cred->uid, cred->gid, cred, install_session_keyring_to_cred()
296 tsk->cred->thread_keyring->gid = tsk->cred->fsgid; key_fsgid_changed()
786 name, old->uid, old->gid, old, join_session_keyring()
840 new-> gid = old-> gid; key_change_session_keyring()
H A Dkeyctl.c556 * type;uid;gid;perm;description<NUL>
601 from_kgid_munged(current_user_ns(), key->gid), keyctl_describe_key()
784 * caller must have sysadmin capability. If either uid or gid is -1 then that
800 kgid_t gid; keyctl_chown_key() local
803 gid = make_kgid(current_user_ns(), group); keyctl_chown_key()
807 if ((group != (gid_t) -1) && !gid_valid(gid)) keyctl_chown_key()
834 if (group != (gid_t) -1 && !gid_eq(gid, key->gid) && !in_group_p(gid)) keyctl_chown_key()
884 key->gid = gid; keyctl_chown_key()
1523 !gid_eq(pcred->gid, mycred->egid) || keyctl_session_to_parent()
/linux-4.1.27/fs/hpfs/
H A Dsuper.c273 {Opt_gid, "gid=%u"},
293 static int parse_opts(char *opts, kuid_t *uid, kgid_t *gid, umode_t *umask, parse_opts() argument
325 *gid = make_kgid(current_user_ns(), option); parse_opts()
326 if (!gid_valid(*gid)) parse_opts()
402 gid=xxx set gid of files that don't have gid specified in eas\n\ hpfs_help()
425 kgid_t gid; hpfs_remount_fs() local
436 uid = sbi->sb_uid; gid = sbi->sb_gid; hpfs_remount_fs()
442 if (!(o = parse_opts(data, &uid, &gid, &umask, &lowercase, hpfs_remount_fs()
458 sbi->sb_uid = uid; sbi->sb_gid = gid; hpfs_remount_fs()
479 seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, sbi->sb_gid)); hpfs_show_options()
527 kgid_t gid; hpfs_fill_super() local
547 gid = current_gid(); hpfs_fill_super()
556 if (!(o = parse_opts(options, &uid, &gid, &umask, &lowercase, hpfs_fill_super()
605 sbi->sb_gid = gid; hpfs_fill_super()
H A Dhpfs_fn.h56 unsigned i_ea_gid : 1; /* file's gid is stored in ea */
73 kgid_t sb_gid; /* gid from mount options */
/linux-4.1.27/arch/powerpc/include/uapi/asm/
H A Dipcbuf.h24 __kernel_gid_t gid; member in struct:ipc64_perm
/linux-4.1.27/arch/alpha/kernel/
H A Dasm-offsets.c30 DEFINE(CRED_GID, offsetof(struct cred, gid)); foo()
/linux-4.1.27/drivers/infiniband/hw/ocrdma/
H A Docrdma_main.c121 union ib_gid *gid) ocrdma_addr_event()
148 updated = ocrdma_add_sgid(dev, gid); ocrdma_addr_event()
151 updated = ocrdma_del_sgid(dev, gid); ocrdma_addr_event()
171 union ib_gid gid; ocrdma_inetaddr_event() local
174 ipv6_addr_set_v4mapped(ifa->ifa_address, (struct in6_addr *)&gid); ocrdma_inetaddr_event()
175 return ocrdma_addr_event(event, netdev, &gid); ocrdma_inetaddr_event()
188 union ib_gid *gid = (union ib_gid *)&ifa->addr; ocrdma_inet6addr_event() local
190 return ocrdma_addr_event(event, netdev, gid); ocrdma_inet6addr_event()
406 union ib_gid gid; ocrdma_init_ipv4_gids() local
411 (struct in6_addr *)&gid); for_ifa()
412 ocrdma_add_sgid(dev, &gid); for_ifa()
120 ocrdma_addr_event(unsigned long event, struct net_device *netdev, union ib_gid *gid) ocrdma_addr_event() argument
H A Docrdma_verbs.h46 int index, union ib_gid *gid);
/linux-4.1.27/fs/devpts/
H A Dinode.c104 kgid_t gid; member in struct:pts_mount_opts
118 {Opt_gid, "gid=%u"},
164 kgid_t gid; parse_mount_options() local
169 opts->gid = GLOBAL_ROOT_GID; parse_mount_options()
200 gid = make_kgid(current_user_ns(), option); parse_mount_options()
201 if (!gid_valid(gid)) parse_mount_options()
203 opts->gid = gid; parse_mount_options()
341 seq_printf(seq, ",gid=%u", devpts_show_options()
342 from_kgid_munged(&init_user_ns, opts->gid)); devpts_show_options()
618 inode->i_gid = opts->setgid ? opts->gid : current_fsgid(); devpts_pty_new()
/linux-4.1.27/drivers/base/
H A Ddevtmpfs.c46 kgid_t gid; member in struct:req
92 req.gid = GLOBAL_ROOT_GID; devtmpfs_create_node()
93 req.name = device_get_devnode(dev, &req.mode, &req.uid, &req.gid, &tmp); devtmpfs_create_node()
196 kgid_t gid, struct device *dev) handle_create()
216 newattrs.ia_gid = gid; handle_create()
367 static int handle(const char *name, umode_t mode, kuid_t uid, kgid_t gid, handle() argument
371 return handle_create(name, mode, uid, gid, dev); handle()
398 req->uid, req->gid, req->dev); devtmpfsd()
195 handle_create(const char *nodename, umode_t mode, kuid_t uid, kgid_t gid, struct device *dev) handle_create() argument
/linux-4.1.27/drivers/infiniband/hw/mlx4/
H A Dmain.c424 union ib_gid *gid, int netw_view) __mlx4_ib_query_gid()
449 memcpy(gid->raw, out_mad->data + 8, 8); __mlx4_ib_query_gid()
469 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); __mlx4_ib_query_gid()
473 memset(gid->raw + 8, 0, 8); __mlx4_ib_query_gid()
480 union ib_gid *gid) iboe_query_gid()
484 *gid = dev->iboe.gid_table[port - 1][index]; iboe_query_gid()
490 union ib_gid *gid) mlx4_ib_query_gid()
493 return __mlx4_ib_query_gid(ibdev, port, index, gid, 0); mlx4_ib_query_gid()
495 return iboe_query_gid(ibdev, port, index, gid); mlx4_ib_query_gid()
807 static int add_gid_entry(struct ib_qp *ibqp, union ib_gid *gid) add_gid_entry() argument
817 ge->gid = *gid; add_gid_entry()
818 if (mlx4_ib_add_mc(mdev, mqp, gid)) { add_gid_entry()
831 union ib_gid *gid) mlx4_ib_add_mc()
856 union ib_gid gid; member in struct:mlx4_ib_steering
1266 static int mlx4_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) mlx4_ib_mcg_attach() argument
1283 err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, mqp->port, mlx4_ib_mcg_attach()
1294 err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, mlx4_ib_mcg_attach()
1303 err = add_gid_entry(ibqp, gid); mlx4_ib_mcg_attach()
1308 memcpy(ib_steering->gid.raw, gid->raw, 16); mlx4_ib_mcg_attach()
1317 mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, mlx4_ib_mcg_attach()
1320 mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, mlx4_ib_mcg_attach()
1335 if (!memcmp(raw, ge->gid.raw, 16)) { find_gid_entry()
1344 static int mlx4_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) mlx4_ib_mcg_detach() argument
1361 if (!memcmp(ib_steering->gid.raw, gid->raw, 16)) { mlx4_ib_mcg_detach()
1375 err = mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, mlx4_ib_mcg_detach()
1381 err = mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, mlx4_ib_mcg_detach()
1388 ge = find_gid_entry(mqp, gid->raw); mlx4_ib_mcg_detach()
1521 pr_warn("update gid table failed %ld\n", PTR_ERR(mailbox)); update_gids_task()
1557 pr_warn("reset gid table failed\n"); reset_gids_task()
1581 union ib_gid *gid, int clear, update_gid_table()
1596 if (!memcmp(&dev->iboe.gid_table[port - 1][i], gid, update_gid_table()
1597 sizeof(*gid))) update_gid_table()
1613 &zgid, sizeof(*gid))) update_gid_table()
1620 dev->iboe.gid_table[port - 1][free] = *gid; update_gid_table()
1640 static void mlx4_make_default_gid(struct net_device *dev, union ib_gid *gid) mlx4_make_default_gid() argument
1642 gid->global.subnet_prefix = cpu_to_be64(0xfe80000000000000LL); mlx4_make_default_gid()
1643 mlx4_addrconf_ifid_eui48(&gid->raw[8], 0xffff, dev); mlx4_make_default_gid()
1665 struct mlx4_ib_dev *ibdev, union ib_gid *gid) mlx4_ib_addr_event()
1676 if (!memcmp(gid, &default_gid, sizeof(*gid))) mlx4_ib_addr_event()
1684 rdma_link_local_addr((struct in6_addr *)gid)) mlx4_ib_addr_event()
1695 update_gid_table(ibdev, port, gid, mlx4_ib_addr_event()
1731 union ib_gid gid; mlx4_ib_inet_event() local
1734 ipv6_addr_set_v4mapped(ifa->ifa_address, (struct in6_addr *)&gid); mlx4_ib_inet_event()
1738 mlx4_ib_addr_event(event, event_netdev, ibdev, &gid); mlx4_ib_inet_event()
1748 union ib_gid *gid = (union ib_gid *)&ifa->addr; mlx4_ib_inet6_event() local
1753 mlx4_ib_addr_event(event, event_netdev, ibdev, gid); mlx4_ib_inet6_event()
1826 union ib_gid gid; mlx4_ib_get_dev_addr() local
1838 (struct in6_addr *)&gid); for_ifa()
1839 update_gid_table(ibdev, port, &gid, 0, 0); for_ifa()
1865 union ib_gid gid; mlx4_ib_set_default_gid() local
1866 mlx4_make_default_gid(dev, &gid); mlx4_ib_set_default_gid()
1867 update_gid_table(ibdev, port, &gid, 0, 1); mlx4_ib_set_default_gid()
1950 * flows that select port by gid may get the down port. mlx4_ib_scan_netdevs()
1960 * should appear in port's gid table mlx4_ib_scan_netdevs()
423 __mlx4_ib_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid, int netw_view) __mlx4_ib_query_gid() argument
479 iboe_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) iboe_query_gid() argument
489 mlx4_ib_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) mlx4_ib_query_gid() argument
830 mlx4_ib_add_mc(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp, union ib_gid *gid) mlx4_ib_add_mc() argument
1580 update_gid_table(struct mlx4_ib_dev *dev, int port, union ib_gid *gid, int clear, int default_gid) update_gid_table() argument
1664 mlx4_ib_addr_event(int event, struct net_device *event_netdev, struct mlx4_ib_dev *ibdev, union ib_gid *gid) mlx4_ib_addr_event() argument
H A Dsysfs.c119 union ib_gid gid; show_port_gid() local
123 mlx4_ib_iov_dentry->entry_num, &gid, 1); show_port_gid()
127 be16_to_cpu(((__be16 *) gid.raw)[0]), show_port_gid()
128 be16_to_cpu(((__be16 *) gid.raw)[1]), show_port_gid()
129 be16_to_cpu(((__be16 *) gid.raw)[2]), show_port_gid()
130 be16_to_cpu(((__be16 *) gid.raw)[3]), show_port_gid()
131 be16_to_cpu(((__be16 *) gid.raw)[4]), show_port_gid()
132 be16_to_cpu(((__be16 *) gid.raw)[5]), show_port_gid()
133 be16_to_cpu(((__be16 *) gid.raw)[6]), show_port_gid()
134 be16_to_cpu(((__be16 *) gid.raw)[7])); show_port_gid()
229 /* get the physical gid and pkey table sizes.*/ add_port_entries()
H A Dcm.c366 union ib_gid gid; mlx4_ib_demux_cm_handler() local
371 gid = gid_from_req_msg(ibdev, mad); mlx4_ib_demux_cm_handler()
372 *slave = mlx4_ib_find_real_gid(ibdev, port, gid.global.interface_id); mlx4_ib_demux_cm_handler()
374 mlx4_ib_warn(ibdev, "failed matching slave_id by gid (0x%llx)\n", mlx4_ib_demux_cm_handler()
375 be64_to_cpu(gid.global.interface_id)); mlx4_ib_demux_cm_handler()
H A Dmlx4_ib.h176 union ib_gid gid; member in struct:mlx4_ib_gid_entry
242 u8 g_ml_path; /* gid bit stands for ipv6/4 header in RoCE */
729 union ib_gid *gid, int netw_view);
755 union ib_gid *gid);
/linux-4.1.27/fs/nfs/
H A Dnfs4idmap.c116 kgid_t gid; nfs_fattr_map_group_name() local
120 if (nfs_map_group_to_gid(server, group->data, group->len, &gid) == 0) { nfs_fattr_map_group_name()
121 fattr->gid = gid; nfs_fattr_map_group_name()
140 * nfs_fattr_map_and_free_names - map owner/group strings into uid/gid and free
145 * their numeric uid/gid equivalents, and then frees the cached strings.
380 { Opt_find_gid, "gid:%s" },
748 int nfs_map_group_to_gid(const struct nfs_server *server, const char *name, size_t namelen, kgid_t *gid) nfs_map_group_to_gid() argument
755 ret = nfs_idmap_lookup_id(name, namelen, "gid", &id, idmap); nfs_map_group_to_gid()
757 *gid = make_kgid(&init_user_ns, id); nfs_map_group_to_gid()
758 if (!gid_valid(*gid)) nfs_map_group_to_gid()
779 int nfs_map_gid_to_group(const struct nfs_server *server, kgid_t gid, char *buf, size_t buflen) nfs_map_gid_to_group() argument
785 id = from_kgid(&init_user_ns, gid); nfs_map_gid_to_group()
H A Dnfs2xdr.c265 * unsigned int gid;
296 fattr->gid = make_kgid(&init_user_ns, be32_to_cpup(p++)); decode_fattr()
297 if (!gid_valid(fattr->gid)) decode_fattr()
325 dprintk("NFS: returned invalid gid\n"); decode_fattr()
338 * unsigned int gid;
H A Dnfs3xdr.c526 * gid3 gid;
555 * set_gid3 gid;
636 * gid3 gid;
663 fattr->gid = make_kgid(&init_user_ns, be32_to_cpup(p++)); decode_fattr3()
664 if (!gid_valid(fattr->gid)) decode_fattr3()
686 dprintk("NFS: returned invalid gid\n"); decode_fattr3()
/linux-4.1.27/net/9p/
H A Dprotocol.c50 kfree(stbuf->gid); p9stat_free()
91 g - numeric gid
181 kgid_t *gid = va_arg(ap, kgid_t *); p9pdu_vreadf() local
187 *gid = make_kgid(&init_user_ns, p9pdu_vreadf()
215 &stbuf->gid, &stbuf->muid, p9pdu_vreadf()
413 kgid_t gid = va_arg(ap, kgid_t); p9pdu_vwritef() local
415 from_kgid(&init_user_ns, gid)); p9pdu_vwritef()
438 stbuf->gid, stbuf->muid, p9pdu_vwritef()
504 p9attr->gid, p9pdu_vwritef()
H A Dclient.c1275 kgid_t gid, struct p9_qid *qid) p9_client_create_dotl()
1283 ">>> TLCREATE fid %d name %s flags %d mode %d gid %d\n", p9_client_create_dotl()
1285 from_kgid(&init_user_ns, gid)); p9_client_create_dotl()
1292 mode, gid); p9_client_create_dotl()
1364 int p9_client_symlink(struct p9_fid *dfid, char *name, char *symtgt, kgid_t gid, p9_client_symlink() argument
1376 gid); p9_client_symlink()
1699 "<<< name=%s uid=%s gid=%s muid=%s extension=(%s)\n" p9_client_stat()
1700 "<<< uid=%d gid=%d n_muid=%d\n", p9_client_stat()
1704 ret->name, ret->uid, ret->gid, ret->muid, ret->extension, p9_client_stat()
1786 /* name[s] uid[s] gid[s] muid[s] */ p9_client_statsize()
1793 if (wst->gid) p9_client_statsize()
1794 ret += strlen(wst->gid); p9_client_statsize()
1821 " name=%s uid=%s gid=%s muid=%s extension=(%s)\n" p9_client_wstat()
1822 " uid=%d gid=%d n_muid=%d\n", p9_client_wstat()
1826 wst->name, wst->uid, wst->gid, wst->muid, wst->extension, p9_client_wstat()
1855 " valid=%x mode=%x uid=%d gid=%d size=%lld\n" p9_client_setattr()
1860 from_kgid(&init_user_ns, p9attr->gid), p9_client_setattr()
2113 dev_t rdev, kgid_t gid, struct p9_qid *qid) p9_client_mknod_dotl()
2124 MAJOR(rdev), MINOR(rdev), gid); p9_client_mknod_dotl()
2144 kgid_t gid, struct p9_qid *qid) p9_client_mkdir_dotl()
2152 p9_debug(P9_DEBUG_9P, ">>> TMKDIR fid %d name %s mode %d gid %d\n", p9_client_mkdir_dotl()
2153 fid->fid, name, mode, from_kgid(&init_user_ns, gid)); p9_client_mkdir_dotl()
2155 gid); p9_client_mkdir_dotl()
1274 p9_client_create_dotl(struct p9_fid *ofid, char *name, u32 flags, u32 mode, kgid_t gid, struct p9_qid *qid) p9_client_create_dotl() argument
2112 p9_client_mknod_dotl(struct p9_fid *fid, char *name, int mode, dev_t rdev, kgid_t gid, struct p9_qid *qid) p9_client_mknod_dotl() argument
2143 p9_client_mkdir_dotl(struct p9_fid *fid, char *name, int mode, kgid_t gid, struct p9_qid *qid) p9_client_mkdir_dotl() argument
/linux-4.1.27/fs/tracefs/
H A Dinode.c143 kgid_t gid; member in struct:tracefs_mount_opts
156 {Opt_gid, "gid=%u"},
171 kgid_t gid; tracefs_parse_options() local
193 gid = make_kgid(current_user_ns(), option); tracefs_parse_options()
194 if (!gid_valid(gid)) tracefs_parse_options()
196 opts->gid = gid; tracefs_parse_options()
223 inode->i_gid = opts->gid; tracefs_apply_options()
252 if (!gid_eq(opts->gid, GLOBAL_ROOT_GID)) tracefs_show_options()
253 seq_printf(m, ",gid=%u", tracefs_show_options()
254 from_kgid_munged(&init_user_ns, opts->gid)); tracefs_show_options()
/linux-4.1.27/fs/debugfs/
H A Dinode.c54 kgid_t gid; member in struct:debugfs_mount_opts
67 {Opt_gid, "gid=%u"},
82 kgid_t gid; debugfs_parse_options() local
104 gid = make_kgid(current_user_ns(), option); debugfs_parse_options()
105 if (!gid_valid(gid)) debugfs_parse_options()
107 opts->gid = gid; debugfs_parse_options()
134 inode->i_gid = opts->gid; debugfs_apply_options()
163 if (!gid_eq(opts->gid, GLOBAL_ROOT_GID)) debugfs_show_options()
164 seq_printf(m, ",gid=%u", debugfs_show_options()
165 from_kgid_munged(&init_user_ns, opts->gid)); debugfs_show_options()
/linux-4.1.27/drivers/staging/lustre/lustre/ldlm/
H A Dldlm_extent.c231 lpolicy->l_extent.gid = wpolicy->l_extent.gid; ldlm_extent_policy_wire_to_local()
240 wpolicy->l_extent.gid = lpolicy->l_extent.gid; ldlm_extent_policy_local_to_wire()
/linux-4.1.27/drivers/infiniband/hw/ipath/
H A Dipath_verbs_mcast.c236 int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) ipath_multicast_attach() argument
248 mcast = ipath_mcast_alloc(gid); ipath_multicast_attach()
285 int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) ipath_multicast_detach() argument
307 ret = memcmp(gid->raw, mcast->mgid.raw, ipath_multicast_detach()
/linux-4.1.27/arch/x86/ia32/
H A Dsys_ia32.c73 typeof(ubuf->st_gid) gid = 0; cp_stat64()
75 SET_GID(gid, from_kgid_munged(current_user_ns(), stat->gid)); cp_stat64()
83 __put_user(gid, &ubuf->st_gid) || cp_stat64()
/linux-4.1.27/fs/jfs/
H A Djfs_incore.h42 kgid_t saved_gid; /* saved for gid mount option */
199 kgid_t gid; /* gid to override on-disk gid */ member in struct:jfs_sb_info
H A Dsuper.c224 {Opt_gid, "gid=%u"},
348 char *gid = args[0].from; parse_options() local
350 int rc = kstrtouint(gid, 0, &val); parse_options()
354 sbi->gid = make_kgid(current_user_ns(), val); parse_options()
355 if (!gid_valid(sbi->gid)) parse_options()
510 sbi->gid = INVALID_GID; jfs_fill_super()
709 if (gid_valid(sbi->gid)) jfs_show_options()
710 seq_printf(seq, ",gid=%d", from_kgid(&init_user_ns, sbi->gid)); jfs_show_options()
H A Djfs_inode.c104 * uid & gid mount options are used ialloc()
/linux-4.1.27/include/uapi/linux/netfilter/
H A Dnfnetlink_queue.h51 NFQA_GID, /* __u32 sk gid */
/linux-4.1.27/drivers/infiniband/core/
H A Dcache.c75 union ib_gid *gid) ib_get_cached_gid()
91 *gid = cache->table[index]; ib_get_cached_gid()
100 union ib_gid *gid, ib_find_cached_gid()
118 if (!memcmp(gid, &cache->table[i], sizeof *gid)) { ib_find_cached_gid()
72 ib_get_cached_gid(struct ib_device *device, u8 port_num, int index, union ib_gid *gid) ib_get_cached_gid() argument
99 ib_find_cached_gid(struct ib_device *device, union ib_gid *gid, u8 *port_num, u16 *index) ib_find_cached_gid() argument
H A Ddevice.c590 * @gid:Returned GID
595 u8 port_num, int index, union ib_gid *gid) ib_query_gid()
597 return device->query_gid(device, port_num, index, gid); ib_query_gid()
668 * @gid: The GID value to search for.
673 int ib_find_gid(struct ib_device *device, union ib_gid *gid, ib_find_gid() argument
684 if (!memcmp(&tmp_gid, gid, sizeof *gid)) { ib_find_gid()
594 ib_query_gid(struct ib_device *device, u8 port_num, int index, union ib_gid *gid) ib_query_gid() argument
H A Dcma.c357 union ib_gid gid, iboe_gid; cma_acquire_dev() local
371 memcpy(&gid, dev_addr->src_dev_addr + cma_acquire_dev()
372 rdma_addr_gid_offset(dev_addr), sizeof gid); cma_acquire_dev()
383 ret = ib_find_cached_gid(cma_dev->device, &gid, cma_acquire_dev()
402 ret = ib_find_cached_gid(cma_dev->device, &gid, &found_port, NULL); cma_acquire_dev()
427 union ib_gid gid, sgid, *dgid; cma_resolve_ib_dev() local
445 for (i = 0; !ib_get_cached_gid(cur_dev->device, p, i, &gid); i++) { cma_resolve_ib_dev()
446 if (!memcmp(&gid, dgid, sizeof(gid))) { cma_resolve_ib_dev()
448 sgid = gid; cma_resolve_ib_dev()
453 if (!cma_dev && (gid.global.subnet_prefix == cma_resolve_ib_dev()
456 sgid = gid; cma_resolve_ib_dev()
2039 union ib_gid gid; cma_bind_loopback() local
2071 ret = ib_get_cached_gid(cma_dev->device, p, 0, &gid); cma_bind_loopback()
2083 rdma_addr_set_sgid(&id_priv->id.route.addr.dev_addr, &gid); cma_bind_loopback()
2133 union ib_gid gid; cma_resolve_loopback() local
2146 rdma_addr_get_sgid(&id_priv->id.route.addr.dev_addr, &gid); cma_resolve_loopback()
2147 rdma_addr_set_dgid(&id_priv->id.route.addr.dev_addr, &gid); cma_resolve_loopback()
H A Dverbs.c1344 int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid) ib_attach_mcast() argument
1350 if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) ib_attach_mcast()
1353 ret = qp->device->attach_mcast(qp, gid, lid); ib_attach_mcast()
1360 int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid) ib_detach_mcast() argument
1366 if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD) ib_detach_mcast()
1369 ret = qp->device->detach_mcast(qp, gid, lid); ib_detach_mcast()
H A Dsysfs.c289 union ib_gid gid; show_port_gid() local
292 ret = ib_query_gid(p->ibdev, p->port_num, tab_attr->index, &gid); show_port_gid()
296 return sprintf(buf, "%pI6\n", gid.raw); show_port_gid()
/linux-4.1.27/fs/xfs/
H A Dxfs_linux.h188 /* Kernel uid/gid conversion. These are used to convert to/from the on disk
204 static inline __uint32_t xfs_kgid_to_gid(kgid_t gid) xfs_kgid_to_gid() argument
206 return from_kgid(&init_user_ns, gid); xfs_kgid_to_gid()
209 static inline kgid_t xfs_gid_to_kgid(__uint32_t gid) xfs_gid_to_kgid() argument
211 return make_kgid(&init_user_ns, gid); xfs_gid_to_kgid()
H A Dxfs_iops.c463 stat->gid = inode->i_gid; xfs_vn_getattr()
552 kgid_t gid = GLOBAL_ROOT_GID, igid = GLOBAL_ROOT_GID; xfs_setattr_nonsize() local
591 gid = iattr->ia_gid; xfs_setattr_nonsize()
594 gid = inode->i_gid; xfs_setattr_nonsize()
605 xfs_kgid_to_gid(gid), xfs_setattr_nonsize()
631 gid = (mask & ATTR_GID) ? iattr->ia_gid : igid; xfs_setattr_nonsize()
635 * Do a quota reservation only if uid/gid is actually xfs_setattr_nonsize()
640 (XFS_IS_GQUOTA_ON(mp) && !gid_eq(igid, gid)))) { xfs_setattr_nonsize()
680 if (!gid_eq(igid, gid)) { xfs_setattr_nonsize()
689 ip->i_d.di_gid = xfs_kgid_to_gid(gid); xfs_setattr_nonsize()
690 inode->i_gid = gid; xfs_setattr_nonsize()
H A Dxfs_qm.c1591 * Given an inode, a uid, gid and prid make sure that we have
1595 * and returns the dquots corresponding to the uid and/or gid.
1604 xfs_dqid_t gid, xfs_qm_vop_dqalloc()
1625 gid = ip->i_d.di_gid; xfs_qm_vop_dqalloc()
1676 if (ip->i_d.di_gid != gid) { xfs_qm_vop_dqalloc()
1678 error = xfs_qm_dqget(mp, NULL, gid, xfs_qm_vop_dqalloc()
1601 xfs_qm_vop_dqalloc( struct xfs_inode *ip, xfs_dqid_t uid, xfs_dqid_t gid, prid_t prid, uint flags, struct xfs_dquot **O_udqpp, struct xfs_dquot **O_gdqpp, struct xfs_dquot **O_pdqpp) xfs_qm_vop_dqalloc() argument
/linux-4.1.27/security/tomoyo/
H A Daudit.c164 "uid=%u gid=%u euid=%u egid=%u suid=%u sgid=%u " tomoyo_print_header()
195 " path%u.parent={ uid=%u gid=%u " tomoyo_print_header()
198 from_kgid(&init_user_ns, stat->gid), tomoyo_print_header()
204 " path%u={ uid=%u gid=%u ino=%lu major=%u" tomoyo_print_header()
207 from_kgid(&init_user_ns, stat->gid), tomoyo_print_header()
H A Dtomoyo.c371 * @gid: Group ID.
375 static int tomoyo_path_chown(struct path *path, kuid_t uid, kgid_t gid) tomoyo_path_chown() argument
381 if (!error && gid_valid(gid)) tomoyo_path_chown()
383 from_kgid(&init_user_ns, gid)); tomoyo_path_chown()
/linux-4.1.27/ipc/
H A Dcompat.c45 __compat_gid_t gid; member in struct:compat_ipc_perm
142 err |= __get_user(p64->gid, &up64->gid); __get_compat_ipc64_perm()
153 err |= __get_user(p->gid, &up->gid); __get_compat_ipc_perm()
165 err |= __put_user(p64->gid, &up64->gid); __put_compat_ipc64_perm()
183 SET_GID(g, p->gid); __put_compat_ipc_perm()
184 err |= __put_user(g, &uip->gid); __put_compat_ipc_perm()
H A Dutil.c242 new->gid = new->cgid = egid; ipc_addid()
498 else if (in_group_p(ipcp->cgid) || in_group_p(ipcp->gid)) ipcperms()
525 out->gid = from_kgid_munged(current_user_ns(), in->gid); kernel_to_ipc64_perm()
544 SET_GID(out->gid, in->gid); ipc64_perm_to_ipc_perm()
657 kgid_t gid = make_kgid(current_user_ns(), in->gid); ipc_update_perm() local
658 if (!uid_valid(uid) || !gid_valid(gid)) ipc_update_perm()
662 out->gid = gid; ipc_update_perm()
704 perm->gid, perm->mode); ipcctl_pre_down_nolock()
H A Dshm.c123 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", shm_init()
125 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", shm_init()
713 out->shm_perm.gid = tbuf_old.shm_perm.gid; copy_shmid_from_user()
1391 from_kgid_munged(user_ns, shp->shm_perm.gid), sysvipc_shm_proc_show()
/linux-4.1.27/fs/ncpfs/
H A Dinode.c238 inode->i_gid = server->m.gid; ncp_set_attr()
338 if (!gid_eq(server->m.gid, GLOBAL_ROOT_GID)) ncp_show_options()
339 seq_printf(seq, ",gid=%u", ncp_show_options()
340 from_kgid_munged(&init_user_ns, server->m.gid)); ncp_show_options()
366 { "gid", OPT_INT, 'g' },
394 data->gid = GLOBAL_ROOT_GID; ncp_parse_options()
413 data->gid = make_kgid(current_user_ns(), optint); ncp_parse_options()
414 if (!gid_valid(data->gid)) { ncp_parse_options()
503 data.gid = make_kgid(current_user_ns(), md->gid); ncp_fill_super()
522 data.gid = make_kgid(current_user_ns(), md->gid); ncp_fill_super()
539 !gid_valid(data.gid)) ncp_fill_super()
895 if ((attr->ia_valid & ATTR_GID) && !gid_eq(attr->ia_gid, server->m.gid)) ncp_notify_change()
H A Dncp_fs_sb.h34 kgid_t gid; member in struct:ncp_mount_data_kernel
/linux-4.1.27/fs/9p/
H A Dvfs_inode_dotl.c55 * v9fs_get_fsgid_for_create - Helper function to get the gid for creating a
245 kgid_t gid; v9fs_vfs_atomic_open_dotl() local
291 gid = v9fs_get_fsgid_for_create(dir); v9fs_vfs_atomic_open_dotl()
302 mode, gid, &qid); v9fs_vfs_atomic_open_dotl()
387 kgid_t gid; v9fs_vfs_mkdir_dotl() local
412 gid = v9fs_get_fsgid_for_create(dir); v9fs_vfs_mkdir_dotl()
422 err = p9_client_mkdir_dotl(dfid, name, mode, gid, &qid); v9fs_vfs_mkdir_dotl()
570 p9attr.gid = iattr->ia_gid; v9fs_vfs_setattr_dotl()
682 kgid_t gid; v9fs_vfs_symlink_dotl() local
701 gid = v9fs_get_fsgid_for_create(dir); v9fs_vfs_symlink_dotl()
704 err = p9_client_symlink(dfid, name, (char *)symname, gid, &qid); v9fs_vfs_symlink_dotl()
818 kgid_t gid; v9fs_vfs_mknod_dotl() local
845 gid = v9fs_get_fsgid_for_create(dir); v9fs_vfs_mknod_dotl()
856 err = p9_client_mknod_dotl(dfid, name, mode, rdev, gid, &qid); v9fs_vfs_mknod_dotl()
/linux-4.1.27/init/
H A Dinitramfs.c159 static __initdata gid_t gid; variable
176 gid = parsed[3]; parse_header()
344 sys_fchown(wfd, uid, gid); do_name()
354 sys_chown(collected, uid, gid); do_name()
361 sys_chown(collected, uid, gid); do_name()
394 sys_lchown(collected, uid, gid); do_symlink()
/linux-4.1.27/net/802/
H A Dgarp.c153 struct rb_node *parent = app->gid.rb_node; garp_attr_lookup()
173 struct rb_node *parent = NULL, **p = &app->gid.rb_node; garp_attr_create()
199 rb_insert_color(&attr->node, &app->gid); garp_attr_create()
205 rb_erase(&attr->node, &app->gid); garp_attr_destroy()
388 for (node = rb_first(&app->gid); garp_gid_event()
583 app->gid = RB_ROOT; garp_init_applicant()
/linux-4.1.27/fs/befs/
H A Dlinuxvfs.c348 * set uid and gid. But since current BeOS is single user OS, so befs_iget()
349 * you can change by "uid" or "gid" options. befs_iget()
356 befs_sb->mount_opts.gid : befs_iget()
357 make_kgid(&init_user_ns, fs32_to_cpu(sb, raw_inode->gid)); befs_iget()
665 {Opt_gid, "gid=%d"},
678 kgid_t gid; parse_options() local
682 opts->gid = GLOBAL_ROOT_GID; parse_options()
715 gid = INVALID_GID; parse_options()
717 gid = make_kgid(current_user_ns(), option); parse_options()
718 if (!gid_valid(gid)) { parse_options()
719 pr_err("Invalid gid %d, " parse_options()
723 opts->gid = gid; parse_options()
H A Dbefs.h23 kgid_t gid; member in struct:befs_mount_options
H A Ddebug.c85 befs_debug(sb, " gid %u", fs32_to_cpu(sb, inode->gid)); befs_dump_inode()
H A Dbefs_fs_types.h179 fs32 gid; member in struct:__anon10759
/linux-4.1.27/drivers/infiniband/hw/cxgb4/
H A Dprovider.c72 static int c4iw_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) c4iw_multicast_attach() argument
77 static int c4iw_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) c4iw_multicast_detach() argument
291 union ib_gid *gid) c4iw_query_gid()
295 PDBG("%s ibdev %p, port %d, index %d, gid %p\n", c4iw_query_gid()
296 __func__, ibdev, port, index, gid); c4iw_query_gid()
299 memset(&(gid->raw[0]), 0, sizeof(gid->raw)); c4iw_query_gid()
300 memcpy(&(gid->raw[0]), dev->rdev.lldi.ports[port-1]->dev_addr, 6); c4iw_query_gid()
290 c4iw_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) c4iw_query_gid() argument
/linux-4.1.27/drivers/infiniband/hw/usnic/
H A Dusnic_ib_verbs.c254 union ib_gid gid; usnic_ib_query_device() local
265 &gid.raw[0]); usnic_ib_query_device()
266 memcpy(&props->sys_image_guid, &gid.global.interface_id, usnic_ib_query_device()
267 sizeof(gid.global.interface_id)); usnic_ib_query_device()
390 union ib_gid *gid) usnic_ib_query_gid()
400 memset(&(gid->raw[0]), 0, sizeof(gid->raw)); usnic_ib_query_gid()
402 &gid->raw[0]); usnic_ib_query_gid()
389 usnic_ib_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) usnic_ib_query_gid() argument
H A Dusnic_ib_main.c307 union ib_gid gid; usnic_ib_device_add() local
401 us_ibdev->ufdev->inaddr, &gid.raw[0]); usnic_ib_device_add()
402 memcpy(&us_ibdev->ib_dev.node_guid, &gid.global.interface_id, usnic_ib_device_add()
403 sizeof(gid.global.interface_id)); usnic_ib_device_add()
H A Dusnic_ib_verbs.h34 union ib_gid *gid);
/linux-4.1.27/fs/nfsd/
H A Dnfs4acl.c409 * by uid/gid. */ sort_pacl()
441 kgid_t gid; member in union:posix_user_ace_state::__anon11099
554 pace->e_gid = state->groups->aces[i].gid; posix_state_to_acl()
600 static int find_gid(struct posix_acl_state *state, kgid_t gid) find_gid() argument
606 if (gid_eq(a->aces[i].gid, gid)) find_gid()
610 a->aces[i].gid = gid; find_gid()
H A Dnfs4idmap.c643 kgid_t *gid) nfsd_map_name_to_gid()
648 *gid = make_kgid(&init_user_ns, id); nfsd_map_name_to_gid()
649 if (!gid_valid(*gid)) nfsd_map_name_to_gid()
662 kgid_t gid) nfsd4_encode_group()
664 u32 id = from_kgid(&init_user_ns, gid); nfsd4_encode_group()
642 nfsd_map_name_to_gid(struct svc_rqst *rqstp, const char *name, size_t namelen, kgid_t *gid) nfsd_map_name_to_gid() argument
661 nfsd4_encode_group(struct xdr_stream *xdr, struct svc_rqst *rqstp, kgid_t gid) nfsd4_encode_group() argument
/linux-4.1.27/drivers/infiniband/hw/qib/
H A Dqib_verbs_mcast.c225 int qib_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) qib_multicast_attach() argument
243 mcast = qib_mcast_alloc(gid); qib_multicast_attach()
283 int qib_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) qib_multicast_detach() argument
308 ret = memcmp(gid->raw, mcast->mgid.raw, qib_multicast_detach()
H A Dqib_ruc.c254 static int gid_ok(union ib_gid *gid, __be64 gid_prefix, __be64 id) gid_ok() argument
256 return (gid->global.interface_id == id && gid_ok()
257 (gid->global.subnet_prefix == gid_prefix || gid_ok()
258 gid->global.subnet_prefix == IB_DEFAULT_GID_PREFIX)); gid_ok()
/linux-4.1.27/fs/hfs/
H A Dsuper.c141 seq_printf(seq, ",uid=%u,gid=%u", hfs_show_options()
201 { opt_gid, "gid=%u" },
267 pr_err("gid requires an argument\n"); parse_options()
272 pr_err("invalid gid %d\n", tmp); parse_options()
/linux-4.1.27/fs/isofs/
H A Drock.h35 char gid[8]; member in struct:RR_PX_s
H A Dinode.c165 kgid_t gid; member in struct:iso9660_options
322 {Opt_gid, "gid=%u"},
356 popt->gid = GLOBAL_ROOT_GID; parse_options()
441 popt->gid = make_kgid(current_user_ns(), option); parse_options()
442 if (!gid_valid(popt->gid)) parse_options()
825 sbi->s_gid = opt.gid; isofs_fill_super()
1388 /* if we want uid/gid set, override the rock ridge setting */ isofs_read_inode()
/linux-4.1.27/include/net/9p/
H A Dclient.h233 int p9_client_symlink(struct p9_fid *fid, char *name, char *symname, kgid_t gid,
236 kgid_t gid, struct p9_qid *qid);
254 dev_t rdev, kgid_t gid, struct p9_qid *);
256 kgid_t gid, struct p9_qid *);
H A D9p.h386 * @gid: group owner
407 char *gid; member in struct:p9_wstat
463 * @gid: group id
475 kgid_t gid; member in struct:p9_iattr_dotl
/linux-4.1.27/include/uapi/rdma/
H A Dib_user_mad.h69 * @gid - Remote GID in GRH
87 __u8 gid[16]; member in struct:ib_user_mad_hdr_old
112 * @gid - Remote GID in GRH
131 __u8 gid[16]; member in struct:ib_user_mad_hdr
/linux-4.1.27/drivers/staging/lustre/lustre/lclient/
H A Dlcommon_misc.c127 int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock, cl_get_grouplock() argument
159 descr->cld_gid = gid; cl_get_grouplock()
175 cg->cg_gid = gid; cl_get_grouplock()
/linux-4.1.27/fs/nfs_common/
H A Dnfsacl.c39 kgid_t gid; member in struct:nfsacl_encode_desc
63 *p++ = htonl(from_kgid(&init_user_ns, nfsacl_desc->gid)); xdr_nfsace_encode()
104 .gid = inode->i_gid, nfsacl_encode()
/linux-4.1.27/tools/testing/selftests/mount/
H A Dunprivileged-remount-test.c156 gid_t gid; create_and_enter_userns() local
159 gid = getgid(); create_and_enter_userns()
168 write_file("/proc/self/gid_map", "0 %d 1", gid); create_and_enter_userns()
/linux-4.1.27/drivers/staging/lustre/lustre/mdc/
H A Dmdc_lib.c49 b->gid = from_kgid(&init_user_ns, current_gid()); __mdc_pack_body()
139 __u32 uid, __u32 gid, cfs_cap_t cap_effective, __u64 rdev) mdc_create_pack()
151 rec->cr_fsgid = gid; mdc_create_pack()
220 /* XXX do something about time, uid, gid */ mdc_open_pack()
442 /* XXX do something about time, uid, gid */ mdc_rename_pack()
137 mdc_create_pack(struct ptlrpc_request *req, struct md_op_data *op_data, const void *data, int datalen, __u32 mode, __u32 uid, __u32 gid, cfs_cap_t cap_effective, __u64 rdev) mdc_create_pack() argument
H A Dmdc_internal.h70 __u32 gid, cfs_cap_t capability, __u64 rdev);
133 const void *data, int datalen, int mode, __u32 uid, __u32 gid,
H A Dmdc_reint.c208 const void *data, int datalen, int mode, __u32 uid, __u32 gid, mdc_create()
263 gid, cap_effective, rdev); mdc_create()
207 mdc_create(struct obd_export *exp, struct md_op_data *op_data, const void *data, int datalen, int mode, __u32 uid, __u32 gid, cfs_cap_t cap_effective, __u64 rdev, struct ptlrpc_request **request) mdc_create() argument
/linux-4.1.27/fs/cifs/
H A Dcifsacl.c315 kgid_t gid; sid_to_id() local
318 gid = make_kgid(&init_user_ns, id); sid_to_id()
319 if (gid_valid(gid)) sid_to_id()
320 fgid = gid; sid_to_id()
768 cifs_dbg(FYI, "%s: Error %d mapping Owner SID to gid\n", parse_sec_desc()
774 cifs_dbg(FYI, "%s: Error %d mapping Group SID to gid\n", parse_sec_desc()
790 __u32 secdesclen, __u64 nmode, kuid_t uid, kgid_t gid, int *aclflag) build_sec_desc()
842 if (gid_valid(gid)) { /* chgrp */ build_sec_desc()
850 id = from_kgid(&init_user_ns, gid); build_sec_desc()
1053 kuid_t uid, kgid_t gid) id_mode_to_cifs_acl()
1100 rc = build_sec_desc(pntsd, pnntsd, secdesclen, nmode, uid, gid, id_mode_to_cifs_acl()
789 build_sec_desc(struct cifs_ntsd *pntsd, struct cifs_ntsd *pnntsd, __u32 secdesclen, __u64 nmode, kuid_t uid, kgid_t gid, int *aclflag) build_sec_desc() argument
1052 id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 nmode, kuid_t uid, kgid_t gid) id_mode_to_cifs_acl() argument
H A Dcifs_fs_sb.h36 #define CIFS_MOUNT_OVERR_GID 0x800 /* override gid returned from server */
H A Dinode.c296 kgid_t gid = make_kgid(&init_user_ns, id); cifs_unix_basic_to_fattr() local
297 if (gid_valid(gid)) cifs_unix_basic_to_fattr()
298 fattr->cf_gid = gid; cifs_unix_basic_to_fattr()
1380 args.gid = parent->i_gid; cifs_mkdir_qinfo()
1382 args.gid = current_fsgid(); cifs_mkdir_qinfo()
1385 args.gid = INVALID_GID; /* no change */ cifs_mkdir_qinfo()
1445 * need to set uid/gid. cifs_posix_mkdir()
1995 stat->gid = current_fsgid(); cifs_getattr()
2172 args->gid = attrs->ia_gid; cifs_setattr_unix()
2174 args->gid = INVALID_GID; /* no change */ cifs_setattr_unix()
2242 kgid_t gid = INVALID_GID; cifs_setattr_nounix() local
2297 gid = attrs->ia_gid; cifs_setattr_nounix()
2301 if (uid_valid(uid) || gid_valid(gid)) { cifs_setattr_nounix()
2303 uid, gid); cifs_setattr_nounix()
H A Ddir.c355 args.gid = inode->i_gid; cifs_do_create()
357 args.gid = current_fsgid(); cifs_do_create()
360 args.gid = INVALID_GID; /* no change */ cifs_do_create()
616 args.gid = current_fsgid(); cifs_mknod()
619 args.gid = INVALID_GID; /* no change */ cifs_mknod()
/linux-4.1.27/drivers/infiniband/hw/amso1100/
H A Dc2_provider.c111 int index, union ib_gid *gid) c2_query_gid()
116 memset(&(gid->raw[0]), 0, sizeof(gid->raw)); c2_query_gid()
117 memcpy(&(gid->raw[0]), c2dev->pseudo_netdev->dev_addr, 6); c2_query_gid()
570 static int c2_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) c2_multicast_attach() argument
576 static int c2_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) c2_multicast_detach() argument
110 c2_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) c2_query_gid() argument
/linux-4.1.27/fs/jffs2/
H A Dfs.c104 ri->gid = cpu_to_je16((ivalid & ATTR_GID)? jffs2_do_setattr()
153 i_gid_write(inode, je16_to_cpu(ri->gid)); jffs2_do_setattr()
283 i_gid_write(inode, je16_to_cpu(latest_node.gid)); jffs2_iget()
449 ri->gid = cpu_to_je16(i_gid_read(dir_i)); jffs2_new_inode()
453 ri->gid = cpu_to_je16(from_kgid(&init_user_ns, current_fsgid())); jffs2_new_inode()
475 i_gid_write(inode, je16_to_cpu(ri->gid)); jffs2_new_inode()
H A Dfile.c178 ri.gid = cpu_to_je16(i_gid_read(inode)); jffs2_write_begin()
286 ri->gid = cpu_to_je16(i_gid_read(inode)); jffs2_write_end()
/linux-4.1.27/include/net/nfc/
H A Dnci.h186 #define nci_opcode_pack(gid, oid) (__u16)((((__u16)((gid)&0x0f))<<8)|\
213 __u8 gid; /* MT & PBF & GID */ member in struct:nci_ctrl_hdr
/linux-4.1.27/drivers/nfc/
H A Dnfcwilink.c63 __u8 gid; member in struct:nci_vs_nfcc_info_cmd
69 __u8 gid; member in struct:nci_vs_nfcc_info_rsp
130 if ((skb->len > 3) && (rsp->gid == NCI_VS_NFCC_INFO_RSP_GID) && nfcwilink_fw_download_receive()
158 cmd->gid = NCI_VS_NFCC_INFO_CMD_GID; nfcwilink_get_bts_file_name()
/linux-4.1.27/drivers/infiniband/hw/mlx5/
H A Dmain.c266 union ib_gid *gid) mlx5_ib_query_gid()
285 memcpy(gid->raw, out_mad->data + 8, 8); mlx5_ib_query_gid()
295 memcpy(gid->raw + 8, out_mad->data + (index % 8) * 8, 8); mlx5_ib_query_gid()
706 static int mlx5_ib_mcg_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) mlx5_ib_mcg_attach() argument
711 err = mlx5_core_attach_mcg(dev->mdev, gid, ibqp->qp_num); mlx5_ib_mcg_attach()
714 ibqp->qp_num, gid->raw); mlx5_ib_mcg_attach()
719 static int mlx5_ib_mcg_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) mlx5_ib_mcg_detach() argument
724 err = mlx5_core_detach_mcg(dev->mdev, gid, ibqp->qp_num); mlx5_ib_mcg_detach()
727 ibqp->qp_num, gid->raw); mlx5_ib_mcg_detach()
265 mlx5_ib_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) mlx5_ib_query_gid() argument
/linux-4.1.27/fs/
H A Dstat.c28 stat->gid = inode->i_gid; generic_fillattr()
164 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); cp_old_stat()
250 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); cp_new_stat()
387 tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); cp_new_stat64()
H A Dopen.c331 * access() needs to use the real uid/gid, not the effective uid/gid.
352 override_cred->fsgid = override_cred->gid; SYSCALL_DEFINE3()
572 kgid_t gid; chown_common() local
575 gid = make_kgid(current_user_ns(), group); chown_common()
586 if (!gid_valid(gid)) chown_common()
589 newattrs.ia_gid = gid; chown_common()
595 error = security_path_chown(path, uid, gid); chown_common()
H A Dcompat.c146 SET_GID(tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid)); cp_compat_stat()
665 __compat_gid_t gid; member in struct:compat_ncp_mount_data
679 compat_ulong_t gid; member in struct:compat_ncp_mount_data_v4
694 n->gid = c_n->gid; do_ncp_super_data_conv()
705 n->gid = c_n->gid; do_ncp_super_data_conv()
H A Dposix_acl.c612 kgid_t gid; posix_acl_fix_xattr_userns() local
634 gid = make_kgid(from, le32_to_cpu(entry->e_id)); posix_acl_fix_xattr_userns()
635 entry->e_id = cpu_to_le32(from_kgid(to, gid)); posix_acl_fix_xattr_userns()
H A Dexec.c1148 !gid_eq(bprm->cred->gid, current_egid())) { setup_new_exec()
1286 kgid_t gid; bprm_fill_uid() local
1306 /* reload atomically mode/uid/gid now that lock held */ bprm_fill_uid()
1309 gid = inode->i_gid; bprm_fill_uid()
1314 !kgid_has_mapping(bprm->cred->user_ns, gid)) bprm_fill_uid()
1324 bprm->cred->egid = gid; bprm_fill_uid()
/linux-4.1.27/fs/hostfs/
H A Dhostfs.h56 unsigned int gid; member in struct:hostfs_stat
/linux-4.1.27/fs/nfs/flexfilelayout/
H A Dflexfilelayout.h54 u32 gid; member in struct:nfs4_ff_layout_mirror
H A Dflexfilelayoutdev.c317 .gid = make_kgid(&init_user_ns, mirror->gid), ff_layout_update_mirror_cred()
/linux-4.1.27/arch/powerpc/kvm/
H A De500.c190 unsigned int as, unsigned int gid, kvmppc_e500_get_sid()
197 BUG_ON(gid >= NUM_TIDS); kvmppc_e500_get_sid()
200 sid = local_sid_lookup(&idt->id[as][gid][pr]); kvmppc_e500_get_sid()
204 sid = local_sid_setup_one(&idt->id[as][gid][pr]); kvmppc_e500_get_sid()
189 kvmppc_e500_get_sid(struct kvmppc_vcpu_e500 *vcpu_e500, unsigned int as, unsigned int gid, unsigned int pr, int avoid_recursion) kvmppc_e500_get_sid() argument
/linux-4.1.27/drivers/staging/lustre/lustre/llite/
H A Dremote_perm.c172 perm->rp_gid != current->gid || ll_update_remote_perm()
179 perm->rp_fsgid, current->uid, current->gid, ll_update_remote_perm()
/linux-4.1.27/drivers/infiniband/ulp/ipoib/
H A Dipoib_fs.c46 static void format_gid(union ib_gid *gid, char *buf) format_gid() argument
52 be16_to_cpu(((__be16 *) gid->raw)[i])); format_gid()
H A Dipoib_main.c256 static struct ipoib_path *__path_find(struct net_device *dev, void *gid) __path_find() argument
266 ret = memcmp(gid, path->pathrec.dgid.raw, __path_find()
528 static struct ipoib_path *path_rec_create(struct net_device *dev, void *gid) path_rec_create() argument
546 memcpy(path->pathrec.dgid.raw, gid, sizeof (union ib_gid)); path_rec_create()
1174 void ipoib_del_neighs_by_gid(struct net_device *dev, u8 *gid) ipoib_del_neighs_by_gid() argument
1198 if (!memcmp(gid, neigh->daddr + 4, sizeof (union ib_gid))) { ipoib_del_neighs_by_gid()
/linux-4.1.27/fs/ntfs/
H A Dvolume.h51 kgid_t gid; /* gid that files will be mounted as. */ member in struct:__anon11249
/linux-4.1.27/security/integrity/evm/
H A Devm_crypto.c104 gid_t gid; hmac_add_misc() member in struct:h_misc
112 hmac_misc.gid = from_kgid(&init_user_ns, inode->i_gid); hmac_add_misc()
/linux-4.1.27/fs/udf/
H A Dsuper.c224 kgid_t gid; member in struct:udf_options
357 seq_puts(seq, ",gid=forget"); udf_show_options()
359 seq_puts(seq, ",gid=ignore"); udf_show_options()
363 seq_printf(seq, ",gid=%u", from_kgid(&init_user_ns, sbi->s_gid)); udf_show_options()
397 * gid= Set the default group.
466 {Opt_gforget, "gid=forget"},
467 {Opt_gignore, "gid=ignore"},
468 {Opt_gid, "gid=%u"},
546 uopt->gid = make_kgid(current_user_ns(), option); udf_parse_options()
547 if (!gid_valid(uopt->gid)) udf_parse_options()
661 uopt.gid = sbi->s_gid; udf_remount_fs()
672 sbi->s_gid = uopt.gid; udf_remount_fs()
2070 uopt.gid = INVALID_GID; udf_fill_super()
2108 sbi->s_gid = uopt.gid; udf_fill_super()
/linux-4.1.27/drivers/infiniband/ulp/srpt/
H A Dib_srpt.h352 * @gid: cached value of the port's gid.
367 union ib_gid gid; member in struct:srpt_port
/linux-4.1.27/fs/proc/
H A Dgeneric.c521 void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) proc_set_user() argument
524 de->gid = gid; proc_set_user()
H A Droot.c47 {Opt_gid, "gid=%u"},
H A Dinode.c109 seq_printf(seq, ",gid=%u", from_kgid_munged(&init_user_ns, pid->pid_gid)); proc_show_options()
433 inode->i_gid = de->gid; proc_get_inode()
/linux-4.1.27/arch/sparc/include/asm/
H A Dcompat.h250 __compat_gid32_t gid; member in struct:compat_ipc64_perm
/linux-4.1.27/arch/mips/include/asm/
H A Dcompat.h227 __compat_gid32_t gid; member in struct:compat_ipc64_perm
/linux-4.1.27/include/linux/sunrpc/
H A Dauth.h38 kgid_t gid; member in struct:auth_cred
/linux-4.1.27/arch/parisc/include/asm/
H A Dcompat.h195 __compat_gid_t gid; member in struct:compat_ipc64_perm
/linux-4.1.27/arch/powerpc/include/asm/
H A Dcompat.h223 __compat_gid_t gid; member in struct:compat_ipc64_perm
/linux-4.1.27/net/netfilter/
H A Dxt_recent.c336 kgid_t gid; recent_mt_check() local
412 gid = make_kgid(&init_user_ns, ip_list_gid); recent_mt_check()
413 if (!uid_valid(uid) || !gid_valid(gid)) { recent_mt_check()
425 proc_set_user(pde, uid, gid); recent_mt_check()
/linux-4.1.27/fs/adfs/
H A Dadfs.h53 kgid_t s_gid; /* owner gid */
/linux-4.1.27/drivers/isdn/hysdn/
H A Dhysdn_procconf.c239 hysdn_addlog(card, "config open for uid=%d gid=%d mode=0x%x", hysdn_conf_open()
313 hysdn_addlog(card, "config close for uid=%d gid=%d mode=0x%x", hysdn_conf_close()
/linux-4.1.27/drivers/infiniband/hw/cxgb3/
H A Diwch_provider.c75 static int iwch_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) iwch_multicast_attach() argument
80 static int iwch_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) iwch_multicast_detach() argument
1114 int index, union ib_gid *gid) iwch_query_gid()
1118 PDBG("%s ibdev %p, port %d, index %d, gid %p\n", iwch_query_gid()
1119 __func__, ibdev, port, index, gid); iwch_query_gid()
1122 memset(&(gid->raw[0]), 0, sizeof(gid->raw)); iwch_query_gid()
1123 memcpy(&(gid->raw[0]), dev->rdev.port_info.lldevs[port-1]->dev_addr, 6); iwch_query_gid()
1113 iwch_query_gid(struct ib_device *ibdev, u8 port, int index, union ib_gid *gid) iwch_query_gid() argument
/linux-4.1.27/drivers/staging/lustre/lustre/include/
H A Dlustre_quota.h216 * original uid and gid, new uid and gid.
/linux-4.1.27/fs/overlayfs/
H A Dcopy_up.c197 .ia_gid = stat->gid, ovl_set_attr()
335 override_cred->fsgid = stat->gid; ovl_copy_up_one()
/linux-4.1.27/drivers/staging/lustre/lustre/obdclass/
H A Ddt_object.c578 .dif_keysize_min = sizeof(__u64), /* 64-bit uid/gid */
579 .dif_keysize_max = sizeof(__u64), /* 64-bit uid/gid */
590 .dif_keysize_min = sizeof(__u64), /* 64-bit uid/gid */
591 .dif_keysize_max = sizeof(__u64), /* 64-bit uid/gid */
602 .dif_keysize_min = sizeof(__u64), /* 64-bit uid/gid */
603 .dif_keysize_max = sizeof(__u64), /* 64-bit uid/gid */
/linux-4.1.27/fs/hugetlbfs/
H A Dinode.c49 kgid_t gid; member in struct:hugetlbfs_config
81 {Opt_gid, "gid=%u"},
432 inode->i_gid = config->gid; hugetlbfs_get_root()
788 pconfig->gid = make_kgid(current_user_ns(), option); hugetlbfs_parse_options()
789 if (!gid_valid(pconfig->gid)) hugetlbfs_parse_options()
884 config.gid = current_fsgid(); hugetlbfs_fill_super()
/linux-4.1.27/include/linux/mlx4/
H A Ddevice.h1082 int mlx4_unicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
1084 int mlx4_unicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
1086 int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
1089 int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
1380 int mlx4_get_slave_from_roce_gid(struct mlx4_dev *dev, int port, u8 *gid,
1383 u8 *gid);
/linux-4.1.27/include/scsi/
H A Dfc_encode.h40 struct fc_ns_gid_ft gid; member in union:fc_ct_req::__anon12893
143 ct->payload.gid.fn_fc4_type = FC_TYPE_FCP; fc_ct_ns_fill()
149 ct->payload.gid.fn_fc4_type = FC_TYPE_FCP; fc_ct_ns_fill()
/linux-4.1.27/net/sunrpc/auth_gss/
H A Dgss_rpc_xdr.c205 /* gid */ gssx_dec_linux_creds()
211 /* number of additional gid's */ gssx_dec_linux_creds()
222 /* gid's */ gssx_dec_linux_creds()
/linux-4.1.27/include/linux/ceph/
H A Dceph_fs.h354 __le32 gid; member in struct:ceph_mds_request_args::__anon11524
469 __le32 mode, uid, gid; member in struct:ceph_mds_reply_inode
646 __le32 uid, gid, mode; member in struct:ceph_mds_caps
/linux-4.1.27/drivers/nfc/st21nfcb/
H A Dst21nfcb_se.c216 * - source gid (1byte) st21nfcb_hci_load_session()
218 * - destination gid (1byte) st21nfcb_hci_load_session()

Completed in 4364 milliseconds

123