Lines Matching defs:argv

302 static const char __user *get_user_arg_ptr(struct user_arg_ptr argv, int nr)
307 if (unlikely(argv.is_compat)) {
310 if (get_user(compat, argv.ptr.compat + nr))
317 if (get_user(native, argv.ptr.native + nr))
326 static int count(struct user_arg_ptr argv, int max)
330 if (argv.ptr.native != NULL) {
332 const char __user *p = get_user_arg_ptr(argv, i);
352 static int count_strings_kernel(const char *const *argv)
356 if (!argv)
359 for (i = 0; argv[i]; ++i) {
404 * (whichever is smaller) for the argv+env strings.
421 * We must account for the size of all the argv and envp pointers to
422 * the argv and envp strings, since they will also take up space in
429 * userspace programs don't start processing from argv[1], thinking
448 static int copy_strings(int argc, struct user_arg_ptr argv,
462 str = get_user_arg_ptr(argv, argc);
578 static int copy_strings_kernel(int argc, const char *const *argv,
582 int ret = copy_string_kernel(argv[argc], bprm);
1785 struct user_arg_ptr argv,
1817 retval = count(argv, MAX_ARG_STRINGS);
1840 retval = copy_strings(bprm->argc, argv, bprm);
1845 * When argv is empty, add an empty string ("") as argv[0] to
1847 * from argv[1] won't end up walking envp. See also
1856 pr_warn_once("process '%s' launched '%s' with NULL argv: empty string added\n",
1870 const char *const *argv, const char *const *envp)
1891 retval = count_strings_kernel(argv);
1916 retval = copy_strings_kernel(bprm->argc, argv, bprm);
1932 struct user_arg_ptr argv = { .ptr.native = __argv };
1934 return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
1942 struct user_arg_ptr argv = { .ptr.native = __argv };
1945 return do_execveat_common(fd, filename, argv, envp, flags);
1953 struct user_arg_ptr argv = {
1961 return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
1969 struct user_arg_ptr argv = {
1977 return do_execveat_common(fd, filename, argv, envp, flags);
2007 const char __user *const __user *, argv,
2010 return do_execve(getname(filename), argv, envp);
2015 const char __user *const __user *, argv,
2021 argv, envp, flags);
2026 const compat_uptr_t __user *, argv,
2029 return compat_do_execve(getname(filename), argv, envp);
2034 const compat_uptr_t __user *, argv,
2040 argv, envp, flags);