/* SPDX-License-Identifier: GPL-2.0-only */1/*2* pkey table3*4* SELinux must keep a mapping of pkeys to labels/SIDs. This5* mapping is maintained as part of the normal policy but a fast cache is6* needed to reduce the lookup overhead.7*/89/*10* (c) Mellanox Technologies, 201611*/1213#ifndef _SELINUX_IB_PKEY_H14#define _SELINUX_IB_PKEY_H1516#include <linux/types.h>17#include "flask.h"1819#ifdef CONFIG_SECURITY_INFINIBAND20void sel_ib_pkey_flush(void);21int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid);22#else23static inline void sel_ib_pkey_flush(void)24{25return;26}27static inline int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid)28{29*sid = SECINITSID_UNLABELED;30return 0;31}32#endif3334#endif353637