1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 2 /* 3 * Landlock LSM - Limits for different compone 3 * Landlock LSM - Limits for different components 4 * 4 * 5 * Copyright © 2016-2020 Mickaël Salaün <mi 5 * Copyright © 2016-2020 Mickaël Salaün <mic@digikod.net> 6 * Copyright © 2018-2020 ANSSI 6 * Copyright © 2018-2020 ANSSI 7 */ 7 */ 8 8 9 #ifndef _SECURITY_LANDLOCK_LIMITS_H 9 #ifndef _SECURITY_LANDLOCK_LIMITS_H 10 #define _SECURITY_LANDLOCK_LIMITS_H 10 #define _SECURITY_LANDLOCK_LIMITS_H 11 11 12 #include <linux/bitops.h> << 13 #include <linux/limits.h> 12 #include <linux/limits.h> 14 #include <uapi/linux/landlock.h> 13 #include <uapi/linux/landlock.h> 15 14 16 /* clang-format off */ !! 15 #define LANDLOCK_MAX_NUM_LAYERS 64 17 << 18 #define LANDLOCK_MAX_NUM_LAYERS 16 << 19 #define LANDLOCK_MAX_NUM_RULES U32_MA 16 #define LANDLOCK_MAX_NUM_RULES U32_MAX 20 17 21 #define LANDLOCK_LAST_ACCESS_FS LANDLO !! 18 #define LANDLOCK_LAST_ACCESS_FS LANDLOCK_ACCESS_FS_MAKE_SYM 22 #define LANDLOCK_MASK_ACCESS_FS ((LAND 19 #define LANDLOCK_MASK_ACCESS_FS ((LANDLOCK_LAST_ACCESS_FS << 1) - 1) 23 #define LANDLOCK_NUM_ACCESS_FS __cons << 24 << 25 #define LANDLOCK_LAST_ACCESS_NET LANDLO << 26 #define LANDLOCK_MASK_ACCESS_NET ((LAND << 27 #define LANDLOCK_NUM_ACCESS_NET __cons << 28 << 29 #define LANDLOCK_LAST_SCOPE LANDLO << 30 #define LANDLOCK_MASK_SCOPE ((LAND << 31 #define LANDLOCK_NUM_SCOPE __cons << 32 /* clang-format on */ << 33 20 34 #endif /* _SECURITY_LANDLOCK_LIMITS_H */ 21 #endif /* _SECURITY_LANDLOCK_LIMITS_H */ 35 22
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.