On Sun, Jul 26, 2020 at 08:25:39PM -0700, James Bottomley wrote: > On Fri, 2020-07-24 at 09:57 +0300, Jarkko Sakkinen wrote: > > On Wed, Jul 22, 2020 at 08:57:39AM -0700, James Bottomley wrote: > > > use macro magic to create sysfs per hash groups with 24 PCR files > > > in > > > > 'Use' > > > > Please, just say what the patch does in plain English and dust the > > magic away. > > The reason for the macro magic comment is that there are 3 checkpatch > errors and one warning from this, all spurious, because checkpatch > doesn't understand the syntax of macros that create macros. > > > > them one for each possible agile hash of the TPM. The files are > > ~~ > > > > I'd prefer a single space. > > It's still listed in the style guides as best practice for monospaced > fonts, but at this point I've lost the will to care about it. > > > > plugged in to a read function which is TPM version agnostic, so > > > this works also for TPM 1.2 although the hash is only sha1 in that > > > case. For every hash the TPM supports, a group named pcr-<hash> is > > > created and each of the PCR read files placed under it. > > > > Yeah, the commit message is missing the statement what it does and > > goes straight away rationalizing "macro magic". > > OK so how about > > --- > Create sysfs per hash groups with 24 PCR files in them one group, named > pcr-<hash>, for each agile hash of the TPM. The files are plugged in > to a PCR read function which is TPM version agnostic, so this works > also for TPM 1.2 although the hash is only sha1 in that case. > > Note: the macros used to create the hashes emit spurious checkpatch > warnings. Do not try to "fix" them as checkpatch recommends otherwise > they'll break. > --- > > James > I'll check the latest version (saw it in patchwork). I just came back from vacation - sorry for the delay. /Jarkko