Can somebody explain what is actually defined in the following code, as well as what is const at the end? Is a variable named __user
and a pointer __argv
of type __user
created?
const char __user *const __user *__argv
I am familiar with the possibilities of placing const
(make pointer/data unmodifiable), but I've never thought of the above possibility.
The snippet is from this function declaration in the kernel:
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 the question had I known about the __user
macro before. Still, it's not exactly a duplicate of this because the actual type of defined variable is not discussed there.