From: Eric Paris <eparis@redhat.com>
To: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Richard Guy Briggs <rgb@redhat.com>,
linux-audit@redhat.com, Steve Grubb <sgrubb@redhat.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [PATCH] audit: listen in all network namespaces
Date: Thu, 19 Dec 2013 13:40:22 -0500 [thread overview]
Message-ID: <1387478422.29366.33.camel@flatline.rdu.redhat.com> (raw)
In-Reply-To: <52B26F1A.9070308@cn.fujitsu.com>
On Thu, 2013-12-19 at 11:59 +0800, Gao feng wrote:
> On 07/17/2013 04:32 AM, Richard Guy Briggs wrote:
> > Convert audit from only listening in init_net to use register_pernet_subsys()
> > to dynamically manage the netlink socket list.
> >
> > Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> > ---
>
> I think it's the time for us to discuss if we should revert this
> commit, since this one prevent me from continuing to achieve
> audit namespace.
>
>
> The major problem is in kaudit_send_skb, we have no idea which
> audit sock the skb should send to.
right, we have problems here no matter what...
If we stick with the current approach you will need to know socket +
portid. With your approach one only needs to know portid. Since these
are can both be part of the audit_ns structure I don't see a huge
difference...
> we have to store audit_sock
> into auditns(auditns will be passed to kauditd_send_skb),
> this will cause auditns have to get a reference of netns.
> and for some reason(netfilter audit target), netns will
> get reference of auditns too. this is terrible...
I'm not sure I agree/understand this entirely...
> So why not we revert this one, and use a very simple one to
> replace it? the below patch will save us from the refer to
> each other case, achieve the same effect.
>
> what's your opinion?
Help me go all the way back to the beginning. What's our end goal here
again?
When thinking about this I realized we have another problem that I don't
think we've considered. Which makes me lean away from the single
socket/kauditd :(
I we have one socket and one kauditd ANY auditd can completely freeze
the audit system. Which seems problematic, especially if there isn't
equal levels of trust between the different namespaces... If one auditd
gets hung (intentionally or not) the kernel will never send another
audit message....
Makes me think we really need a kauditd thread per namespace, possibly
an skb queue per namespace. At which point an audit socket per
namespace makes a lot of sense too....
next prev parent reply other threads:[~2013-12-19 18:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1374006760-7687-1-git-send-email-rgb@redhat.com>
2013-12-19 3:59 ` [PATCH] audit: listen in all network namespaces Gao feng
2013-12-19 18:40 ` Eric Paris [this message]
2013-12-20 1:35 ` Gao feng
2013-12-20 2:46 ` Gao feng
2013-12-20 3:11 ` Eric Paris
2013-12-20 3:45 ` Gao feng
2013-07-16 20:15 Richard Guy Briggs
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=1387478422.29366.33.camel@flatline.rdu.redhat.com \
--to=eparis@redhat.com \
--cc=containers@lists.linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=gaofeng@cn.fujitsu.com \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rgb@redhat.com \
--cc=serge@hallyn.com \
--cc=sgrubb@redhat.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