Lines Matching refs:ret
131 int ret; member
396 #define ACTION_ONLY(ret) ((s32)((ret) & (SECCOMP_RET_ACTION_FULL))) argument
409 u32 ret = SECCOMP_RET_ALLOW; in seccomp_run_filters() local
428 if (ACTION_ONLY(cur_ret) < ACTION_ONLY(ret)) { in seccomp_run_filters()
429 ret = cur_ret; in seccomp_run_filters()
433 return ret; in seccomp_run_filters()
664 int ret; in seccomp_prepare_filter() local
693 ret = bpf_prog_create_from_user(&sfilter->prog, fprog, in seccomp_prepare_filter()
695 if (ret < 0) { in seccomp_prepare_filter()
697 return ERR_PTR(ret); in seccomp_prepare_filter()
915 int ret; in seccomp_attach_filter() local
917 ret = seccomp_can_sync_threads(); in seccomp_attach_filter()
918 if (ret) { in seccomp_attach_filter()
922 return ret; in seccomp_attach_filter()
1103 addfd->ret = fd; in seccomp_handle_addfd()
1136 long ret = 0; in seccomp_do_user_notification() local
1191 ret = n.val; in seccomp_do_user_notification()
1199 addfd->ret = -ESRCH; in seccomp_do_user_notification()
1224 err, ret); in seccomp_do_user_notification()
1406 long ret = -EINVAL; in seccomp_set_mode_strict() local
1417 ret = 0; in seccomp_set_mode_strict()
1422 return ret; in seccomp_set_mode_strict()
1502 int ret; in recv_wait_event() local
1511 ret = prepare_to_wait_event(&filter->wqh, &wait, TASK_INTERRUPTIBLE); in recv_wait_event()
1518 if (ret) in recv_wait_event()
1519 return ret; in recv_wait_event()
1532 ssize_t ret; in seccomp_notify_recv() local
1535 ret = check_zeroed_user(buf, sizeof(unotif)); in seccomp_notify_recv()
1536 if (ret < 0) in seccomp_notify_recv()
1537 return ret; in seccomp_notify_recv()
1538 if (!ret) in seccomp_notify_recv()
1543 ret = recv_wait_event(filter); in seccomp_notify_recv()
1544 if (ret < 0) in seccomp_notify_recv()
1545 return ret; in seccomp_notify_recv()
1561 ret = -ENOENT; in seccomp_notify_recv()
1571 ret = 0; in seccomp_notify_recv()
1575 if (ret == 0 && copy_to_user(buf, &unotif, sizeof(unotif))) { in seccomp_notify_recv()
1576 ret = -EFAULT; in seccomp_notify_recv()
1597 return ret; in seccomp_notify_recv()
1605 long ret; in seccomp_notify_send() local
1617 ret = mutex_lock_interruptible(&filter->notify_lock); in seccomp_notify_send()
1618 if (ret < 0) in seccomp_notify_send()
1619 return ret; in seccomp_notify_send()
1623 ret = -ENOENT; in seccomp_notify_send()
1629 ret = -EINPROGRESS; in seccomp_notify_send()
1633 ret = 0; in seccomp_notify_send()
1644 return ret; in seccomp_notify_send()
1652 long ret; in seccomp_notify_id_valid() local
1657 ret = mutex_lock_interruptible(&filter->notify_lock); in seccomp_notify_id_valid()
1658 if (ret < 0) in seccomp_notify_id_valid()
1659 return ret; in seccomp_notify_id_valid()
1663 ret = 0; in seccomp_notify_id_valid()
1665 ret = -ENOENT; in seccomp_notify_id_valid()
1668 return ret; in seccomp_notify_id_valid()
1674 long ret; in seccomp_notify_set_flags() local
1679 ret = mutex_lock_interruptible(&filter->notify_lock); in seccomp_notify_set_flags()
1680 if (ret < 0) in seccomp_notify_set_flags()
1681 return ret; in seccomp_notify_set_flags()
1694 int ret; in seccomp_notify_addfd() local
1702 ret = copy_struct_from_user(&addfd, sizeof(addfd), uaddfd, size); in seccomp_notify_addfd()
1703 if (ret) in seccomp_notify_addfd()
1704 return ret; in seccomp_notify_addfd()
1725 ret = mutex_lock_interruptible(&filter->notify_lock); in seccomp_notify_addfd()
1726 if (ret < 0) in seccomp_notify_addfd()
1731 ret = -ENOENT; in seccomp_notify_addfd()
1741 ret = -EINPROGRESS; in seccomp_notify_addfd()
1754 ret = -EBUSY; in seccomp_notify_addfd()
1767 ret = wait_for_completion_interruptible(&kaddfd.completion); in seccomp_notify_addfd()
1768 if (ret == 0) { in seccomp_notify_addfd()
1776 ret = kaddfd.ret; in seccomp_notify_addfd()
1789 ret = kaddfd.ret; in seccomp_notify_addfd()
1798 return ret; in seccomp_notify_addfd()
1834 __poll_t ret = 0; in seccomp_notify_poll() local
1844 ret |= EPOLLIN | EPOLLRDNORM; in seccomp_notify_poll()
1846 ret |= EPOLLOUT | EPOLLWRNORM; in seccomp_notify_poll()
1847 if ((ret & EPOLLIN) && (ret & EPOLLOUT)) in seccomp_notify_poll()
1854 ret |= EPOLLHUP; in seccomp_notify_poll()
1856 return ret; in seccomp_notify_poll()
1868 struct file *ret; in init_listener() local
1870 ret = ERR_PTR(-ENOMEM); in init_listener()
1878 ret = anon_inode_getfile("seccomp notify", &seccomp_notify_ops, in init_listener()
1880 if (IS_ERR(ret)) in init_listener()
1887 if (IS_ERR(ret)) in init_listener()
1890 return ret; in init_listener()
1936 long ret = -EINVAL; in seccomp_set_mode_filter() local
1972 ret = listener; in seccomp_set_mode_filter()
1979 ret = PTR_ERR(listener_f); in seccomp_set_mode_filter()
1998 ret = -EBUSY; in seccomp_set_mode_filter()
2002 ret = seccomp_attach_filter(flags, prepared); in seccomp_set_mode_filter()
2003 if (ret) in seccomp_set_mode_filter()
2015 if (ret) { in seccomp_set_mode_filter()
2022 ret = listener; in seccomp_set_mode_filter()
2027 return ret; in seccomp_set_mode_filter()
2193 long ret; in seccomp_get_filter() local
2210 ret = -EMEDIUMTYPE; in seccomp_get_filter()
2214 ret = fprog->len; in seccomp_get_filter()
2219 ret = -EFAULT; in seccomp_get_filter()
2223 return ret; in seccomp_get_filter()
2229 long ret; in seccomp_get_metadata() local
2253 ret = size; in seccomp_get_metadata()
2255 ret = -EFAULT; in seccomp_get_metadata()
2258 return ret; in seccomp_get_metadata()
2309 ssize_t ret; in seccomp_names_from_actions_logged() local
2315 ret = strscpy(names, sep, size); in seccomp_names_from_actions_logged()
2316 if (ret < 0) in seccomp_names_from_actions_logged()
2319 names += ret; in seccomp_names_from_actions_logged()
2320 size -= ret; in seccomp_names_from_actions_logged()
2324 ret = strscpy(names, cur->name, size); in seccomp_names_from_actions_logged()
2325 if (ret < 0) in seccomp_names_from_actions_logged()
2328 names += ret; in seccomp_names_from_actions_logged()
2329 size -= ret; in seccomp_names_from_actions_logged()
2390 int ret; in write_actions_logged() local
2400 ret = proc_dostring(&table, 1, buffer, lenp, ppos); in write_actions_logged()
2401 if (ret) in write_actions_logged()
2402 return ret; in write_actions_logged()
2415 int ret) in audit_actions_logged() argument
2428 if (ret) in audit_actions_logged()
2443 return audit_seccomp_actions_logged(new, old, !ret); in audit_actions_logged()
2450 int ret; in seccomp_actions_logged_handler() local
2456 ret = write_actions_logged(ro_table, buffer, lenp, ppos, in seccomp_actions_logged_handler()
2458 audit_actions_logged(actions_logged, old_actions_logged, ret); in seccomp_actions_logged_handler()
2460 ret = read_actions_logged(ro_table, buffer, lenp, ppos); in seccomp_actions_logged_handler()
2462 return ret; in seccomp_actions_logged_handler()