[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151121170425.GD3428@htj.duckdns.org>
Date: Sat, 21 Nov 2015 12:04:25 -0500
From: Tejun Heo <tj@...nel.org>
To: Florian Westphal <fw@...len.de>
Cc: davem@...emloft.net, pablo@...filter.org, kaber@...sh.net,
kadlec@...ckhole.kfki.hu, daniel@...earbox.net,
daniel.wagner@...-carit.de, nhorman@...driver.co,
lizefan@...wei.com, hannes@...xchg.org, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com, ninasc@...com,
Neil Horman <nhorman@...driver.com>,
Jan Engelhardt <jengelh@...i.de>
Subject: Re: [PATCH 9/9] netfilter: implement xt_cgroup cgroup2 path match
Hello,
On Sat, Nov 21, 2015 at 05:56:06PM +0100, Florian Westphal wrote:
> > +struct xt_cgroup_info_v1 {
> > + __u8 has_path;
> > + __u8 has_classid;
> > + __u8 invert_path;
> > + __u8 invert_classid;
> > + char path[PATH_MAX];
> > + __u32 classid;
> > +
> > + /* kernel internal data */
> > + void *priv __attribute__((aligned(8)));
> > +};
>
> Ahem. Am I reading this right? This struct is > 4k in size?
> If so -- Ugh. Does sizeof(path) really have to be PATH_MAX?
Hmmm... yeap but would this be an acutual problem? We can try to make
it shorter but idk it ultimately is a path. Another solution would be
trying to pass inode around but that is problematic with showing and
printing rules as the only way to reverse-map inode to path is walking
the tree and the cgroup may already be gone at that point. While >4k
struct isn't pretty, this looks like the path of least resistance.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists