Linux Audio

Check our new training course

Loading...
v6.2
 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
19#ifdef CONFIG_SECURITY_INFINIBAND
20void sel_ib_pkey_flush(void);
 
21int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid);
22#else
23static inline void sel_ib_pkey_flush(void)
24{
25	return;
26}
27static inline int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid)
28{
29	*sid = SECINITSID_UNLABELED;
30	return 0;
31}
32#endif
33
34#endif
v4.17
 
 1/*
 2 * pkey table
 3 *
 4 * SELinux must keep a mapping of pkeys to labels/SIDs.  This
 5 * mapping is maintained as part of the normal policy but a fast cache is
 6 * needed to reduce the lookup overhead.
 7 *
 8 */
 9
10/*
11 * (c) Mellanox Technologies, 2016
12 *
13 * This program is free software: you can redistribute it and/or modify
14 * it under the terms of version 2 of the GNU General Public License as
15 * published by the Free Software Foundation.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 * GNU General Public License for more details.
21 *
22 */
23
24#ifndef _SELINUX_IB_PKEY_H
25#define _SELINUX_IB_PKEY_H
26
 
 
 
27void sel_ib_pkey_flush(void);
28
29int sel_ib_pkey_sid(u64 subnet_prefix, u16 pkey, u32 *sid);
 
 
 
 
 
 
 
 
 
 
 
30
31#endif