Mickaël Salaün | ae271c1 | 2021-04-22 17:41:12 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* |
| 3 | * Landlock LSM - Limits for different components |
| 4 | * |
| 5 | * Copyright © 2016-2020 Mickaël Salaün <mic@digikod.net> |
| 6 | * Copyright © 2018-2020 ANSSI |
| 7 | */ |
| 8 | |
| 9 | #ifndef _SECURITY_LANDLOCK_LIMITS_H |
| 10 | #define _SECURITY_LANDLOCK_LIMITS_H |
| 11 | |
| 12 | #include <linux/limits.h> |
Mickaël Salaün | cb2c7d1 | 2021-04-22 17:41:17 +0200 | [diff] [blame] | 13 | #include <uapi/linux/landlock.h> |
Mickaël Salaün | ae271c1 | 2021-04-22 17:41:12 +0200 | [diff] [blame] | 14 | |
| 15 | #define LANDLOCK_MAX_NUM_LAYERS 64 |
| 16 | #define LANDLOCK_MAX_NUM_RULES U32_MAX |
| 17 | |
Mickaël Salaün | cb2c7d1 | 2021-04-22 17:41:17 +0200 | [diff] [blame] | 18 | #define LANDLOCK_LAST_ACCESS_FS LANDLOCK_ACCESS_FS_MAKE_SYM |
| 19 | #define LANDLOCK_MASK_ACCESS_FS ((LANDLOCK_LAST_ACCESS_FS << 1) - 1) |
| 20 | |
Mickaël Salaün | ae271c1 | 2021-04-22 17:41:12 +0200 | [diff] [blame] | 21 | #endif /* _SECURITY_LANDLOCK_LIMITS_H */ |