lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.20.1511231853260.25633@nerf40.vanv.qr>
Date:	Mon, 23 Nov 2015 18:55:55 +0100 (CET)
From:	Jan Engelhardt <jengelh@...i.de>
To:	David Laight <David.Laight@...LAB.COM>
cc:	'Florian Westphal' <fw@...len.de>, Tejun Heo <tj@...nel.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"pablo@...filter.org" <pablo@...filter.org>,
	"kaber@...sh.net" <kaber@...sh.net>,
	"kadlec@...ckhole.kfki.hu" <kadlec@...ckhole.kfki.hu>,
	"daniel@...earbox.net" <daniel@...earbox.net>,
	"daniel.wagner@...-carit.de" <daniel.wagner@...-carit.de>,
	"nhorman@...driver.co" <nhorman@...driver.co>,
	"lizefan@...wei.com" <lizefan@...wei.com>,
	"hannes@...xchg.org" <hannes@...xchg.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
	"coreteam@...filter.org" <coreteam@...filter.org>,
	"cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"kernel-team@...com" <kernel-team@...com>,
	"ninasc@...com" <ninasc@...com>,
	Neil Horman <nhorman@...driver.com>
Subject: RE: [PATCH 9/9] netfilter: implement xt_cgroup cgroup2 path match


On Monday 2015-11-23 18:35, David Laight wrote:
>From: Florian Westphal
>> Sent: 21 November 2015 16:56
>> > +struct xt_cgroup_info_v1 {
>> > +	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?

Oh, smart :)  Yeah, ebt_among does something like that.
(.matchsize = -1, hint)

Except that the "priv" pointer seems to be ruining the fun here -
kernel vars have to be last, which collides with the requirements
for []-type members.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ