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:	Mon, 15 Sep 2008 10:55:45 -0700
From:	"Paul Menage" <menage@...gle.com>
To:	"Pekka J Enberg" <penberg@...helsinki.fi>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	balbir@...ux.vnet.ibm.com
Subject: Re: [PATCH] cgroups: don't depend on CONFIG_MM_OWNER

On Sun, Sep 14, 2008 at 10:37 AM, Pekka J Enberg <penberg@...helsinki.fi> wrote:
> From: Pekka Enberg <penberg@...helsinki.fi>
>
> The revoke patches, for example, select CONFIG_MM_OWNER independently of
> cgroups. Therefore, don't depend on CONFIG_MM_OWNER in cgroup specific code.

Yes, the existing code doesn't seem quite right - if !CONFIG_MM_OWNER
then we don't need to even define a trivial version of
cgroup_mm_owner_callbacks()

But your patch is too specific - tying the existance of
cgroup_mm_owner_callbacks() to the memory controller would break other
controllers (e.g. the memrlimit or swap controllers, which also want
to use it)

How about:

- any cgroup that needs mm-owner callbacks selects an option
CGROUP_MM_OWNER_CALLBACK

- CGROUP_MM_OWNER_CALLBACK selects MM_OWNER and triggers the
definition of a non-trivial cgroup_mm_owner_callbacks() function


Paul


>
> Cc: Paul Menage <menage@...gle.com>
> Cc: Balbir Singh <balbir@...ux.vnet.ibm.com>
> Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
> ---
>  include/linux/cgroup.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
> index c98dd7c..e270ec3 100644
> --- a/include/linux/cgroup.h
> +++ b/include/linux/cgroup.h
> @@ -413,10 +413,10 @@ static inline int cgroupstats_build(struct cgroupstats *stats,
>
>  #endif /* !CONFIG_CGROUPS */
>
> -#ifdef CONFIG_MM_OWNER
> +#ifdef CONFIG_CGROUP_MEM_RES_CTLR
>  extern void
>  cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new);
> -#else /* !CONFIG_MM_OWNER */
> +#else /* !CONFIG_CGROUP_MEM_RES_CTLR */
>  static inline void
>  cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new)
>  {
> --
> 1.5.4.3
>
>
--
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