#include <linux/rculist.h>
#include "ima.h"
#include "ima_template_lib.h"
enum header_fields { … };
static struct ima_template_desc builtin_templates[] = …;
static LIST_HEAD(defined_templates);
static DEFINE_SPINLOCK(template_list);
static int template_setup_done;
static const struct ima_template_field supported_fields[] = …;
#define MAX_TEMPLATE_NAME_LEN …
static struct ima_template_desc *ima_template;
static struct ima_template_desc *ima_buf_template;
bool ima_template_has_modsig(const struct ima_template_desc *ima_template)
{ … }
static int __init ima_template_setup(char *str)
{ … }
__setup(…);
static int __init ima_template_fmt_setup(char *str)
{ … }
__setup(…);
struct ima_template_desc *lookup_template_desc(const char *name)
{ … }
static const struct ima_template_field *
lookup_template_field(const char *field_id)
{ … }
static int template_fmt_size(const char *template_fmt)
{ … }
int template_desc_init_fields(const char *template_fmt,
const struct ima_template_field ***fields,
int *num_fields)
{ … }
void ima_init_template_list(void)
{ … }
struct ima_template_desc *ima_template_desc_current(void)
{ … }
struct ima_template_desc *ima_template_desc_buf(void)
{ … }
int __init ima_init_template(void)
{ … }
static struct ima_template_desc *restore_template_fmt(char *template_name)
{ … }
static int ima_restore_template_data(struct ima_template_desc *template_desc,
void *template_data,
int template_data_size,
struct ima_template_entry **entry)
{ … }
int ima_restore_measurement_list(loff_t size, void *buf)
{ … }