~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/lsm_count.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/lsm_count.h (Architecture i386) and /include/linux/lsm_count.h (Architecture sparc)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2                                                     2 
  3 /*                                                  3 /*
  4  * Copyright (C) 2023 Google LLC.                   4  * Copyright (C) 2023 Google LLC.
  5  */                                                 5  */
  6                                                     6 
  7 #ifndef __LINUX_LSM_COUNT_H                         7 #ifndef __LINUX_LSM_COUNT_H
  8 #define __LINUX_LSM_COUNT_H                         8 #define __LINUX_LSM_COUNT_H
  9                                                     9 
 10 #include <linux/args.h>                            10 #include <linux/args.h>
 11                                                    11 
 12 #ifdef CONFIG_SECURITY                             12 #ifdef CONFIG_SECURITY
 13                                                    13 
 14 /*                                                 14 /*
 15  * Macros to count the number of LSMs enabled      15  * Macros to count the number of LSMs enabled in the kernel at compile time.
 16  */                                                16  */
 17                                                    17 
 18 /*                                                 18 /*
 19  * Capabilities is enabled when CONFIG_SECURIT     19  * Capabilities is enabled when CONFIG_SECURITY is enabled.
 20  */                                                20  */
 21 #if IS_ENABLED(CONFIG_SECURITY)                    21 #if IS_ENABLED(CONFIG_SECURITY)
 22 #define CAPABILITIES_ENABLED 1,                    22 #define CAPABILITIES_ENABLED 1,
 23 #else                                              23 #else
 24 #define CAPABILITIES_ENABLED                       24 #define CAPABILITIES_ENABLED
 25 #endif                                             25 #endif
 26                                                    26 
 27 #if IS_ENABLED(CONFIG_SECURITY_SELINUX)            27 #if IS_ENABLED(CONFIG_SECURITY_SELINUX)
 28 #define SELINUX_ENABLED 1,                         28 #define SELINUX_ENABLED 1,
 29 #else                                              29 #else
 30 #define SELINUX_ENABLED                            30 #define SELINUX_ENABLED
 31 #endif                                             31 #endif
 32                                                    32 
 33 #if IS_ENABLED(CONFIG_SECURITY_SMACK)              33 #if IS_ENABLED(CONFIG_SECURITY_SMACK)
 34 #define SMACK_ENABLED 1,                           34 #define SMACK_ENABLED 1,
 35 #else                                              35 #else
 36 #define SMACK_ENABLED                              36 #define SMACK_ENABLED
 37 #endif                                             37 #endif
 38                                                    38 
 39 #if IS_ENABLED(CONFIG_SECURITY_APPARMOR)           39 #if IS_ENABLED(CONFIG_SECURITY_APPARMOR)
 40 #define APPARMOR_ENABLED 1,                        40 #define APPARMOR_ENABLED 1,
 41 #else                                              41 #else
 42 #define APPARMOR_ENABLED                           42 #define APPARMOR_ENABLED
 43 #endif                                             43 #endif
 44                                                    44 
 45 #if IS_ENABLED(CONFIG_SECURITY_TOMOYO)             45 #if IS_ENABLED(CONFIG_SECURITY_TOMOYO)
 46 #define TOMOYO_ENABLED 1,                          46 #define TOMOYO_ENABLED 1,
 47 #else                                              47 #else
 48 #define TOMOYO_ENABLED                             48 #define TOMOYO_ENABLED
 49 #endif                                             49 #endif
 50                                                    50 
 51 #if IS_ENABLED(CONFIG_SECURITY_YAMA)               51 #if IS_ENABLED(CONFIG_SECURITY_YAMA)
 52 #define YAMA_ENABLED 1,                            52 #define YAMA_ENABLED 1,
 53 #else                                              53 #else
 54 #define YAMA_ENABLED                               54 #define YAMA_ENABLED
 55 #endif                                             55 #endif
 56                                                    56 
 57 #if IS_ENABLED(CONFIG_SECURITY_LOADPIN)            57 #if IS_ENABLED(CONFIG_SECURITY_LOADPIN)
 58 #define LOADPIN_ENABLED 1,                         58 #define LOADPIN_ENABLED 1,
 59 #else                                              59 #else
 60 #define LOADPIN_ENABLED                            60 #define LOADPIN_ENABLED
 61 #endif                                             61 #endif
 62                                                    62 
 63 #if IS_ENABLED(CONFIG_SECURITY_LOCKDOWN_LSM)       63 #if IS_ENABLED(CONFIG_SECURITY_LOCKDOWN_LSM)
 64 #define LOCKDOWN_ENABLED 1,                        64 #define LOCKDOWN_ENABLED 1,
 65 #else                                              65 #else
 66 #define LOCKDOWN_ENABLED                           66 #define LOCKDOWN_ENABLED
 67 #endif                                             67 #endif
 68                                                    68 
 69 #if IS_ENABLED(CONFIG_SECURITY_SAFESETID)          69 #if IS_ENABLED(CONFIG_SECURITY_SAFESETID)
 70 #define SAFESETID_ENABLED 1,                       70 #define SAFESETID_ENABLED 1,
 71 #else                                              71 #else
 72 #define SAFESETID_ENABLED                          72 #define SAFESETID_ENABLED
 73 #endif                                             73 #endif
 74                                                    74 
 75 #if IS_ENABLED(CONFIG_BPF_LSM)                     75 #if IS_ENABLED(CONFIG_BPF_LSM)
 76 #define BPF_LSM_ENABLED 1,                         76 #define BPF_LSM_ENABLED 1,
 77 #else                                              77 #else
 78 #define BPF_LSM_ENABLED                            78 #define BPF_LSM_ENABLED
 79 #endif                                             79 #endif
 80                                                    80 
 81 #if IS_ENABLED(CONFIG_SECURITY_LANDLOCK)           81 #if IS_ENABLED(CONFIG_SECURITY_LANDLOCK)
 82 #define LANDLOCK_ENABLED 1,                        82 #define LANDLOCK_ENABLED 1,
 83 #else                                              83 #else
 84 #define LANDLOCK_ENABLED                           84 #define LANDLOCK_ENABLED
 85 #endif                                             85 #endif
 86                                                    86 
 87 #if IS_ENABLED(CONFIG_IMA)                         87 #if IS_ENABLED(CONFIG_IMA)
 88 #define IMA_ENABLED 1,                             88 #define IMA_ENABLED 1,
 89 #else                                              89 #else
 90 #define IMA_ENABLED                                90 #define IMA_ENABLED
 91 #endif                                             91 #endif
 92                                                    92 
 93 #if IS_ENABLED(CONFIG_EVM)                         93 #if IS_ENABLED(CONFIG_EVM)
 94 #define EVM_ENABLED 1,                             94 #define EVM_ENABLED 1,
 95 #else                                              95 #else
 96 #define EVM_ENABLED                                96 #define EVM_ENABLED
 97 #endif                                             97 #endif
 98                                                    98 
 99 #if IS_ENABLED(CONFIG_SECURITY_IPE)                99 #if IS_ENABLED(CONFIG_SECURITY_IPE)
100 #define IPE_ENABLED 1,                            100 #define IPE_ENABLED 1,
101 #else                                             101 #else
102 #define IPE_ENABLED                               102 #define IPE_ENABLED
103 #endif                                            103 #endif
104                                                   104 
105 /*                                                105 /*
106  *  There is a trailing comma that we need to     106  *  There is a trailing comma that we need to be accounted for. This is done by
107  *  using a skipped argument in __COUNT_LSMS      107  *  using a skipped argument in __COUNT_LSMS
108  */                                               108  */
109 #define __COUNT_LSMS(skipped_arg, args...) COU    109 #define __COUNT_LSMS(skipped_arg, args...) COUNT_ARGS(args...)
110 #define COUNT_LSMS(args...) __COUNT_LSMS(args)    110 #define COUNT_LSMS(args...) __COUNT_LSMS(args)
111                                                   111 
112 #define MAX_LSM_COUNT                   \         112 #define MAX_LSM_COUNT                   \
113         COUNT_LSMS(                     \         113         COUNT_LSMS(                     \
114                 CAPABILITIES_ENABLED    \         114                 CAPABILITIES_ENABLED    \
115                 SELINUX_ENABLED         \         115                 SELINUX_ENABLED         \
116                 SMACK_ENABLED           \         116                 SMACK_ENABLED           \
117                 APPARMOR_ENABLED        \         117                 APPARMOR_ENABLED        \
118                 TOMOYO_ENABLED          \         118                 TOMOYO_ENABLED          \
119                 YAMA_ENABLED            \         119                 YAMA_ENABLED            \
120                 LOADPIN_ENABLED         \         120                 LOADPIN_ENABLED         \
121                 LOCKDOWN_ENABLED        \         121                 LOCKDOWN_ENABLED        \
122                 SAFESETID_ENABLED       \         122                 SAFESETID_ENABLED       \
123                 BPF_LSM_ENABLED         \         123                 BPF_LSM_ENABLED         \
124                 LANDLOCK_ENABLED        \         124                 LANDLOCK_ENABLED        \
125                 IMA_ENABLED             \         125                 IMA_ENABLED             \
126                 EVM_ENABLED             \         126                 EVM_ENABLED             \
127                 IPE_ENABLED)                      127                 IPE_ENABLED)
128                                                   128 
129 #else                                             129 #else
130                                                   130 
131 #define MAX_LSM_COUNT 0                           131 #define MAX_LSM_COUNT 0
132                                                   132 
133 #endif /* CONFIG_SECURITY */                      133 #endif /* CONFIG_SECURITY */
134                                                   134 
135 #endif  /* __LINUX_LSM_COUNT_H */                 135 #endif  /* __LINUX_LSM_COUNT_H */
136                                                   136 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php