# RE: \[PATCH 9/9\] netfilter: implement xt\_cgroup cgroup2 path match

- From: David Laight \<hidden\>
- Date: 2015-11-23 17:38:03 
- List: netdev
- Page: https://ratatoskr.run/netdev/2015/11/4626675
- Thread: https://ratatoskr.run/netdev/2015/11/4625692/t.md

```text
From: Florian Westphal
> Sent: 21 November 2015 16:56
> > +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?

I've not looked at the use, but could you put 'char path[];'
as the last member an require any allocations to be long enough
to contain the actual path?

	David
```
