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, 7 Apr 2008 10:43:37 -0700
From:	"Paul Menage" <menage@...gle.com>
To:	"Balbir Singh" <balbir@...ux.vnet.ibm.com>
Cc:	andi@...stfloor.org, "Andrew Morton" <akpm@...ux-foundation.org>,
	"YAMAMOTO Takashi" <yamamoto@...inux.co.jp>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	"Pavel Emelianov" <xemul@...nvz.org>, hugh@...itas.com,
	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [-mm] Disable the memory controller by default (v2)

On Mon, Apr 7, 2008 at 6:02 AM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
>         return 1;
>   }
>   __setup("cgroup_disable=", cgroup_disable);
>  +
>  +static int __init cgroup_enable(char *str)
>  +{
>  +       int i;
>  +       char *token;
>  +
>  +       while ((token = strsep(&str, ",")) != NULL) {
>  +               if (!*token)
>  +                       continue;
>  +
>  +               for (i = 0; i < CGROUP_SUBSYS_COUNT; i++) {
>  +                       struct cgroup_subsys *ss = subsys[i];
>  +
>  +                       if (!strcmp(token, ss->name)) {
>  +                               ss->disabled = 0;
>  +                               printk(KERN_INFO "%s control group "
>  +                                               "is enabled\n", ss->name);
>  +                               break;
>  +                       }
>  +               }
>  +       }
>  +       return 1;
>  +}
>  +__setup("cgroup_enable=", cgroup_enable);

Good idea - but you could just use the same handler function for both
of these (with a one-line wrapper for each to pass disabled=1 or
disabled=0)

Paul
--
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