[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 2 Feb 2016 21:39:29 +0100
From: Willy Tarreau <w@....eu>
To: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
David Herrmann <dh.herrmann@...il.com>,
"David S. Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
???????? ?????????????????? <socketpair@...il.com>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Simon McVittie <simon.mcvittie@...labora.co.uk>
Subject: Re: [PATCH v2] unix: properly account for FDs passed over unix sockets
On Tue, Feb 02, 2016 at 09:32:56PM +0100, Hannes Frederic Sowa wrote:
> But "struct pid *" in unix_skb_parms should be enough to get us to
> corresponding "struct cred *" so we can decrement the correct counter
> during skb destruction.
>
> So:
>
> We increment current task's unix_inflight and also check the current
> task's limit during attaching fds to skbs and decrement the inflight
> counter via "struct pid *". This looks like it should work.
I like it as well, the principle sounds sane.
> >That way it's always the person who actually does the send (rather
> >than the opener of the socket _or_ the opener of the file that gets
> >passed around) that gets credited, and thanks to the cred pointer we
> >can then de-credit them properly.
>
> Exactly, I try to implement that. Thanks a lot!
Thanks to you Hannes, I appreciate that you work on it, it would take
much more time to me to dig into this.
Willy
Powered by blists - more mailing lists