From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH 5/5] RTDM: check file descriptor owner.
Date: Mon, 4 Feb 2008 07:40:09 +0100 [thread overview]
Message-ID: <18342.45897.264004.820537@domain.hid> (raw)
In-Reply-To: <47A63DA8.4020609@domain.hid>
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.
next prev parent reply other threads:[~2008-02-04 6:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-02 14:11 [Xenomai-core] [PATCH 0/5] Support for select v2 Gilles Chanteperdrix
2008-02-02 14:12 ` [Xenomai-core] [PATCH 1/5] select-like services support to xenomai core Gilles Chanteperdrix
2008-02-02 14:18 ` [Xenomai-core] [PATCH 5/5] RTDM: check file descriptor owner Gilles Chanteperdrix
2008-02-03 22:18 ` Jan Kiszka
2008-02-04 6:40 ` Gilles Chanteperdrix [this message]
2008-02-02 14:14 ` [Xenomai-core] [PATCH 2/5] select-like services support to rtdm Gilles Chanteperdrix
2008-02-02 14:15 ` [Xenomai-core] [PATCH 3/5] posix skin kernel-space support for user-space select Gilles Chanteperdrix
2008-02-02 14:16 ` [Xenomai-core] [PATCH 4/5] posix skin user-space support for select Gilles Chanteperdrix
2008-02-02 14:29 ` [Xenomai-core] [PATCH 0/5] Support for select v2 Jan Kiszka
2008-02-02 14:36 ` Gilles Chanteperdrix
2008-02-02 15:12 ` Gilles Chanteperdrix
2008-02-03 22:16 ` Jan Kiszka
2008-02-04 6:34 ` Gilles Chanteperdrix
2008-02-09 15:41 ` Gilles Chanteperdrix
2008-02-09 15:58 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18342.45897.264004.820537@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.