2010-08-30 16:45:56

by Pavan Savoy

[permalink] [raw]
Subject: usage of kill_pid and family

Hi,

I use kill_pid in one of our drivers to signal a user-space daemon to
perform a particular action (open-UART for instance), I recently ran
into problems with permissions as to when a user with stranger UID
started open up a device, which internally calls the kill_pid in that
context, could not send the signal and returned with "permission
denied".

I started using kill_pid_info_as_uid and sent signals as UID 0 to
solve the problem, it did solve the problem, but is this the right
approach?

Also why is not suggested to use kill_pid and family to communicate
with user-space? (namespace issues??- what do they mean?)

Note:
I get the PID of the process which receives signal from one of the
sysfs entries created by driver, but filled up by the daemon...