1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Linux Security Module infrastructure tests
5 * Copyright © 2023 Casey Schaufler <casey@schaufler-ca.com>
8 #ifndef lsm_get_self_attr
9 static inline int lsm_get_self_attr(unsigned int attr
, struct lsm_ctx
*ctx
,
10 __u32
*size
, __u32 flags
)
12 return syscall(__NR_lsm_get_self_attr
, attr
, ctx
, size
, flags
);
16 #ifndef lsm_set_self_attr
17 static inline int lsm_set_self_attr(unsigned int attr
, struct lsm_ctx
*ctx
,
18 __u32 size
, __u32 flags
)
20 return syscall(__NR_lsm_set_self_attr
, attr
, ctx
, size
, flags
);
24 #ifndef lsm_list_modules
25 static inline int lsm_list_modules(__u64
*ids
, __u32
*size
, __u32 flags
)
27 return syscall(__NR_lsm_list_modules
, ids
, size
, flags
);
31 extern int read_proc_attr(const char *attr
, char *value
, size_t size
);
32 extern int read_sysfs_lsms(char *lsms
, size_t size
);
33 int attr_lsm_count(void);