#define pr_fmt(fmt) …
#include <linux/tsm.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/rwsem.h>
#include <linux/string.h>
#include <linux/module.h>
#include <linux/cleanup.h>
#include <linux/configfs.h>
static struct tsm_provider { … } provider;
static DECLARE_RWSEM(tsm_rwsem);
struct tsm_report_state { … };
enum tsm_data_select { … };
static struct tsm_report *to_tsm_report(struct config_item *cfg)
{ … }
static struct tsm_report_state *to_state(struct tsm_report *report)
{ … }
static int try_advance_write_generation(struct tsm_report *report)
{ … }
static ssize_t tsm_report_privlevel_store(struct config_item *cfg,
const char *buf, size_t len)
{ … }
CONFIGFS_ATTR_WO(…);
static ssize_t tsm_report_privlevel_floor_show(struct config_item *cfg,
char *buf)
{ … }
CONFIGFS_ATTR_RO(…);
static ssize_t tsm_report_service_provider_store(struct config_item *cfg,
const char *buf, size_t len)
{ … }
CONFIGFS_ATTR_WO(…);
static ssize_t tsm_report_service_guid_store(struct config_item *cfg,
const char *buf, size_t len)
{ … }
CONFIGFS_ATTR_WO(…);
static ssize_t tsm_report_service_manifest_version_store(struct config_item *cfg,
const char *buf, size_t len)
{ … }
CONFIGFS_ATTR_WO(…);
static ssize_t tsm_report_inblob_write(struct config_item *cfg,
const void *buf, size_t count)
{ … }
CONFIGFS_BIN_ATTR_WO(…);
static ssize_t tsm_report_generation_show(struct config_item *cfg, char *buf)
{ … }
CONFIGFS_ATTR_RO(…);
static ssize_t tsm_report_provider_show(struct config_item *cfg, char *buf)
{ … }
CONFIGFS_ATTR_RO(…);
static ssize_t __read_report(struct tsm_report *report, void *buf, size_t count,
enum tsm_data_select select)
{ … }
static ssize_t read_cached_report(struct tsm_report *report, void *buf,
size_t count, enum tsm_data_select select)
{ … }
static ssize_t tsm_report_read(struct tsm_report *report, void *buf,
size_t count, enum tsm_data_select select)
{ … }
static ssize_t tsm_report_outblob_read(struct config_item *cfg, void *buf,
size_t count)
{ … }
CONFIGFS_BIN_ATTR_RO(…);
static ssize_t tsm_report_auxblob_read(struct config_item *cfg, void *buf,
size_t count)
{ … }
CONFIGFS_BIN_ATTR_RO(…);
static ssize_t tsm_report_manifestblob_read(struct config_item *cfg, void *buf,
size_t count)
{ … }
CONFIGFS_BIN_ATTR_RO(…);
static struct configfs_attribute *tsm_report_attrs[] = …;
static struct configfs_bin_attribute *tsm_report_bin_attrs[] = …;
static void tsm_report_item_release(struct config_item *cfg)
{ … }
static struct configfs_item_operations tsm_report_item_ops = …;
static bool tsm_report_is_visible(struct config_item *item,
struct configfs_attribute *attr, int n)
{ … }
static bool tsm_report_is_bin_visible(struct config_item *item,
struct configfs_bin_attribute *attr, int n)
{ … }
static struct configfs_group_operations tsm_report_attr_group_ops = …;
static const struct config_item_type tsm_report_type = …;
static struct config_item *tsm_report_make_item(struct config_group *group,
const char *name)
{ … }
static struct configfs_group_operations tsm_report_group_ops = …;
static const struct config_item_type tsm_reports_type = …;
static const struct config_item_type tsm_root_group_type = …;
static struct configfs_subsystem tsm_configfs = …;
int tsm_register(const struct tsm_ops *ops, void *priv)
{ … }
EXPORT_SYMBOL_GPL(…);
int tsm_unregister(const struct tsm_ops *ops)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct config_group *tsm_report_group;
static int __init tsm_init(void)
{ … }
module_init(…) …;
static void __exit tsm_exit(void)
{ … }
module_exit(tsm_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;