Lines Matching full:report

23  * DOC: Trusted Security Module (TSM) Attestation Report Interface
25 * The TSM report interface is a common provider of blobs that facilitate
27 * service. A TSM report combines a user-defined blob (likely a public-key with
28 * a nonce for a key-exchange protocol) with a signed attestation report. That
30 * validate the attestation report. The expectation is that this interface is
32 * own their own report generation instances to generate reports as
35 * The attestation report format is TSM provider specific, when / if a standard
42 struct tsm_report report; member
58 return &state->report; in to_tsm_report()
61 static struct tsm_report_state *to_state(struct tsm_report *report) in to_state() argument
63 return container_of(report, struct tsm_report_state, report); in to_state()
66 static int try_advance_write_generation(struct tsm_report *report) in try_advance_write_generation() argument
68 struct tsm_report_state *state = to_state(report); in try_advance_write_generation()
75 * interim read. Stop accepting updates until the current report in try_advance_write_generation()
87 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_privlevel_store() local
105 rc = try_advance_write_generation(report); in tsm_report_privlevel_store()
108 report->desc.privlevel = val; in tsm_report_privlevel_store()
125 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_inblob_write() local
129 rc = try_advance_write_generation(report); in tsm_report_inblob_write()
133 report->desc.inblob_len = count; in tsm_report_inblob_write()
134 memcpy(report->desc.inblob, buf, count); in tsm_report_inblob_write()
141 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_generation_show() local
142 struct tsm_report_state *state = to_state(report); in tsm_report_generation_show()
156 static ssize_t __read_report(struct tsm_report *report, void *buf, size_t count, in __read_report() argument
164 out = report->outblob; in __read_report()
165 len = report->outblob_len; in __read_report()
167 out = report->auxblob; in __read_report()
168 len = report->auxblob_len; in __read_report()
180 static ssize_t read_cached_report(struct tsm_report *report, void *buf, in read_cached_report() argument
183 struct tsm_report_state *state = to_state(report); in read_cached_report()
186 if (!report->desc.inblob_len) in read_cached_report()
191 * whether the report includes an auxblob or not. in read_cached_report()
193 if (!report->outblob || in read_cached_report()
197 return __read_report(report, buf, count, select); in read_cached_report()
200 static ssize_t tsm_report_read(struct tsm_report *report, void *buf, in tsm_report_read() argument
203 struct tsm_report_state *state = to_state(report); in tsm_report_read()
207 /* try to read from the existing report if present and valid... */ in tsm_report_read()
208 rc = read_cached_report(report, buf, count, select); in tsm_report_read()
212 /* slow path, report may need to be regenerated... */ in tsm_report_read()
217 if (!report->desc.inblob_len) in tsm_report_read()
220 /* did another thread already generate this report? */ in tsm_report_read()
221 if (report->outblob && in tsm_report_read()
225 kvfree(report->outblob); in tsm_report_read()
226 kvfree(report->auxblob); in tsm_report_read()
227 report->outblob = NULL; in tsm_report_read()
228 report->auxblob = NULL; in tsm_report_read()
229 rc = ops->report_new(report, provider.data); in tsm_report_read()
234 return __read_report(report, buf, count, select); in tsm_report_read()
240 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_outblob_read() local
242 return tsm_report_read(report, buf, count, TSM_REPORT); in tsm_report_outblob_read()
249 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_auxblob_read() local
251 return tsm_report_read(report, buf, count, TSM_CERTS); in tsm_report_auxblob_read()
288 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_item_release() local
289 struct tsm_report_state *state = to_state(report); in tsm_report_item_release()
291 kvfree(report->auxblob); in tsm_report_item_release()
292 kvfree(report->outblob); in tsm_report_item_release()
405 tsm = configfs_register_default_group(root, "report", in tsm_init()