linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Proposal: rename tpm1_eventlog.c and tpm2_eventlog.c
@ 2017-10-24 22:21 Jarkko Sakkinen
  2017-10-25  8:43 ` Thiebaud Weksteen
  2017-10-30 18:34 ` Nayna Jain
  0 siblings, 2 replies; 6+ messages in thread
From: Jarkko Sakkinen @ 2017-10-24 22:21 UTC (permalink / raw)
  To: linux-security-module

I noticed when making slides for KS that the naming for event log stuff
that the naming is so broken that it is hard to understand the code.
Here it really would make sense to have a patch set just to clean up the
cruft.

Random examples of more senseful naming:

* tpm2_bios_measurements_start() should be rather something like
  tpm_eventlog_seq_agile_start().
* tpm_bios_measurements_start() should be rather something like
  tpm_eventlog_seq_sha1_start().

Corresponding structs would be tpm_eventlog_agile_seq_ops and
tpm_eventlog_sha1_seq_ops.

Finally, I would place the file operations, being so complicated, in
separate files:

* tpm_eventlog_seq_sha1.c
* tpm_eventlog_seq_eventlog.c

And move all the management code that is right now illogically located
in tpm1_eventlog.c to tpm_eventlog.c that would be the entry point for
the event log.

The code is laid out so badly right now that I have really hard time
understanding it if I haven't looked at it within last couple of weeks.
It's really a trainwreck at the moment. We must clean up it up fast.

Getting this done will help me to review patches to this area faster
so it would be a benefit for everyone. The current structure makes every
event log patch a pain to review.

/Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-30 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 22:21 Proposal: rename tpm1_eventlog.c and tpm2_eventlog.c Jarkko Sakkinen
2017-10-25  8:43 ` Thiebaud Weksteen
2017-10-25 13:18   ` Jarkko Sakkinen
2017-10-26 14:14     ` Jarkko Sakkinen
2017-10-27  9:13       ` Thiebaud Weksteen
2017-10-30 18:34 ` Nayna Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).