[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429138561.7346.158.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 15 Apr 2015 15:56:01 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Andy Lutomirski <luto@...capital.net>,
One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Richard Weinberger <richard.weinberger@...il.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>, Tom Gundersen <teg@...m.no>,
Jiri Kosina <jkosina@...e.cz>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Daniel Mack <daniel@...que.org>,
David Herrmann <dh.herrmann@...il.com>,
Djalal Harouni <tixxdz@...ndz.org>
Subject: Re: [GIT PULL] kdbus for 4.1-rc1
On Wed, 2015-04-15 at 23:48 +0100, Al Viro wrote:
> On Wed, Apr 15, 2015 at 03:28:58PM -0700, Andy Lutomirski wrote:
> > On Wed, Apr 15, 2015 at 3:18 PM, Al Viro <viro@...iv.linux.org.uk> wrote:
> > > On Wed, Apr 15, 2015 at 03:11:17PM -0700, Andy Lutomirski wrote:
> > >
> > >> This is functionally identical to passing AF_UNIX socket fds over
> > >> SCM_RIGHTS, but I want something much lighter weight.
> > >
> > > Most of the weight in SCM_RIGHTS comes from the fact that you can
> > > pass AF_UNIX sockets over it, which requires a garbage collector.
> > > Exclude that and suddenly it becomes very cheap...
> >
> > I should have been more specific. I don't mean the performance of
> > SCM_RIGHTS itself; I mean the memory overhead of keeping tons of fds
> > around, each with their socket data structures and buffers.
> >
> > I think that dbus could be quite efficiently implemented with a
> > userspace daemon that just introduces peers to each other, but the fd
> > explosion could be rather bad for some use cases.
> >
> > I'll be the first to admit that I don't have a clean API in mind.
> > There was a lightweight fd proposal way back when, but it never went
> > anywhere, and it might not be suitable anyway.
>
> Wait, are you talking about the overhead of descriptors used for capability
> tokens (essentially zero - one system-wide struct file per capability +
> one pointer in descriptor table of anyone who holds it + two bits in
> bitmaps in the sam descriptor tables) or about the overhead of descriptors
> used to send/receive those over? The latter don't have to be sockets
> at all - they could bloody well be files on some ipcfs, or character device,
> or FIFOs, etc.
This kind of remind me futex : From an apparent simple idea we got to
the point of having more than 3000 lines of code in kernel/futex.c
It is sad that af_unix was chosen to support fd passing in the first
place. This is serious DOS vector.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists