mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
![Pablo Neira Ayuso](/assets/img/avatar_default.png)
cgroup v2 path field is PATH_MAX which is too large, this is placing too much pressure on memory allocation for people with many rules doing cgroup v1 classid matching, side effects of this are bug reports like: https://bugzilla.kernel.org/show_bug.cgi?id=200639 This patch registers a new revision that shrinks the cgroup path to 512 bytes, which is the same approach we follow in similar extensions that have a path field. Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Tejun Heo <tj@kernel.org>
41 lines
755 B
C
41 lines
755 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _UAPI_XT_CGROUP_H
|
|
#define _UAPI_XT_CGROUP_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/limits.h>
|
|
|
|
struct xt_cgroup_info_v0 {
|
|
__u32 id;
|
|
__u32 invert;
|
|
};
|
|
|
|
struct xt_cgroup_info_v1 {
|
|
__u8 has_path;
|
|
__u8 has_classid;
|
|
__u8 invert_path;
|
|
__u8 invert_classid;
|
|
char path[PATH_MAX];
|
|
__u32 classid;
|
|
|
|
/* kernel internal data */
|
|
void *priv __attribute__((aligned(8)));
|
|
};
|
|
|
|
#define XT_CGROUP_PATH_MAX 512
|
|
|
|
struct xt_cgroup_info_v2 {
|
|
__u8 has_path;
|
|
__u8 has_classid;
|
|
__u8 invert_path;
|
|
__u8 invert_classid;
|
|
union {
|
|
char path[XT_CGROUP_PATH_MAX];
|
|
__u32 classid;
|
|
};
|
|
|
|
/* kernel internal data */
|
|
void *priv __attribute__((aligned(8)));
|
|
};
|
|
|
|
#endif /* _UAPI_XT_CGROUP_H */
|