File Index
Files and directories
Sign in
FILE

ibpkey.h

File preview with syntax highlighting.

linux-6.19.14/security/selinux/include/ibpkey.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * pkey table
 4 *
 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 */
 9
10/*
11 * (c) Mellanox Technologies, 2016
12 */
13
14#ifndef _SELINUX_IB_PKEY_H
15#define _SELINUX_IB_PKEY_H
16
17#include <linux/types.h>
18#include "flask.h"
19
20#ifdef CONFIG_SECURITY_INFINIBAND
21void sel_ib_pkey_flush(void);
22int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid);
23#else
24static inline void sel_ib_pkey_flush(void)
25{
26	return;
27}
28static inline int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid)
29{
30	*sid = SECINITSID_UNLABELED;
31	return 0;
32}
33#endif
34
35#endif
~/ Read-only file preview.