diff options
author | Mickaël Salaün <mic@digikod.net> | 2022-05-06 18:05:07 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-09 10:23:22 +0200 |
commit | 58f52ad1d0adcae46b0f3e76665e624fc60766dd (patch) | |
tree | 4eeb0c9d5cc85b7f9df62fbfd28a6bd85eadf551 /security | |
parent | 1be49ae16f5348e71505cc96a424ce914983171a (diff) |
landlock: Add clang-format exceptions
commit 6cc2df8e3a3967e7c13a424f87f6efb1d4a62d80 upstream.
In preparation to a following commit, add clang-format on and
clang-format off stanzas around constant definitions. This enables to
keep aligned values, which is much more readable than packed
definitions.
Link: https://lore.kernel.org/r/20220506160513.523257-2-mic@digikod.net
Cc: stable@vger.kernel.org
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
-rw-r--r-- | security/landlock/fs.c | 2 | ||||
-rw-r--r-- | security/landlock/limits.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/security/landlock/fs.c b/security/landlock/fs.c index 97b8e421f617..4195a6be60b2 100644 --- a/security/landlock/fs.c +++ b/security/landlock/fs.c @@ -141,10 +141,12 @@ retry: } /* All access rights that can be tied to files. */ +/* clang-format off */ #define ACCESS_FILE ( \ LANDLOCK_ACCESS_FS_EXECUTE | \ LANDLOCK_ACCESS_FS_WRITE_FILE | \ LANDLOCK_ACCESS_FS_READ_FILE) +/* clang-format on */ /* * @path: Should have been checked by get_path_from_fd(). diff --git a/security/landlock/limits.h b/security/landlock/limits.h index 2a0a1095ee27..a274ae6b5570 100644 --- a/security/landlock/limits.h +++ b/security/landlock/limits.h @@ -12,10 +12,14 @@ #include <linux/limits.h> #include <uapi/linux/landlock.h> +/* clang-format off */ + #define LANDLOCK_MAX_NUM_LAYERS 64 #define LANDLOCK_MAX_NUM_RULES U32_MAX #define LANDLOCK_LAST_ACCESS_FS LANDLOCK_ACCESS_FS_MAKE_SYM #define LANDLOCK_MASK_ACCESS_FS ((LANDLOCK_LAST_ACCESS_FS << 1) - 1) +/* clang-format on */ + #endif /* _SECURITY_LANDLOCK_LIMITS_H */ |