Twisted use of * const * after variable name in Linux kernel
Can someone please explain what is actually defined in the following code and also what const is at the end? Is a variable named __user
and __argv
type pointer __user
?
const char __user *const __user *__argv
I am familiar with the placement possibilities const
(making the pointer / data non-indexable), but I never thought about this possibility.
Snippet from this function declaration in the core:
1593 int do_execve(const char *filename,
1594 const char __user *const __user *__argv,
1595 const char __user *const __user *__envp,
1596 struct pt_regs *regs)
EDIT: I probably wouldn't have asked if I knew about a macro earlier __user
. However, this is not exactly a duplicate of this , because the actual type of a particular variable is not discussed there.
source to share