Re: [PATCH 9/9] netfilter: implement xt_cgroup cgroup2 path match

From
Florian Westphal <fw@strlen.de>
Date
2015-11-21 18:54:47
Also in
cgroups, lkml, netfilter-devel
Reply to
Tejun Heo, 2015-11-21
Tejun Heo [off-list ref] wrote:
On Sat, Nov 21, 2015 at 05:56:06PM +0100, Florian Westphal wrote:
quoted
quoted
+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?
Since rule blob can be allocated via vmalloc i guess "no", its not
really a problem unless someone needs realy insane amount of such rules.

I don't have any better suggestion, so I guess its necessary evil.

The only other question I have is wheter PATH_MAX might be a possible
ABI breaker in future.  It would have to be guaranteed that this is the
same size forever, else you'd get strange errors on rule insertion if
the sizes of the kernel and userspace version differs.
Thread (37 messages) 37 messages, 8 authors, last reply 2015-11-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help