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, 13 Apr 2015 10:24:39 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Aleksa Sarai <cyphar@...har.com>
Cc:	lizefan@...wei.com, mingo@...hat.com, peterz@...radead.org,
	richard@....at, fweisbec@...il.com, linux-kernel@...r.kernel.org,
	cgroups@...r.kernel.org
Subject: Re: [PATCH v9 3/4] cgroups: allow a cgroup subsystem to reject a fork

On Sun, Apr 12, 2015 at 10:51:56AM +1000, Aleksa Sarai wrote:
> +/* list of all tags for subsystems */
> +enum cgroup_subsys_tag {
> +#define TAG_ID(_t) CGROUP_ ## _t
> +#define SUBSYS(_x) UNUSED_IDENT(_x),
> +#define TAG(_t) TAG_ID(_t), \
> +	UNUSED_IDENT(_t) = TAG_ID(_t) - 2,
> +#define _COUNT(_t, _i) _i, \
> +	CGROUP_ ## _t ## _COUNT = (TAG_ID(_t ## _END) - TAG_ID(_t ## _START)) + 1, \
> +	UNUSED_IDENT(_t) = _i - 1,
> +#define COUNT(_t) _COUNT(_t, UNUSED_IDENT(_t))
> +#include <linux/cgroup_subsys.h>
> +#undef COUNT
> +#undef TAG
> +#undef SUBSYS
> +#undef TAG_ID
> +};

Ummm... is this really necessary?  Can't we do something like the
following?

#define SUBSYS_TAG(tag)						\
	__##tag,						\
	tag = __##tag - 2,

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