Re: [PATCH v7 12/21] tpm: Add NULL primary creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2024-02-23 at 17:51 +0200, Jarkko Sakkinen wrote:
> On Tue Feb 13, 2024 at 7:13 PM EET, James Bottomley wrote:
[...]
> > --- a/drivers/char/tpm/tpm.h
> > +++ b/drivers/char/tpm/tpm.h
> > @@ -321,4 +321,14 @@ void tpm_bios_log_setup(struct tpm_chip
> > *chip);
> >  void tpm_bios_log_teardown(struct tpm_chip *chip);
> >  int tpm_dev_common_init(void);
> >  void tpm_dev_common_exit(void);
> > +
> > +#ifdef CONFIG_TCG_TPM2_HMAC
> > +int tpm2_sessions_init(struct tpm_chip *chip);
> 
> I'm sorry but "sessions" and "init" are the worst possible
> terminology I could every pick when trying to make a function that
> self-documents itself :-)

About 95% of the kernel that run initialization routines are suffixed
_init. The TCG documents that describe how to effect HMAC and
encryption of commands call the entities used to do this "sessions".
You can argue they should have chosen a better name, but given it's the
name they chose, we have to use it to avoid confusion.

> I'd like to see here well-scoped name so that it is easy to connect
> this to its purpose when reviewing some other patches.

It's purpose is to initialize the sessions handling code in the tpm2-
sessions.c file; I'm not sure I could come up with anything as concise
for self description.


James





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux