Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1275497

Re: [PATCH 7/9] sock, cgroup: add sock->sk_cgroup

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 7/9] sock, cgroup: add sock->sk_cgroup
Date 2015-11-23 16:50 +0100
Message-ID <qy1xn-3M1-5@gated-at.bofh.it> (permalink)
References <qxj3j-7GJ-3@gated-at.bofh.it> <qxj3k-7GJ-23@gated-at.bofh.it> <qxZ2y-29g-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On Mon, Nov 23, 2015 at 02:02:03PM +0100, Daniel Wagner wrote:
> On 11/21/2015 05:13 PM, Tejun Heo wrote:
> > Signed-off-by: Tejun Heo <tj@kernel.org>
> > Cc: Daniel Borkmann <daniel@iogearbox.net>
> > Cc: Daniel Wagner <daniel.wagner@bmw-carit.de>
> 
> I did a quick test and for new connection the cgroup2 match worked as
> expected. For an existing connection I wasn't able to trigger the match.
> 
> It is quite likely I do something wrong:
> 
> 	ssh into the box
> 	# mkdir /sys/fs/cgroup/test
> 	# echo $$ > /sys/fs/cgroup/test/cgroup.procs
> 	# echo $PPID > /sys/fs/cgroup/test/cgroup.procs
> 	# iptables -A OUTPUT -m cgroup --path test
> 
> Should I see matches with the existing ssh session?

Socket is associated with the creating cgroup and stays associated
with that cgroup until it's released.  Migrating the process doesn't
change the ownership of the sockets it has created.  This is in line
with how other stateful resources such as memory are handled in
cgroup2 hierarchy.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 7/9] sock, cgroup: add sock->sk_cgroup Tejun Heo <tj@kernel.org> - 2015-11-21 17:20 +0100
  Re: [PATCH 7/9] sock, cgroup: add sock->sk_cgroup Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-11-23 14:10 +0100
    Re: [PATCH 7/9] sock, cgroup: add sock->sk_cgroup Tejun Heo <tj@kernel.org> - 2015-11-23 16:50 +0100
      Re: [PATCH 7/9] sock, cgroup: add sock->sk_cgroup Daniel Wagner <daniel.wagner@bmw-carit.de> - 2015-11-23 17:00 +0100

csiph-web