Lines Matching defs:argv
406 static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
411 if (unlikely(argv.is_compat)) {
414 if (get_user(compat, argv.ptr.compat + nr))
421 if (get_user(native, argv.ptr.native + nr))
430 static int count(struct user_arg_ptr argv, int max)
434 if (argv.ptr.native != NULL) {
436 const char __user *p = get_user_arg_ptr(argv, i);
456 static int count_strings_kernel(const char *const *argv)
460 if (!argv)
463 for (i = 0; argv[i]; ++i) {
479 * (whichever is smaller) for the argv+env strings.
493 * We must account for the size of all the argv and envp pointers to
494 * the argv and envp strings, since they will also take up space in
501 * userspace programs don't start processing from argv[1], thinking
519 static int copy_strings(int argc, struct user_arg_ptr argv,
533 str = get_user_arg_ptr(argv, argc);
655 static int copy_strings_kernel(int argc, const char *const *argv,
659 int ret = copy_string_kernel(argv[argc], bprm);
1876 struct user_arg_ptr argv,
1908 retval = count(argv, MAX_ARG_STRINGS);
1910 pr_warn_once("process '%s' launched '%s' with NULL argv: empty string added\n",
1934 retval = copy_strings(bprm->argc, argv, bprm);
1939 * When argv is empty, add an empty string ("") as argv[0] to
1941 * from argv[1] won't end up walking envp. See also
1961 const char *const *argv, const char *const *envp)
1978 retval = count_strings_kernel(argv);
2003 retval = copy_strings_kernel(bprm->argc, argv, bprm);
2019 struct user_arg_ptr argv = { .ptr.native = __argv };
2021 return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
2029 struct user_arg_ptr argv = { .ptr.native = __argv };
2032 return do_execveat_common(fd, filename, argv, envp, flags);
2040 struct user_arg_ptr argv = {
2048 return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
2056 struct user_arg_ptr argv = {
2064 return do_execveat_common(fd, filename, argv, envp, flags);
2094 const char __user *const __user *, argv,
2097 return do_execve(getname(filename), argv, envp);
2102 const char __user *const __user *, argv,
2110 argv, envp, flags);
2115 const compat_uptr_t __user *, argv,
2118 return compat_do_execve(getname(filename), argv, envp);
2123 const compat_uptr_t __user *, argv,
2131 argv, envp, flags);