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]
Date:	Thu, 3 Jul 2014 07:14:40 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	lizefan@...wei.com, cgroups@...r.kernel.org,
	linux-kernel@...r.kernel.org, Johannes Weiner <hannes@...xchg.org>,
	Michal Hocko <mhocko@...e.cz>, Vivek Goyal <vgoyal@...hat.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Aristeu Rozanski <aris@...hat.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Subject: Re: [PATCH 4/5] cgroup: distinguish the default and legacy
 hierarchies when handling cftypes

On Wed, Jul 02, 2014 at 07:50:54PM -0400, Tejun Heo wrote:
> Until now, cftype arrays carried files for both the default and legacy
> hierarchies and the files which needed to be used on only one of them
> were flagged with either CFTYPE_ONLY_ON_DFL or CFTYPE_INSANE.  This
> gets confusing very quickly and we may end up exposing interface files
> to the default hierarchy without thinking it through.
> 
> This patch makes cgroup core provide separate sets of interfaces for
> cftype handling so that the cftypes for the default and legacy
> hierarchies are clearly distinguished.  The previous two patches
> renamed the existing ones so that they clearly indicate that they're
> for the legacy hierarchies.  This patch adds the interface for the
> default hierarchy and apply them selectively depending on the
> hierarchy type.
> 
> * cftypes added through cgroup_subsys->dfl_cftypes and
>   cgroup_add_dfl_cftypes() only show up on the default hierarchy.
> 
> * cftypes added through cgroup_subsys->legacy_cftypes and
>   cgroup_add_legacy_cftypes() only show up on the legacy hierarchies.
> 
> * cgroup_subsys->dfl_cftypes and ->legacy_cftypes can point to the
>   same array for the cases where the interface files are identical on
>   both types of hierarchies.
> 
> * This makes all the existing subsystem interface files legacy-only by
>   default and all subsystems will have no interface file created when
>   enabled on the default hierarchy.  Each subsystem should explicitly
>   review and compose the interface for the default hierarchy.
> 
> * A boot param "cgroup__DEVEL__legacy_files_on_dfl" is added which
>   makes subsystems which haven't decided the interface files for the
>   default hierarchy to present the legacy files on the default
>   hierarchy so that its behavior on the default hierarchy can be
>   tested.  As the awkward name suggests, this is for development only.
> 
> * memcg's CFTYPE_INSANE on "use_hierarchy" is noop now as the whole
>   array isn't used on the default hierarchy.  The flag is removed.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: Michal Hocko <mhocko@...e.cz>
> Cc: Li Zefan <lizefan@...wei.com>
> Cc: Vivek Goyal <vgoyal@...hat.com>
> Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
> Cc: Aristeu Rozanski <aris@...hat.com>
> Cc: Neil Horman <nhorman@...driver.com>
> Cc: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
Acked-by: Neil Horman <nhorman@...driver.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ