Sorry,

I don't understand. But how do I use this function to get the name of
the application?

 Because I want to log which application is calling which system call.

Regards,
Perumal

On Feb 25, 11:27 pm, Peter Teoh <[email protected]> wrote:
> yes.....your answer is "strace" for userspace.....but if inside the
> kernel, and u want to identify the name of the process...it is "comm":
>
> http://lxr.free-electrons.com/source/kernel/cred.c
>
>  21 #if 0
>  22 #define kdebug(FMT, ...) \
>  23         printk("[%-5.5s%5u] "FMT"\n", current->comm, current->pid 
> ,##__VA_ARGS__)
>
>  24 #else
>
> On Feb 25, 10:42 am,perumal316<[email protected]> wrote:
>
> > Hi,
>
> > I am writing an kernel module to log a message each time a particular
> > system call is being done.
>
> > Is there any way for me to identify which application is using the
> > system call?
>
> > I want to log which application is performing which system call.I not
> > sure if there is some kind of ID to identify which is the current
> > application calling the system call.
>
> > Thanks In Advance,
> > Perumal

Reply via email to