2024-08-03 06:08:17 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2020-2024 Microsoft Corporation. All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _IPE_EVAL_H
|
|
|
|
#define _IPE_EVAL_H
|
|
|
|
|
|
|
|
#include <linux/file.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
#include "policy.h"
|
|
|
|
|
2024-08-03 06:08:18 +00:00
|
|
|
#define IPE_EVAL_CTX_INIT ((struct ipe_eval_ctx){ 0 })
|
|
|
|
|
2024-08-03 06:08:17 +00:00
|
|
|
extern struct ipe_policy __rcu *ipe_active_policy;
|
|
|
|
|
2024-08-03 06:08:20 +00:00
|
|
|
struct ipe_superblock {
|
|
|
|
bool initramfs;
|
|
|
|
};
|
|
|
|
|
2024-08-03 06:08:17 +00:00
|
|
|
struct ipe_eval_ctx {
|
|
|
|
enum ipe_op_type op;
|
|
|
|
|
|
|
|
const struct file *file;
|
2024-08-03 06:08:20 +00:00
|
|
|
bool initramfs;
|
2024-08-03 06:08:17 +00:00
|
|
|
};
|
|
|
|
|
2024-08-03 06:08:18 +00:00
|
|
|
void ipe_build_eval_ctx(struct ipe_eval_ctx *ctx,
|
|
|
|
const struct file *file,
|
|
|
|
enum ipe_op_type op);
|
2024-08-03 06:08:17 +00:00
|
|
|
int ipe_evaluate_event(const struct ipe_eval_ctx *const ctx);
|
|
|
|
|
|
|
|
#endif /* _IPE_EVAL_H */
|