This is an initial RFC patch set to investigate supporting a draft TCG standard for an attestation measurement list in TLV (Type-Length-Value) binary format. TLV formatted lists are simple to generate and parse, and flexible for adding new fields. The primary goal of the patch set is to validate the draft standard design/specification with working compatible code. A second goal of the patch set is to test the more radical idea of being able to copy the measurement list data out of the kernel. The data is verifiable with the TPM PCR value, and need not be kept in kernel memory. In some cases, this "memory leak" can grow large enough to cause issues, and this is a test of a potential way to solve that problem. A third goal is to test the idea of using the flexibility of the TLV format to extend IMA attestation to include additional metadata fields, such as a file's owner, group, mode, and security labels, the timestamp of the measurement, and a sequence number, to simplify list management. Patch 1/2 adds no new features, refactoring the existing template specific code into separate files, to simplify the addition of TLV support. Patch 2/2 add the code to support the TLV format. Feedback is appreciated. Dave Safford <david.safford@xxxxxx>