Lines Matching refs:report

41 	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()
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_service_provider_store() local
131 rc = try_advance_write_generation(report); in tsm_report_service_provider_store()
140 kfree(report->desc.service_provider); in tsm_report_service_provider_store()
142 report->desc.service_provider = sp; in tsm_report_service_provider_store()
151 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_service_guid_store() local
155 rc = try_advance_write_generation(report); in tsm_report_service_guid_store()
159 report->desc.service_guid = guid_null; in tsm_report_service_guid_store()
161 rc = guid_parse(buf, &report->desc.service_guid); in tsm_report_service_guid_store()
172 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_service_manifest_version_store() local
181 rc = try_advance_write_generation(report); in tsm_report_service_manifest_version_store()
184 report->desc.service_manifest_version = val; in tsm_report_service_manifest_version_store()
193 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_inblob_write() local
197 rc = try_advance_write_generation(report); in tsm_report_inblob_write()
201 report->desc.inblob_len = count; in tsm_report_inblob_write()
202 memcpy(report->desc.inblob, buf, count); in tsm_report_inblob_write()
209 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_generation_show() local
210 struct tsm_report_state *state = to_state(report); in tsm_report_generation_show()
224 static ssize_t __read_report(struct tsm_report *report, void *buf, size_t count, in __read_report() argument
232 out = report->outblob; in __read_report()
233 len = report->outblob_len; in __read_report()
235 out = report->manifestblob; in __read_report()
236 len = report->manifestblob_len; in __read_report()
238 out = report->auxblob; in __read_report()
239 len = report->auxblob_len; in __read_report()
251 static ssize_t read_cached_report(struct tsm_report *report, void *buf, in read_cached_report() argument
254 struct tsm_report_state *state = to_state(report); in read_cached_report()
257 if (!report->desc.inblob_len) in read_cached_report()
264 if (!report->outblob || in read_cached_report()
268 return __read_report(report, buf, count, select); in read_cached_report()
271 static ssize_t tsm_report_read(struct tsm_report *report, void *buf, in tsm_report_read() argument
274 struct tsm_report_state *state = to_state(report); in tsm_report_read()
279 rc = read_cached_report(report, buf, count, select); in tsm_report_read()
288 if (!report->desc.inblob_len) in tsm_report_read()
292 if (report->outblob && in tsm_report_read()
296 kvfree(report->outblob); in tsm_report_read()
297 kvfree(report->auxblob); in tsm_report_read()
298 kvfree(report->manifestblob); in tsm_report_read()
299 report->outblob = NULL; in tsm_report_read()
300 report->auxblob = NULL; in tsm_report_read()
301 report->manifestblob = NULL; in tsm_report_read()
302 rc = ops->report_new(report, provider.data); in tsm_report_read()
307 return __read_report(report, buf, count, select); in tsm_report_read()
313 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_outblob_read() local
315 return tsm_report_read(report, buf, count, TSM_REPORT); in tsm_report_outblob_read()
322 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_auxblob_read() local
324 return tsm_report_read(report, buf, count, TSM_CERTS); in tsm_report_auxblob_read()
331 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_manifestblob_read() local
333 return tsm_report_read(report, buf, count, TSM_MANIFEST); in tsm_report_manifestblob_read()
358 struct tsm_report *report = to_tsm_report(cfg); in tsm_report_item_release() local
359 struct tsm_report_state *state = to_state(report); in tsm_report_item_release()
361 kvfree(report->manifestblob); in tsm_report_item_release()
362 kvfree(report->auxblob); in tsm_report_item_release()
363 kvfree(report->outblob); in tsm_report_item_release()
364 kfree(report->desc.service_provider); in tsm_report_item_release()