/kernel/linux/linux-5.10/include/net/ |
H A D | scm.h | 34 struct scm_creds creds; /* Skb credentials */ member 60 scm->creds.pid = pid_vnr(pid); in scm_set_cred() 61 scm->creds.uid = uid; in scm_set_cred() 62 scm->creds.gid = gid; in scm_set_cred() 82 scm->creds.uid = INVALID_UID; in scm_send() 83 scm->creds.gid = INVALID_GID; in scm_send() 137 .pid = scm->creds.pid, in scm_recv() 138 .uid = from_kuid_munged(current_ns, scm->creds.uid), in scm_recv() 139 .gid = from_kgid_munged(current_ns, scm->creds.gid), in scm_recv()
|
/kernel/linux/linux-6.6/include/net/ |
H A D | scm.h | 35 struct scm_creds creds; /* Skb credentials */ member 61 scm->creds.pid = pid_vnr(pid); in scm_set_cred() 62 scm->creds.uid = uid; in scm_set_cred() 63 scm->creds.gid = gid; in scm_set_cred() 83 scm->creds.uid = INVALID_UID; in scm_send() 84 scm->creds.gid = INVALID_GID; in scm_send() 175 .pid = scm->creds.pid, in __scm_recv_common() 176 .uid = from_kuid_munged(current_ns, scm->creds.uid), in __scm_recv_common() 177 .gid = from_kgid_munged(current_ns, scm->creds.gid), in __scm_recv_common()
|
/kernel/linux/linux-5.10/net/core/ |
H A D | scm.c | 46 static __inline__ int scm_check_creds(struct ucred *creds) in scm_check_creds() argument 49 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds() 50 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds() 55 if ((creds->pid == task_tgid_vnr(current) || in scm_check_creds() 170 struct ucred creds; in __scm_send() local 175 memcpy(&creds, CMSG_DATA(cmsg), sizeof(struct ucred)); in __scm_send() 176 err = scm_check_creds(&creds); in __scm_send() 180 p->creds.pid = creds.pid; in __scm_send() 181 if (!p->pid || pid_vnr(p->pid) != creds in __scm_send() [all...] |
/kernel/linux/linux-6.6/net/core/ |
H A D | scm.c | 46 static __inline__ int scm_check_creds(struct ucred *creds) in scm_check_creds() argument 49 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds() 50 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds() 55 if ((creds->pid == task_tgid_vnr(current) || in scm_check_creds() 171 struct ucred creds; in __scm_send() local 176 memcpy(&creds, CMSG_DATA(cmsg), sizeof(struct ucred)); in __scm_send() 177 err = scm_check_creds(&creds); in __scm_send() 181 p->creds.pid = creds.pid; in __scm_send() 182 if (!p->pid || pid_vnr(p->pid) != creds in __scm_send() [all...] |
/kernel/linux/linux-5.10/net/sunrpc/auth_gss/ |
H A D | gss_rpc_xdr.c | 163 /* Contents of linux creds are all host-endian: */ in get_host_u32() 169 struct svc_cred *creds) in gssx_dec_linux_creds() 190 creds->cr_uid = make_kuid(&init_user_ns, tmp); in gssx_dec_linux_creds() 196 creds->cr_gid = make_kgid(&init_user_ns, tmp); in gssx_dec_linux_creds() 205 creds->cr_group_info = groups_alloc(N); in gssx_dec_linux_creds() 206 if (creds->cr_group_info == NULL) in gssx_dec_linux_creds() 219 creds->cr_group_info->gid[i] = kgid; in gssx_dec_linux_creds() 221 groups_sort(creds->cr_group_info); in gssx_dec_linux_creds() 225 groups_free(creds->cr_group_info); in gssx_dec_linux_creds() 232 struct svc_cred *creds; in gssx_dec_option_array() local 168 gssx_dec_linux_creds(struct xdr_stream *xdr, struct svc_cred *creds) gssx_dec_linux_creds() argument [all...] |
H A D | gss_rpc_upcall.c | 333 data->creds = *(struct svc_cred *)value->data; in gssp_accept_sec_context_upcall() 344 /* convert to GSS_NT_HOSTBASED_SERVICE form and set into creds */ in gssp_accept_sec_context_upcall() 347 data->creds.cr_raw_principal = in gssp_accept_sec_context_upcall() 349 data->creds.cr_principal = in gssp_accept_sec_context_upcall() 351 gssp_hostbased_service(&data->creds.cr_principal); in gssp_accept_sec_context_upcall() 354 data->creds.cr_targ_princ = in gssp_accept_sec_context_upcall() 356 gssp_hostbased_service(&data->creds.cr_targ_princ); in gssp_accept_sec_context_upcall() 370 free_svc_cred(&data->creds); in gssp_free_upcall_data()
|
H A D | gss_rpc_upcall.h | 22 struct svc_cred creds; member
|
/kernel/linux/linux-6.6/net/sunrpc/auth_gss/ |
H A D | gss_rpc_xdr.c | 163 /* Contents of linux creds are all host-endian: */ in get_host_u32() 169 struct svc_cred *creds) in gssx_dec_linux_creds() 190 creds->cr_uid = make_kuid(&init_user_ns, tmp); in gssx_dec_linux_creds() 196 creds->cr_gid = make_kgid(&init_user_ns, tmp); in gssx_dec_linux_creds() 205 creds->cr_group_info = groups_alloc(N); in gssx_dec_linux_creds() 206 if (creds->cr_group_info == NULL) in gssx_dec_linux_creds() 219 creds->cr_group_info->gid[i] = kgid; in gssx_dec_linux_creds() 221 groups_sort(creds->cr_group_info); in gssx_dec_linux_creds() 225 groups_free(creds->cr_group_info); in gssx_dec_linux_creds() 232 struct svc_cred *creds; in gssx_dec_option_array() local 168 gssx_dec_linux_creds(struct xdr_stream *xdr, struct svc_cred *creds) gssx_dec_linux_creds() argument [all...] |
H A D | gss_rpc_upcall.c | 339 data->creds = *(struct svc_cred *)value->data; in gssp_accept_sec_context_upcall() 350 /* convert to GSS_NT_HOSTBASED_SERVICE form and set into creds */ in gssp_accept_sec_context_upcall() 353 data->creds.cr_raw_principal = in gssp_accept_sec_context_upcall() 355 data->creds.cr_principal = in gssp_accept_sec_context_upcall() 357 gssp_hostbased_service(&data->creds.cr_principal); in gssp_accept_sec_context_upcall() 360 data->creds.cr_targ_princ = in gssp_accept_sec_context_upcall() 362 gssp_hostbased_service(&data->creds.cr_targ_princ); in gssp_accept_sec_context_upcall() 376 free_svc_cred(&data->creds); in gssp_free_upcall_data()
|
H A D | gss_rpc_upcall.h | 22 struct svc_cred creds; member
|
/kernel/linux/linux-5.10/drivers/soc/bcm/brcmstb/ |
H A D | biuctrl.c | 116 u32 creds = 0; in mcp_write_pairing_set() local 121 creds = cbc_readl(CPU_CREDIT_REG); in mcp_write_pairing_set() 124 cbc_writel(creds | CPU_CREDIT_REG_MCPx_WR_PAIRING_EN_MASK, in mcp_write_pairing_set() 126 } else if (creds & CPU_CREDIT_REG_MCPx_WR_PAIRING_EN_MASK) { in mcp_write_pairing_set() 128 cbc_writel(creds & ~CPU_CREDIT_REG_MCPx_WR_PAIRING_EN_MASK, in mcp_write_pairing_set()
|
/kernel/linux/linux-6.6/drivers/soc/bcm/brcmstb/ |
H A D | biuctrl.c | 116 u32 creds = 0; in mcp_write_pairing_set() local 121 creds = cbc_readl(CPU_CREDIT_REG); in mcp_write_pairing_set() 124 cbc_writel(creds | CPU_CREDIT_REG_MCPx_WR_PAIRING_EN_MASK, in mcp_write_pairing_set() 126 } else if (creds & CPU_CREDIT_REG_MCPx_WR_PAIRING_EN_MASK) { in mcp_write_pairing_set() 128 cbc_writel(creds & ~CPU_CREDIT_REG_MCPx_WR_PAIRING_EN_MASK, in mcp_write_pairing_set()
|
/kernel/linux/linux-6.6/arch/powerpc/platforms/pseries/ |
H A D | vas-sysfs.c | 36 u16 creds; in update_total_credits_store() local 38 err = kstrtou16(buf, 0, &creds); in update_total_credits_store() 48 err = vas_reconfig_capabilties(caps->win_type, creds); in update_total_credits_store() 53 pr_info("Set QoS total credits %u\n", creds); in update_total_credits_store()
|
H A D | vas.c | 608 pr_err("Window creds(%u) > max allowed window creds(%u)\n", in get_vas_capabilities() 631 static int reconfig_open_windows(struct vas_caps *vcaps, int creds, in reconfig_open_windows() argument 660 if ((vcaps->nr_close_wins > creds) && !migrate) in reconfig_open_windows() 661 mv_ents = vcaps->nr_close_wins - creds; in reconfig_open_windows() 992 pr_err("state(%d): lpar creds: %d HV lpar creds: %d\n", in vas_migration_handler() 994 pr_err("Used creds: %d, Active creds: %d\n", in vas_migration_handler()
|
/kernel/linux/linux-6.6/io_uring/ |
H A D | sqpoll.c | 178 const struct cred *creds = NULL; in __io_sq_thread() local 181 creds = override_creds(ctx->sq_creds); in __io_sq_thread() 198 if (creds) in __io_sq_thread() 199 revert_creds(creds); in __io_sq_thread()
|
H A D | io_uring.c | 396 put_cred(req->creds); in io_clean_op() 451 req->creds = get_current_cred(); in io_prep_async_work() 1839 const struct cred *creds = NULL; in io_issue_sqe() local 1845 if (unlikely((req->flags & REQ_F_CREDS) && req->creds != current_cred())) in io_issue_sqe() 1846 creds = override_creds(req->creds); in io_issue_sqe() 1856 if (creds) in io_issue_sqe() 1857 revert_creds(creds); in io_issue_sqe() 2199 req->creds = xa_load(&ctx->personalities, personality); 2200 if (!req->creds) 3019 const struct cred *creds; io_unregister_personality() local 3158 struct creds *creds; io_ring_ctx_wait_and_kill() local 4120 const struct cred *creds; io_register_personality() local [all...] |
/kernel/linux/linux-6.6/net/bluetooth/ |
H A D | hci_sock.c | 269 struct scm_creds *creds; in hci_sock_copy_creds() local 274 creds = &bt_cb(skb)->creds; in hci_sock_copy_creds() 286 if (creds->pid == pid_vnr(sk->sk_peer_pid)) in hci_sock_copy_creds() 289 memset(creds, 0, sizeof(*creds)); in hci_sock_copy_creds() 291 creds->pid = pid_vnr(sk->sk_peer_pid); in hci_sock_copy_creds() 293 creds->uid = sk->sk_peer_cred->uid; in hci_sock_copy_creds() 294 creds->gid = sk->sk_peer_cred->gid; in hci_sock_copy_creds() 1601 scm.creds in hci_sock_recvmsg() [all...] |
/kernel/linux/linux-5.10/lib/ |
H A D | kobject_uevent.c | 301 parms->creds.uid = GLOBAL_ROOT_UID; in alloc_uevent_skb() 302 parms->creds.gid = GLOBAL_ROOT_GID; in alloc_uevent_skb() 364 parms->creds.uid = root_uid; in uevent_net_broadcast_tagged() 369 parms->creds.gid = root_gid; in uevent_net_broadcast_tagged()
|
/kernel/linux/linux-6.6/lib/ |
H A D | kobject_uevent.c | 301 parms->creds.uid = GLOBAL_ROOT_UID; in alloc_uevent_skb() 302 parms->creds.gid = GLOBAL_ROOT_GID; in alloc_uevent_skb() 364 parms->creds.uid = root_uid; in uevent_net_broadcast_tagged() 369 parms->creds.gid = root_gid; in uevent_net_broadcast_tagged()
|
/kernel/linux/linux-5.10/include/linux/ |
H A D | netlink.h | 24 struct scm_creds creds; /* Skb credentials */ member 34 #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | netlink.h | 26 struct scm_creds creds; /* Skb credentials */ member 36 #define NETLINK_CREDS(skb) (&NETLINK_CB((skb)).creds)
|
/kernel/linux/linux-5.10/arch/powerpc/platforms/powernv/ |
H A D | vas-window.c | 1193 int creds, mode; in poll_window_credits() local 1207 creds = GET_FIELD(VAS_TX_WCRED, val); in poll_window_credits() 1210 creds = GET_FIELD(VAS_LRX_WCRED, val); in poll_window_credits() 1220 if (creds < window->wcreds_max) { in poll_window_credits() 1230 pr_warn_ratelimited("VAS: pid %d stuck. Waiting for credits returned for Window(%d). creds %d, Retries %d\n", in poll_window_credits() 1232 creds, count); in poll_window_credits()
|
/kernel/linux/linux-6.6/arch/powerpc/platforms/powernv/ |
H A D | vas-window.c | 1158 int creds, mode; in poll_window_credits() local 1172 creds = GET_FIELD(VAS_TX_WCRED, val); in poll_window_credits() 1175 creds = GET_FIELD(VAS_LRX_WCRED, val); in poll_window_credits() 1185 if (creds < window->vas_win.wcreds_max) { in poll_window_credits() 1195 pr_warn_ratelimited("VAS: pid %d stuck. Waiting for credits returned for Window(%d). creds %d, Retries %d\n", in poll_window_credits() 1198 creds, count); in poll_window_credits()
|
/kernel/linux/linux-5.10/io_uring/ |
H A D | io_uring.c | 795 /* has creds assigned */ 888 const struct cred *creds; member 1439 req->creds = get_current_cred(); in io_prep_async_work() 6740 put_cred(req->creds); in io_clean_op() 6748 const struct cred *creds = NULL; in io_issue_sqe() local 6751 if ((req->flags & REQ_F_CREDS) && req->creds != current_cred()) in io_issue_sqe() 6752 creds = override_creds(req->creds); in io_issue_sqe() 6860 if (creds) in io_issue_sqe() 6861 revert_creds(creds); in io_issue_sqe() 7460 const struct cred *creds = NULL; __io_sq_thread() local 9458 const struct cred *creds; io_unregister_personality() local 9610 struct creds *creds; io_ring_ctx_wait_and_kill() local 10567 const struct cred *creds; io_register_personality() local [all...] |
/kernel/linux/linux-5.10/fs/ |
H A D | aio.c | 178 struct cred *creds; member 1604 const struct cred *old_cred = override_creds(iocb->fsync.creds); in aio_fsync_work() 1608 put_cred(iocb->fsync.creds); in aio_fsync_work() 1622 req->creds = prepare_creds(); in aio_fsync() 1623 if (!req->creds) in aio_fsync()
|