Lines Matching refs:argv

411 static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
416 if (unlikely(argv.is_compat)) {
419 if (get_user(compat, argv.ptr.compat + nr))
426 if (get_user(native, argv.ptr.native + nr))
435 static int count(struct user_arg_ptr argv, int max)
439 if (argv.ptr.native != NULL) {
441 const char __user *p = get_user_arg_ptr(argv, i);
461 static int count_strings_kernel(const char *const *argv)
465 if (!argv)
468 for (i = 0; argv[i]; ++i) {
484 * (whichever is smaller) for the argv+env strings.
498 * We must account for the size of all the argv and envp pointers to
499 * the argv and envp strings, since they will also take up space in
506 * userspace programs don't start processing from argv[1], thinking
524 static int copy_strings(int argc, struct user_arg_ptr argv,
538 str = get_user_arg_ptr(argv, argc);
656 static int copy_strings_kernel(int argc, const char *const *argv,
660 int ret = copy_string_kernel(argv[argc], bprm);
1894 struct user_arg_ptr argv,
1926 retval = count(argv, MAX_ARG_STRINGS);
1928 pr_warn_once("process '%s' launched '%s' with NULL argv: empty string added\n",
1952 retval = copy_strings(bprm->argc, argv, bprm);
1957 * When argv is empty, add an empty string ("") as argv[0] to
1959 * from argv[1] won't end up walking envp. See also
1979 const char *const *argv, const char *const *envp)
2000 retval = count_strings_kernel(argv);
2025 retval = copy_strings_kernel(bprm->argc, argv, bprm);
2041 struct user_arg_ptr argv = { .ptr.native = __argv };
2043 return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
2051 struct user_arg_ptr argv = { .ptr.native = __argv };
2054 return do_execveat_common(fd, filename, argv, envp, flags);
2062 struct user_arg_ptr argv = {
2070 return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
2078 struct user_arg_ptr argv = {
2086 return do_execveat_common(fd, filename, argv, envp, flags);
2116 const char __user *const __user *, argv,
2119 return do_execve(getname(filename), argv, envp);
2124 const char __user *const __user *, argv,
2130 argv, envp, flags);
2135 const compat_uptr_t __user *, argv,
2138 return compat_do_execve(getname(filename), argv, envp);
2143 const compat_uptr_t __user *, argv,
2149 argv, envp, flags);