Home
last modified time | relevance | path

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

12345678910>>...23

/kernel/linux/linux-5.10/drivers/block/zram/zram_group/
Dgroup_writeback.c31 static void zram_set_memcg_id(struct zram *zram, u32 index, u16 gid) in zram_set_memcg_id() argument
35 zram->table[index].flags = old | ((u64)gid << ZRAM_SIZE_SHIFT); in zram_set_memcg_id()
39 static bool obj_can_wb(struct zram *zram, u32 index, u16 gid) in obj_can_wb() argument
42 if (zram_get_memcg_id(zram, index) != gid) { in obj_can_wb()
44 index, zram_get_memcg_id(zram, index), gid); in obj_can_wb()
74 zgrp_obj_insert(zram->zgrp, index, gid); in obj_can_wb()
107 static u32 move_obj_to_hpio(struct zram *zram, u32 index, u16 gid, in move_obj_to_hpio() argument
120 if (!obj_can_wb(zram, index, gid)) in move_obj_to_hpio()
127 zgrp_obj_putback(zram->zgrp, index, gid); in move_obj_to_hpio()
139 wbgrp_obj_stats_inc(zram->zgrp, gid, eid, size); in move_obj_to_hpio()
[all …]
Dzram_group.c111 void zgrp_obj_insert(struct zram_group *zgrp, u32 index, u16 gid) in zgrp_obj_insert() argument
121 if (!CHECK_BOUND(gid, 1, zgrp->nr_grp - 1)) in zgrp_obj_insert()
123 hid = gid + zgrp->nr_obj; in zgrp_obj_insert()
125 pr_debug("insert obj %u to group %u\n", index, gid); in zgrp_obj_insert()
131 bool zgrp_obj_delete(struct zram_group *zgrp, u32 index, u16 gid) in zgrp_obj_delete() argument
141 if (!CHECK_BOUND(gid, 1, zgrp->nr_grp - 1)) in zgrp_obj_delete()
143 pr_debug("delete obj %u from group %u\n", index, gid); in zgrp_obj_delete()
144 hid = gid + zgrp->nr_obj; in zgrp_obj_delete()
153 u32 zgrp_isolate_objs(struct zram_group *zgrp, u16 gid, u32 *idxs, u32 nr, bool *last) in zgrp_isolate_objs() argument
165 if (!CHECK_BOUND(gid, 1, zgrp->nr_grp - 1)) in zgrp_isolate_objs()
[all …]
Dzram_group.h70 void zgrp_obj_insert(struct zram_group *zgrp, u32 index, u16 gid);
71 bool zgrp_obj_delete(struct zram_group *zgrp, u32 index, u16 gid);
72 u32 zgrp_isolate_objs(struct zram_group *zgrp, u16 gid, u32 *idxs, u32 nr, bool *last);
74 void zgrp_obj_putback(struct zram_group *zgrp, u32 index, u16 gid);
75 void zgrp_obj_stats_inc(struct zram_group *zgrp, u16 gid, u32 size);
76 void zgrp_obj_stats_dec(struct zram_group *zgrp, u16 gid, u32 size);
77 void zgrp_fault_stats_inc(struct zram_group *zgrp, u16 gid, u32 size);
80 void zram_group_dump(struct zram_group *zgrp, u16 gid, u32 index);
86 void zgrp_ext_insert(struct zram_group *zgrp, u32 eid, u16 gid);
87 bool zgrp_ext_delete(struct zram_group *zgrp, u32 eid, u16 gid);
[all …]
/kernel/linux/linux-5.10/include/linux/
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
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
124 static inline bool gid_valid(kgid_t gid) in gid_valid() argument
126 return __kgid_val(gid) != (gid_t) -1; in gid_valid()
132 extern kgid_t make_kgid(struct user_namespace *from, gid_t gid);
135 extern gid_t from_kgid(struct user_namespace *to, kgid_t gid);
137 extern gid_t from_kgid_munged(struct user_namespace *to, kgid_t gid);
144 static inline bool kgid_has_mapping(struct user_namespace *ns, kgid_t gid) in kgid_has_mapping() argument
146 return from_kgid(ns, gid) != (gid_t) -1; in kgid_has_mapping()
[all …]
/kernel/linux/linux-5.10/include/rdma/
Dib_addr.h98 union ib_gid *gid) in ib_addr_get_mgid() argument
100 memcpy(gid, dev_addr->broadcast + 4, sizeof *gid); in ib_addr_get_mgid()
113 static inline int rdma_ip2gid(struct sockaddr *addr, union ib_gid *gid) in rdma_ip2gid() argument
119 (struct in6_addr *)gid); in rdma_ip2gid()
122 *(struct in6_addr *)&gid->raw = in rdma_ip2gid()
132 static inline void rdma_gid2ip(struct sockaddr *out, const union ib_gid *gid) in rdma_gid2ip() argument
134 if (ipv6_addr_v4mapped((struct in6_addr *)gid)) { in rdma_gid2ip()
138 memcpy(&out_in->sin_addr.s_addr, gid->raw + 12, 4); in rdma_gid2ip()
143 memcpy(&out_in->sin6_addr.s6_addr, gid->raw, 16); in rdma_gid2ip()
152 static inline void rdma_addr_get_sgid(struct rdma_dev_addr *dev_addr, union ib_gid *gid) in rdma_addr_get_sgid() argument
[all …]
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, u8 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);
/kernel/linux/linux-5.10/security/safesetid/
Dlsm.c47 hash_for_each_possible(policy->rules, rule, next, __kgid_val(src.gid)) { in _setid_policy_lookup()
48 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()
134 if (setid_policy_lookup((kid_t){.gid = cred->gid}, INVALID_ID, GID) == SIDPOL_DEFAULT) in safesetid_security_capable()
166 if (gid_eq(new_id.gid, old->gid) || gid_eq(new_id.gid, old->egid) || in id_permitted_for_cred()
167 gid_eq(new_id.gid, old->sgid)) in id_permitted_for_cred()
186 __kgid_val(old->gid), __kgid_val(old->egid), in id_permitted_for_cred()
187 __kgid_val(old->sgid), __kgid_val(new_id.gid)); in id_permitted_for_cred()
229 if (setid_policy_lookup((kid_t){.gid = old->gid}, INVALID_ID, GID) == SIDPOL_DEFAULT) in safesetid_task_fix_setgid()
232 if (id_permitted_for_cred(old, (kid_t){.gid = new->gid}, GID) && in safesetid_task_fix_setgid()
[all …]
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()
/kernel/linux/linux-5.10/drivers/infiniband/hw/mthca/
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()
120 int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) in mthca_multicast_attach() argument
138 err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index); in mthca_multicast_attach()
143 if (!memcmp(mgm->gid, zero_gid, 16)) in mthca_multicast_attach()
144 memcpy(mgm->gid, gid->raw, 16); in mthca_multicast_attach()
[all …]
/kernel/linux/linux-5.10/drivers/pinctrl/mvebu/
Dpinctrl-mvebu.c42 unsigned gid; member
163 unsigned gid, unsigned long *config) in mvebu_pinconf_group_get() argument
166 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinconf_group_get()
175 unsigned gid, unsigned long *configs, in mvebu_pinconf_group_set() argument
179 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinconf_group_set()
195 struct seq_file *s, unsigned gid) in mvebu_pinconf_group_dbg_show() argument
198 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinconf_group_dbg_show()
203 if (mvebu_pinconf_group_get(pctldev, gid, &config)) in mvebu_pinconf_group_dbg_show()
285 unsigned gid) in mvebu_pinmux_set() argument
289 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinmux_set()
[all …]
/kernel/linux/linux-5.10/ipc/
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()
/kernel/linux/linux-5.10/drivers/infiniband/core/
Dcache.c157 bool rdma_is_zero_gid(const union ib_gid *gid) in rdma_is_zero_gid() argument
159 return !memcmp(gid, &zgid, sizeof(*gid)); in rdma_is_zero_gid()
202 return device->port_data[port].cache.gid; in rdma_gid_table()
244 port_num, entry->attr.index, entry->attr.gid.raw); in free_gid_entry_locked()
328 entry->attr.gid.raw); in store_gid_entry()
391 ix, table->data_vec[ix]->attr.gid.raw); in del_gid()
444 if (rdma_is_zero_gid(&attr->gid)) in add_modify_gid()
466 static int find_gid(struct ib_gid_table *table, const union ib_gid *gid, in find_gid() argument
520 memcmp(gid, &data->attr.gid, sizeof(*gid))) in find_gid()
540 static void make_default_gid(struct net_device *dev, union ib_gid *gid) in make_default_gid() argument
[all …]
/kernel/linux/linux-5.10/kernel/
Dgroups.c50 gid_t gid; in groups_to_user() local
51 gid = from_kgid_munged(user_ns, group_info->gid[i]); in groups_to_user()
52 if (put_user(gid, grouplist+i)) in groups_to_user()
67 gid_t gid; in groups_from_user() local
69 if (get_user(gid, grouplist+i)) in groups_from_user()
72 kgid = make_kgid(user_ns, gid); in groups_from_user()
76 group_info->gid[i] = kgid; in groups_from_user()
91 sort(group_info->gid, group_info->ngroups, sizeof(*group_info->gid), in groups_sort()
108 if (gid_gt(grp, group_info->gid[mid])) in groups_search()
110 else if (gid_lt(grp, group_info->gid[mid])) in groups_search()
/kernel/linux/linux-5.10/usr/
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
143 …scanf(line, "%" str(PATH_MAX) "s %" str(PATH_MAX) "s %o %d %d", name, target, &mode, &uid, &gid)) { in cpio_mkslink_line()
147 rc = cpio_mkslink(name, target, mode, uid, gid); in cpio_mkslink_line()
153 uid_t uid, gid_t gid) in cpio_mkgeneric() argument
165 (long) gid, /* gid */ in cpio_mkgeneric()
211 int gid; in cpio_mkgeneric_line() local
214 if (4 != sscanf(line, "%" str(PATH_MAX) "s %o %d %d", name, &mode, &uid, &gid)) { in cpio_mkgeneric_line()
220 rc = cpio_mkgeneric(name, mode, uid, gid); in cpio_mkgeneric_line()
[all …]
Dgen_initramfs.sh17 $0 [-o <file>] [-l <dep_list>] [-u <uid>] [-g <gid>] {-d | <cpio_source>} ...
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}"
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/
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()
/kernel/linux/linux-5.10/fs/quota/
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()
/kernel/linux/linux-5.10/drivers/misc/sgi-gru/
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()
176 is_kernel_context(ts) ? 0 : ts->ts_gms->ms_asids[gid].mt_asid, 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()
213 static void *seq_start(struct seq_file *file, loff_t *gid) in seq_start() argument
215 if (*gid < gru_max_gids) in seq_start()
216 return gid; in seq_start()
[all …]
/kernel/liteos_a/apps/init/src/
Dinit.c53 pid_t gid; in main() local
79 gid = getpgrp(); in main()
80 if (gid < 0) { in main()
81 printf("get group id failed, pgrpid %d, errno %d\n", gid, errno); in main()
84 ret = tcsetpgrp(STDIN_FILENO, gid); in main()
/kernel/linux/linux-5.10/fs/nfsd/
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()
/kernel/liteos_a/syscall/
Dprocess_syscall.c500 int SysSetProcessGroupID(unsigned int pid, unsigned int gid) in SysSetProcessGroupID() argument
508 if (gid == 0) { in SysSetProcessGroupID()
509 gid = pid; in SysSetProcessGroupID()
512 ret = OsPermissionToCheck(pid, gid); in SysSetProcessGroupID()
517 return OsSetProcessGroupID(pid, gid); in SysSetProcessGroupID()
777 int SysSetGroupID(int gid) in SysSetGroupID() argument
786 if (gid < 0) { in SysSetGroupID()
790 unsigned int kgid = OsMakeKgid(userContainer, gid); in SysSetGroupID()
803 newCredentials->gid = kgid; in SysSetGroupID()
805 oldGid = user->gid; in SysSetGroupID()
[all …]
/kernel/linux/linux-5.10/drivers/infiniband/hw/bnxt_re/
Dqplib_sp.c205 struct bnxt_qplib_gid *gid) in bnxt_qplib_get_sgid() argument
213 memcpy(gid, &sgid_tbl->tbl[index].gid, sizeof(*gid)); in bnxt_qplib_get_sgid()
218 struct bnxt_qplib_gid *gid, u16 vlan_id, bool update) in bnxt_qplib_del_sgid() argument
236 if (!memcmp(&sgid_tbl->tbl[index].gid, gid, sizeof(*gid)) && in bnxt_qplib_del_sgid()
263 memcpy(&sgid_tbl->tbl[index].gid, &bnxt_qplib_gid_zero, in bnxt_qplib_del_sgid()
278 struct bnxt_qplib_gid *gid, u8 *smac, u16 vlan_id, in bnxt_qplib_add_sgid() argument
298 if (!memcmp(&sgid_tbl->tbl[i], gid, sizeof(*gid)) && in bnxt_qplib_add_sgid()
323 req.gid[0] = cpu_to_be32(((u32 *)gid->data)[3]); in bnxt_qplib_add_sgid()
324 req.gid[1] = cpu_to_be32(((u32 *)gid->data)[2]); in bnxt_qplib_add_sgid()
325 req.gid[2] = cpu_to_be32(((u32 *)gid->data)[1]); in bnxt_qplib_add_sgid()
[all …]
/kernel/linux/linux-5.10/net/core/
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()
/kernel/linux/linux-5.10/include/net/
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()

12345678910>>...23