• Home
  • Raw
  • Download

Lines Matching refs:ret

126 	int ret;  member
393 #define ACTION_ONLY(ret) ((s32)((ret) & (SECCOMP_RET_ACTION_FULL))) argument
397 u32 ret = SECCOMP_RET_ALLOW; in seccomp_run_filters() local
416 if (ACTION_ONLY(cur_ret) < ACTION_ONLY(ret)) { in seccomp_run_filters()
417 ret = cur_ret; in seccomp_run_filters()
421 return ret; in seccomp_run_filters()
632 int ret; in seccomp_prepare_filter() local
661 ret = bpf_prog_create_from_user(&sfilter->prog, fprog, in seccomp_prepare_filter()
663 if (ret < 0) { in seccomp_prepare_filter()
665 return ERR_PTR(ret); in seccomp_prepare_filter()
874 int ret; in seccomp_attach_filter() local
876 ret = seccomp_can_sync_threads(); in seccomp_attach_filter()
877 if (ret) { in seccomp_attach_filter()
881 return ret; in seccomp_attach_filter()
1073 addfd->ret = receive_fd_replace(addfd->fd, addfd->file, addfd->flags); in seccomp_handle_addfd()
1083 long ret = 0; in seccomp_do_user_notification() local
1121 ret = n.val; in seccomp_do_user_notification()
1129 addfd->ret = -ESRCH; in seccomp_do_user_notification()
1154 err, ret); in seccomp_do_user_notification()
1340 long ret = -EINVAL; in seccomp_set_mode_strict() local
1351 ret = 0; in seccomp_set_mode_strict()
1356 return ret; in seccomp_set_mode_strict()
1430 ssize_t ret; in seccomp_notify_recv() local
1433 ret = check_zeroed_user(buf, sizeof(unotif)); in seccomp_notify_recv()
1434 if (ret < 0) in seccomp_notify_recv()
1435 return ret; in seccomp_notify_recv()
1436 if (!ret) in seccomp_notify_recv()
1441 ret = down_interruptible(&filter->notif->request); in seccomp_notify_recv()
1442 if (ret < 0) in seccomp_notify_recv()
1443 return ret; in seccomp_notify_recv()
1459 ret = -ENOENT; in seccomp_notify_recv()
1469 ret = 0; in seccomp_notify_recv()
1473 if (ret == 0 && copy_to_user(buf, &unotif, sizeof(unotif))) { in seccomp_notify_recv()
1474 ret = -EFAULT; in seccomp_notify_recv()
1491 return ret; in seccomp_notify_recv()
1499 long ret; in seccomp_notify_send() local
1511 ret = mutex_lock_interruptible(&filter->notify_lock); in seccomp_notify_send()
1512 if (ret < 0) in seccomp_notify_send()
1513 return ret; in seccomp_notify_send()
1517 ret = -ENOENT; in seccomp_notify_send()
1523 ret = -EINPROGRESS; in seccomp_notify_send()
1527 ret = 0; in seccomp_notify_send()
1535 return ret; in seccomp_notify_send()
1543 long ret; in seccomp_notify_id_valid() local
1548 ret = mutex_lock_interruptible(&filter->notify_lock); in seccomp_notify_id_valid()
1549 if (ret < 0) in seccomp_notify_id_valid()
1550 return ret; in seccomp_notify_id_valid()
1554 ret = 0; in seccomp_notify_id_valid()
1556 ret = -ENOENT; in seccomp_notify_id_valid()
1559 return ret; in seccomp_notify_id_valid()
1569 int ret; in seccomp_notify_addfd() local
1577 ret = copy_struct_from_user(&addfd, sizeof(addfd), uaddfd, size); in seccomp_notify_addfd()
1578 if (ret) in seccomp_notify_addfd()
1579 return ret; in seccomp_notify_addfd()
1599 ret = mutex_lock_interruptible(&filter->notify_lock); in seccomp_notify_addfd()
1600 if (ret < 0) in seccomp_notify_addfd()
1605 ret = -ENOENT; in seccomp_notify_addfd()
1615 ret = -EINPROGRESS; in seccomp_notify_addfd()
1624 ret = wait_for_completion_interruptible(&kaddfd.completion); in seccomp_notify_addfd()
1625 if (ret == 0) { in seccomp_notify_addfd()
1633 ret = kaddfd.ret; in seccomp_notify_addfd()
1646 ret = kaddfd.ret; in seccomp_notify_addfd()
1655 return ret; in seccomp_notify_addfd()
1689 __poll_t ret = 0; in seccomp_notify_poll() local
1699 ret |= EPOLLIN | EPOLLRDNORM; in seccomp_notify_poll()
1701 ret |= EPOLLOUT | EPOLLWRNORM; in seccomp_notify_poll()
1702 if ((ret & EPOLLIN) && (ret & EPOLLOUT)) in seccomp_notify_poll()
1709 ret |= EPOLLHUP; in seccomp_notify_poll()
1711 return ret; in seccomp_notify_poll()
1723 struct file *ret; in init_listener() local
1725 ret = ERR_PTR(-ENOMEM); in init_listener()
1734 ret = anon_inode_getfile("seccomp notify", &seccomp_notify_ops, in init_listener()
1736 if (IS_ERR(ret)) in init_listener()
1743 if (IS_ERR(ret)) in init_listener()
1746 return ret; in init_listener()
1792 long ret = -EINVAL; in seccomp_set_mode_filter() local
1820 ret = listener; in seccomp_set_mode_filter()
1827 ret = PTR_ERR(listener_f); in seccomp_set_mode_filter()
1846 ret = -EBUSY; in seccomp_set_mode_filter()
1850 ret = seccomp_attach_filter(flags, prepared); in seccomp_set_mode_filter()
1851 if (ret) in seccomp_set_mode_filter()
1863 if (ret) { in seccomp_set_mode_filter()
1870 ret = listener; in seccomp_set_mode_filter()
1875 return ret; in seccomp_set_mode_filter()
2041 long ret; in seccomp_get_filter() local
2058 ret = -EMEDIUMTYPE; in seccomp_get_filter()
2062 ret = fprog->len; in seccomp_get_filter()
2067 ret = -EFAULT; in seccomp_get_filter()
2071 return ret; in seccomp_get_filter()
2077 long ret; in seccomp_get_metadata() local
2101 ret = size; in seccomp_get_metadata()
2103 ret = -EFAULT; in seccomp_get_metadata()
2106 return ret; in seccomp_get_metadata()
2157 ssize_t ret; in seccomp_names_from_actions_logged() local
2163 ret = strscpy(names, sep, size); in seccomp_names_from_actions_logged()
2164 if (ret < 0) in seccomp_names_from_actions_logged()
2167 names += ret; in seccomp_names_from_actions_logged()
2168 size -= ret; in seccomp_names_from_actions_logged()
2172 ret = strscpy(names, cur->name, size); in seccomp_names_from_actions_logged()
2173 if (ret < 0) in seccomp_names_from_actions_logged()
2176 names += ret; in seccomp_names_from_actions_logged()
2177 size -= ret; in seccomp_names_from_actions_logged()
2238 int ret; in write_actions_logged() local
2248 ret = proc_dostring(&table, 1, buffer, lenp, ppos); in write_actions_logged()
2249 if (ret) in write_actions_logged()
2250 return ret; in write_actions_logged()
2263 int ret) in audit_actions_logged() argument
2276 if (ret) in audit_actions_logged()
2291 return audit_seccomp_actions_logged(new, old, !ret); in audit_actions_logged()
2298 int ret; in seccomp_actions_logged_handler() local
2304 ret = write_actions_logged(ro_table, buffer, lenp, ppos, in seccomp_actions_logged_handler()
2306 audit_actions_logged(actions_logged, old_actions_logged, ret); in seccomp_actions_logged_handler()
2308 ret = read_actions_logged(ro_table, buffer, lenp, ppos); in seccomp_actions_logged_handler()
2310 return ret; in seccomp_actions_logged_handler()