1313#include <linux/configfs.h>
1414
1515static struct tsm_provider {
16- const struct tsm_ops * ops ;
16+ const struct tsm_report_ops * ops ;
1717 void * data ;
1818} provider ;
1919static DECLARE_RWSEM (tsm_rwsem );
@@ -98,7 +98,7 @@ static ssize_t tsm_report_privlevel_store(struct config_item *cfg,
9898 * SEV-SNP GHCB) and a minimum of a TSM selected floor value no less
9999 * than 0.
100100 */
101- if (provider .ops -> privlevel_floor > val || val > TSM_PRIVLEVEL_MAX )
101+ if (provider .ops -> privlevel_floor > val || val > TSM_REPORT_PRIVLEVEL_MAX )
102102 return - EINVAL ;
103103
104104 guard (rwsem_write )(& tsm_rwsem );
@@ -202,7 +202,7 @@ static ssize_t tsm_report_inblob_write(struct config_item *cfg,
202202 memcpy (report -> desc .inblob , buf , count );
203203 return count ;
204204}
205- CONFIGFS_BIN_ATTR_WO (tsm_report_ , inblob , NULL , TSM_INBLOB_MAX );
205+ CONFIGFS_BIN_ATTR_WO (tsm_report_ , inblob , NULL , TSM_REPORT_INBLOB_MAX );
206206
207207static ssize_t tsm_report_generation_show (struct config_item * cfg , char * buf )
208208{
@@ -272,7 +272,7 @@ static ssize_t tsm_report_read(struct tsm_report *report, void *buf,
272272 size_t count , enum tsm_data_select select )
273273{
274274 struct tsm_report_state * state = to_state (report );
275- const struct tsm_ops * ops ;
275+ const struct tsm_report_ops * ops ;
276276 ssize_t rc ;
277277
278278 /* try to read from the existing report if present and valid... */
@@ -314,7 +314,7 @@ static ssize_t tsm_report_outblob_read(struct config_item *cfg, void *buf,
314314
315315 return tsm_report_read (report , buf , count , TSM_REPORT );
316316}
317- CONFIGFS_BIN_ATTR_RO (tsm_report_ , outblob , NULL , TSM_OUTBLOB_MAX );
317+ CONFIGFS_BIN_ATTR_RO (tsm_report_ , outblob , NULL , TSM_REPORT_OUTBLOB_MAX );
318318
319319static ssize_t tsm_report_auxblob_read (struct config_item * cfg , void * buf ,
320320 size_t count )
@@ -323,7 +323,7 @@ static ssize_t tsm_report_auxblob_read(struct config_item *cfg, void *buf,
323323
324324 return tsm_report_read (report , buf , count , TSM_CERTS );
325325}
326- CONFIGFS_BIN_ATTR_RO (tsm_report_ , auxblob , NULL , TSM_OUTBLOB_MAX );
326+ CONFIGFS_BIN_ATTR_RO (tsm_report_ , auxblob , NULL , TSM_REPORT_OUTBLOB_MAX );
327327
328328static ssize_t tsm_report_manifestblob_read (struct config_item * cfg , void * buf ,
329329 size_t count )
@@ -332,7 +332,7 @@ static ssize_t tsm_report_manifestblob_read(struct config_item *cfg, void *buf,
332332
333333 return tsm_report_read (report , buf , count , TSM_MANIFEST );
334334}
335- CONFIGFS_BIN_ATTR_RO (tsm_report_ , manifestblob , NULL , TSM_OUTBLOB_MAX );
335+ CONFIGFS_BIN_ATTR_RO (tsm_report_ , manifestblob , NULL , TSM_REPORT_OUTBLOB_MAX );
336336
337337static struct configfs_attribute * tsm_report_attrs [] = {
338338 [TSM_REPORT_GENERATION ] = & tsm_report_attr_generation ,
@@ -448,9 +448,9 @@ static struct configfs_subsystem tsm_configfs = {
448448 .su_mutex = __MUTEX_INITIALIZER (tsm_configfs .su_mutex ),
449449};
450450
451- int tsm_register (const struct tsm_ops * ops , void * priv )
451+ int tsm_report_register (const struct tsm_report_ops * ops , void * priv )
452452{
453- const struct tsm_ops * conflict ;
453+ const struct tsm_report_ops * conflict ;
454454
455455 guard (rwsem_write )(& tsm_rwsem );
456456 conflict = provider .ops ;
@@ -463,9 +463,9 @@ int tsm_register(const struct tsm_ops *ops, void *priv)
463463 provider .data = priv ;
464464 return 0 ;
465465}
466- EXPORT_SYMBOL_GPL (tsm_register );
466+ EXPORT_SYMBOL_GPL (tsm_report_register );
467467
468- int tsm_unregister (const struct tsm_ops * ops )
468+ int tsm_report_unregister (const struct tsm_report_ops * ops )
469469{
470470 guard (rwsem_write )(& tsm_rwsem );
471471 if (ops != provider .ops )
@@ -474,11 +474,11 @@ int tsm_unregister(const struct tsm_ops *ops)
474474 provider .data = NULL ;
475475 return 0 ;
476476}
477- EXPORT_SYMBOL_GPL (tsm_unregister );
477+ EXPORT_SYMBOL_GPL (tsm_report_unregister );
478478
479479static struct config_group * tsm_report_group ;
480480
481- static int __init tsm_init (void )
481+ static int __init tsm_report_init (void )
482482{
483483 struct config_group * root = & tsm_configfs .su_group ;
484484 struct config_group * tsm ;
@@ -499,14 +499,14 @@ static int __init tsm_init(void)
499499
500500 return 0 ;
501501}
502- module_init (tsm_init );
502+ module_init (tsm_report_init );
503503
504- static void __exit tsm_exit (void )
504+ static void __exit tsm_report_exit (void )
505505{
506506 configfs_unregister_default_group (tsm_report_group );
507507 configfs_unregister_subsystem (& tsm_configfs );
508508}
509- module_exit (tsm_exit );
509+ module_exit (tsm_report_exit );
510510
511511MODULE_LICENSE ("GPL" );
512512MODULE_DESCRIPTION ("Provide Trusted Security Module attestation reports via configfs" );
0 commit comments