Lines Matching refs:report

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;
58 return &state->report;
61 static struct tsm_report_state *to_state(struct tsm_report *report)
63 return container_of(report, struct tsm_report_state, report);
66 static int try_advance_write_generation(struct tsm_report *report)
68 struct tsm_report_state *state = to_state(report);
75 * interim read. Stop accepting updates until the current report
87 struct tsm_report *report = to_tsm_report(cfg);
105 rc = try_advance_write_generation(report);
108 report->desc.privlevel = val;
125 struct tsm_report *report = to_tsm_report(cfg);
129 rc = try_advance_write_generation(report);
133 report->desc.inblob_len = count;
134 memcpy(report->desc.inblob, buf, count);
141 struct tsm_report *report = to_tsm_report(cfg);
142 struct tsm_report_state *state = to_state(report);
156 static ssize_t __read_report(struct tsm_report *report, void *buf, size_t count,
164 out = report->outblob;
165 len = report->outblob_len;
167 out = report->auxblob;
168 len = report->auxblob_len;
180 static ssize_t read_cached_report(struct tsm_report *report, void *buf,
183 struct tsm_report_state *state = to_state(report);
186 if (!report->desc.inblob_len)
191 * whether the report includes an auxblob or not.
193 if (!report->outblob ||
197 return __read_report(report, buf, count, select);
200 static ssize_t tsm_report_read(struct tsm_report *report, void *buf,
203 struct tsm_report_state *state = to_state(report);
207 /* try to read from the existing report if present and valid... */
208 rc = read_cached_report(report, buf, count, select);
212 /* slow path, report may need to be regenerated... */
217 if (!report->desc.inblob_len)
220 /* did another thread already generate this report? */
221 if (report->outblob &&
225 kvfree(report->outblob);
226 kvfree(report->auxblob);
227 report->outblob = NULL;
228 report->auxblob = NULL;
229 rc = ops->report_new(report, provider.data);
234 return __read_report(report, buf, count, select);
240 struct tsm_report *report = to_tsm_report(cfg);
242 return tsm_report_read(report, buf, count, TSM_REPORT);
249 struct tsm_report *report = to_tsm_report(cfg);
251 return tsm_report_read(report, buf, count, TSM_CERTS);
288 struct tsm_report *report = to_tsm_report(cfg);
289 struct tsm_report_state *state = to_state(report);
291 kvfree(report->auxblob);
292 kvfree(report->outblob);
405 tsm = configfs_register_default_group(root, "report",