From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: "Luis R. Rodriguez" <mcgrof@studorgs.rutgers.edu>
Cc: Andrew Morton <akpm@osdl.org>,
netdev@oss.sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [1/1] connector: Kernel connector - userspace <-> kernelspace "linker".
Date: Fri, 24 Sep 2004 10:30:04 +0400 [thread overview]
Message-ID: <1096007404.17587.49.camel@uganda> (raw)
In-Reply-To: <1096006470.17587.37.camel@uganda>
[-- Attachment #1: Type: text/plain, Size: 3417 bytes --]
On Fri, 2004-09-24 at 10:14, Evgeniy Polyakov wrote:
> On Fri, 2004-09-24 at 09:48, Luis R. Rodriguez wrote:
> > On Fri, Sep 24, 2004 at 07:40:32AM +0400, Evgeniy Polyakov wrote:
> > > On Fri, 2004-09-24 at 01:54, Luis R. Rodriguez wrote:
> > > > RFC:
> > > >
> > > > Can and should we work towards using this as interface for drivers that
> > > > need callbacks from an external (closed source) library/HAL?
> > >
> > > As I mentioned to Richard Jonson, it can be considered as
> > > ioctl. ioctl-ng!
> > > Unified interface (as ioctl) can be used for any type of modules.
> > > It is just a bit extended ioctl :)
> > >
> > > And _yes_, it can be used to turn on/off binary-only callbacks.
> > > Remember pwc - closed part can register callback and open part can
> > > send message, or even closed part can register notification when
> > > open part registers itself and begin to "trash the kernel".
> > >
> > > I understand that it is not right way to include it is into the kernel,
> > > but I personally do not understand how it is different
> > > from just extended ioctl. It was designed to be usefull and convenient,
> > > and it is.
> > >
> > > BTW, any binary-only module can _itself_ create netlink socket
> > > with input callback. And that is all - it will be absolutely
> > > the same as above.
> > >
> > > One may consider connector as yet-another-netlink-helper.
> > >
> >
> > Eh. I'm just wondering if there's any *right* way of using binary
> > callbacks on a linux driver so that it doesn't *taint* and possibly
> > *trash it*, as you said. I was wondering if perhaps through the
> > connector we could somehow protect the kernel of possibly ill-behaved callbacks.
> >
> > Comments?
>
> Yes, we can.
> Connector itself has quite enough information about it's registrants.
>
> For example if it is somehow not good module( for example without GPL in
> it's license string) then connector can be extended to call it's
> callback from thread or in jail. If it is of interest I will think of
> some plugable mechanism for callback environment( probably provide
> ->before_callback() and ->after_callback() methods from external policy
> provider which may check callback data and/or confine callback execution
> ? ).
>
> We also may confine closed modules from being able to use event
> notification. In this scenario with worned out pwc-closed/open,
> situation will not differ from what we have now.
BTW, it can also restrict userspace event notification in following way:
when someone sends a message to notify group A of
registering/unregistering of device with id {x,y} then connector can
check if this group A is registered through callback_register_gpl(it is
not exist for now, but can be created as a copy of callback_register() )
or not. If it is GPL - send notify, else - execute
"mail -s "shit happens" linux-kernel@vger.kernel.org"
in the way /sbin/hotplug is called.
BTW, this decision also can be obtained from external policy module.
As you may think connector in current implementation is quite powerful
interface( if I will not praise it, who will? :) ), and somebody can
make bad things a bit easier with it, but it is also very flexible and
can be tuned to suit your needs.
I'm open for discussion :)
> > Luis
--
Evgeniy Polyakov
Crash is better than data corruption. -- Art Grabowski
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-09-24 6:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-16 10:51 Kernel connector - userspace <-> kernelspace "linker" Evgeniy Polyakov
2004-09-16 12:09 ` jamal
2004-09-20 8:01 ` Evgeniy Polyakov
2004-09-21 12:46 ` Evgeniy Polyakov
2004-09-21 12:22 ` Alan Cox
2004-09-21 14:21 ` Buddy Lucas
2004-09-21 14:28 ` Evgeniy Polyakov
2004-09-21 12:54 ` Richard B. Johnson
2004-09-21 14:23 ` Evgeniy Polyakov
2004-09-23 20:07 ` [1/1] connector: " Evgeniy Polyakov
2004-09-23 21:54 ` Luis R. Rodriguez
2004-09-24 3:40 ` Evgeniy Polyakov
2004-09-24 5:48 ` Luis R. Rodriguez
2004-09-24 6:14 ` Evgeniy Polyakov
2004-09-24 6:30 ` Evgeniy Polyakov [this message]
2004-09-24 6:32 ` Luis R. Rodriguez
2004-09-24 6:52 ` Luis R. Rodriguez
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=1096007404.17587.49.camel@uganda \
--to=johnpol@2ka.mipt.ru \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@studorgs.rutgers.edu \
--cc=netdev@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).