Jan Kiszka wrote:
 > Gilles Chanteperdrix wrote:
 > > This patch makes RTDM service rtdm_context_get check the owner of a file
 > > descriptor. This will prevent a process to close an RTDM file descriptor
 > > belonging to another process.
 > I assume this is a safety belt against crazy applications, right?

Not that much crazy: there is no way for an application to know if some
file descriptors were passed to it accross exec, so the only way to be
sure to avoid leaks is to forcibly close all file descriptors. When such
an application was compiled for Xenomai, it suddenly closed all file
descriptors in the system.

 > Hope one day we can solve this via process-local FD name spaces.

I am thinking about this FD rework, we should start writing our
requirements in the wiki.

 > I'm OK with this if you keep the API of rtdm_context_get as is and add
 > an internal checked service __rtdm_context_get(user_info, fd) instead.
 > rtdm_context_get would then call __rtdm_context_get(NULL, fd) because it
 > is supposed to operate on kernel file descriptors only.

Ok, will do that.


                                            Gilles Chanteperdrix.

Xenomai-core mailing list

Reply via email to