I'm trying to develop a new syscall for the linux kernel. This syscall will write info on the user buffer that is taken as argument, e.g.:
asmlinkage int new_syscall(..., char *buffer,...){...}
In user space this buffer is statically allocated as:
char buffer[10000];
There's a way (as sizeof() in the user level) to know the whole buffer size (10000 in this case)?
I have tried strlen_user(buffer)
but it returns me the length of the string that is currently into the buffer, so if the buffer is empty it returns 0.
char *buffer
aschar __user *buffer
and usecopy_From_user
– Fred