Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ian Molton <ian.molton@collabora.co.uk>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	davem@davemloft.net, ebiederm@xmission.com, xemul@openvz.org,
	davidel@xmailserver.org,
	Alban Crequy <alban.crequy@collabora.co.uk>
Subject: Re: [PATCH] af_unix: implement socket filter
Date: Tue, 18 Jan 2011 18:22:41 +0100	[thread overview]
Message-ID: <1295371361.3290.15.camel@edumazet-laptop> (raw)
In-Reply-To: <1295368755-20931-1-git-send-email-ian.molton@collabora.co.uk>

Le mardi 18 janvier 2011 à 16:39 +0000, Ian Molton a écrit :
> From: Alban Crequy <alban.crequy@collabora.co.uk>
> 
> Linux Socket Filters can already be successfully attached and detached on unix
> sockets with setsockopt(sockfd, SOL_SOCKET, SO_{ATTACH,DETACH}_FILTER, ...).
> See: Documentation/networking/filter.txt
> 
> But the filter was never used in the unix socket code so it did not work. This
> patch uses sk_filter() to filter buffers before delivery.
> 
> This short program demonstrates the problem on SOCK_DGRAM.


Any idea on performance cost adding sk_filter() call ?

Hmm, looking at it, I have no idea why sk_filter() needs to block BH.

I'll send a patch to relax this requirement.

  reply	other threads:[~2011-01-18 17:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 16:39 [PATCH] af_unix: implement socket filter Ian Molton
2011-01-18 17:22 ` Eric Dumazet [this message]
2011-01-18 17:46   ` [PATCH] net: filter: dont block softirqs in sk_run_filter() Eric Dumazet
2011-01-19  5:33     ` David Miller
2011-01-18 17:51   ` [PATCH] af_unix: implement socket filter Alban Crequy
2011-01-18 20:19     ` Eric Dumazet
2011-01-19  5:33 ` David Miller

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=1295371361.3290.15.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=alban.crequy@collabora.co.uk \
    --cc=davem@davemloft.net \
    --cc=davidel@xmailserver.org \
    --cc=ebiederm@xmission.com \
    --cc=ian.molton@collabora.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox