tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
tools/arguments.c tools/arguments.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
lxc_monitord_SOURCES = cmd/lxc_monitord.c \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
../include/netns_ifaddrs.c ../include/netns_ifaddrs.h \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
af_unix.c af_unix.h \
caps.c caps.h \
+ cgroups/cgroup.c cgroups/cgroup.h \
+ cgroups/cgroup2_devices.c cgroups/cgroup2_devices.h \
+ cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
commands.c commands.h \
commands_utils.c commands_utils.h \
conf.c conf.h \
#include <stddef.h>
#include <sys/types.h>
+#include "compiler.h"
#include "macro.h"
#include "memory_utils.h"
const char *(*get_limiting_cgroup)(struct cgroup_ops *ops, const char *controller);
};
-extern struct cgroup_ops *cgroup_init(struct lxc_conf *conf);
+__hidden extern struct cgroup_ops *cgroup_init(struct lxc_conf *conf);
-extern void cgroup_exit(struct cgroup_ops *ops);
+__hidden extern void cgroup_exit(struct cgroup_ops *ops);
define_cleanup_function(struct cgroup_ops *, cgroup_exit);
-extern void prune_init_scope(char *cg);
+__hidden extern void prune_init_scope(char *cg);
-extern int cgroup_attach(const struct lxc_conf *conf, const char *name,
- const char *lxcpath, pid_t pid);
+__hidden extern int cgroup_attach(const struct lxc_conf *conf, const char *name,
+ const char *lxcpath, pid_t pid);
static inline bool pure_unified_layout(const struct cgroup_ops *ops)
{
return ops->unified->cgfd_con;
}
-#endif
+#endif /* __LXC_CGROUP_H */
#include <sys/types.h>
#include <unistd.h>
+#include "compiler.h"
#include "conf.h"
#include "config.h"
#include "syscall_numbers.h"
};
#ifdef HAVE_STRUCT_BPF_CGROUP_DEV_CTX
-struct bpf_program *bpf_program_new(uint32_t prog_type);
-int bpf_program_init(struct bpf_program *prog);
-int bpf_program_append_device(struct bpf_program *prog,
- struct device_item *device);
-int bpf_program_finalize(struct bpf_program *prog);
-int bpf_program_cgroup_attach(struct bpf_program *prog, int type,
- const char *path, uint32_t flags);
-int bpf_program_cgroup_detach(struct bpf_program *prog);
-void bpf_program_free(struct bpf_program *prog);
-void lxc_clear_cgroup2_devices(struct lxc_conf *conf);
-bool bpf_devices_cgroup_supported(void);
+__hidden extern struct bpf_program *bpf_program_new(uint32_t prog_type);
+__hidden extern int bpf_program_init(struct bpf_program *prog);
+__hidden extern int bpf_program_append_device(struct bpf_program *prog, struct device_item *device);
+__hidden extern int bpf_program_finalize(struct bpf_program *prog);
+__hidden extern int bpf_program_cgroup_attach(struct bpf_program *prog, int type, const char *path,
+ uint32_t flags);
+__hidden extern int bpf_program_cgroup_detach(struct bpf_program *prog);
+__hidden extern void bpf_program_free(struct bpf_program *prog);
+__hidden extern void lxc_clear_cgroup2_devices(struct lxc_conf *conf);
+__hidden extern bool bpf_devices_cgroup_supported(void);
+
static inline void __auto_bpf_program_free__(struct bpf_program **prog)
{
if (*prog) {
*prog = NULL;
}
}
-int bpf_list_add_device(struct lxc_conf *conf, struct device_item *device);
+
+__hidden extern int bpf_list_add_device(struct lxc_conf *conf, struct device_item *device);
+
#else /* !HAVE_STRUCT_BPF_CGROUP_DEV_CTX */
+
static inline struct bpf_program *bpf_program_new(uint32_t prog_type)
{
errno = ENOSYS;
#include <stdbool.h>
#include <stdio.h>
+#include "compiler.h"
+
/* Retrieve the cgroup version of a given entry from /proc/<pid>/mountinfo. */
-extern int get_cgroup_version(char *line);
+__hidden extern int get_cgroup_version(char *line);
/* Check if given entry from /proc/<pid>/mountinfo is a cgroupfs v1 mount. */
-extern bool is_cgroupfs_v1(char *line);
+__hidden extern bool is_cgroupfs_v1(char *line);
/* Check if given entry from /proc/<pid>/mountinfo is a cgroupfs v2 mount. */
-extern bool is_cgroupfs_v2(char *line);
+__hidden extern bool is_cgroupfs_v2(char *line);
/* Given a v1 hierarchy @mountpoint and base @path, verify that we can create
* directories underneath it.
*/
-extern bool test_writeable_v1(char *mountpoint, char *path);
+__hidden extern bool test_writeable_v1(char *mountpoint, char *path);
/* Given a v2 hierarchy @mountpoint and base @path, verify that we can create
* directories underneath it and that we have write access to the cgroup's
* "cgroup.procs" file.
*/
-extern bool test_writeable_v2(char *mountpoint, char *path);
+__hidden extern bool test_writeable_v2(char *mountpoint, char *path);
-extern int unified_cgroup_hierarchy(void);
+__hidden extern int unified_cgroup_hierarchy(void);
#endif /* __LXC_CGROUP_UTILS_H */
lxc_test_api_reboot_SOURCES = api_reboot.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxc_test_apparmor_SOURCES = aa.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxc_test_attach_SOURCES = attach.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxc_test_cgpath_SOURCES = cgpath.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxc_test_locktests_SOURCES = locktests.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \
lxc_test_raw_clone_SOURCES = lxc_raw_clone.c \
lxctest.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/file_utils.c ../lxc/file_utils.h \
../lxc/log.c ../lxc/log.h \
../lxc/namespace.c ../lxc/namespace.h \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
+ ../lxc/cgroups/cgroup.c ../lxc/cgroups/cgroup.h \
+ ../lxc/cgroups/cgroup2_devices.c ../lxc/cgroups/cgroup2_devices.h \
+ ../lxc/cgroups/cgroup_utils.c ../lxc/cgroups/cgroup_utils.h \
../lxc/commands.c ../lxc/commands.h \
../lxc/commands_utils.c ../lxc/commands_utils.h \
../lxc/conf.c ../lxc/conf.h \