WIP FPC-III support
[linux/fpc-iii.git] / security / selinux / include / ibpkey.h
blobe6ac1d23320b6728cc1ccd5521daea599d2207b4
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * pkey table
5 * SELinux must keep a mapping of pkeys to labels/SIDs. This
6 * mapping is maintained as part of the normal policy but a fast cache is
7 * needed to reduce the lookup overhead.
8 */
11 * (c) Mellanox Technologies, 2016
14 #ifndef _SELINUX_IB_PKEY_H
15 #define _SELINUX_IB_PKEY_H
17 #ifdef CONFIG_SECURITY_INFINIBAND
18 void sel_ib_pkey_flush(void);
19 int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid);
20 #else
21 static inline void sel_ib_pkey_flush(void)
23 return;
25 static inline int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid)
27 *sid = SECINITSID_UNLABELED;
28 return 0;
30 #endif
32 #endif