[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <D5BR1YBPGPWG.28WTN4GE8V87N@kernel.org>
Date: Sat, 02 Nov 2024 16:07:04 +0200
From: "Jarkko Sakkinen" <jarkko@...nel.org>
To: "Jarkko Sakkinen" <jarkko@...nel.org>, "Ard Biesheuvel"
<ardb@...nel.org>
Cc: "Jonathan Corbet" <corbet@....net>, "Peter Huewe" <peterhuewe@....de>,
"Jason Gunthorpe" <jgg@...pe.ca>, <James.Bottomley@...senpartnership.com>,
<andrew.cooper3@...rix.com>, <baolu.lu@...ux.intel.com>, <bp@...en8.de>,
<dave.hansen@...ux.intel.com>, <davem@...emloft.net>,
<dpsmith@...rtussolutions.com>, <dwmw2@...radead.org>,
<ebiederm@...ssion.com>, <herbert@...dor.apana.org.au>, <hpa@...or.com>,
<iommu@...ts.linux-foundation.org>, <kanth.ghatraju@...cle.com>,
<kexec@...ts.infradead.org>, <linux-crypto@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <linux-efi@...r.kernel.org>,
<linux-integrity@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<luto@...capital.net>, <mingo@...hat.com>, <mjg59@...f.ucam.org>,
<nivedita@...m.mit.edu>, <ross.philipson@...cle.com>, <tglx@...utronix.de>,
<trenchboot-devel@...glegroups.com>, <x86@...nel.org>
Subject: Re: [RFC PATCH v2 1/2] tpm, tpm_tis: Introduce TPM_IOC_SET_LOCALITY
On Sat Nov 2, 2024 at 3:39 PM EET, Jarkko Sakkinen wrote:
> int tpm_chip_set_locality(struct tpm_chip *chip, u8 locality)
> {
> int ret;
>
> if (locality >= TPM_MAX_LOCALITY)
> return false;
>
> ret = tpm_try_get_ops(chip);
> if (ret)
> return ret;
>
> chip->default_locality = locality;
>
> tpm_put_ops(chip);
> return 0;
> }
> EXPORT_SYMBOL_GPL(tpm_chip_set_locality);
Other things to take from 1/2 of my RFC to this:
1. Must be one-shot.
2. Must be only for tpm_tis as this is made to work only with that
driver. E.g. 15/20 is only for tpm_tis. I guess that is the
main target anyway here. Future patch sets can extend this to
other drivers.
TPM_CHIP_FLAG_SET_LOCALITY_ENABLED use in 1/2 can be referenced
for a solution.
Kernel command-line parameter: I agree not having it if no need
for ioctl, so that is addressed too.
BR, Jarkko
Powered by blists - more mailing lists