lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <291d5cbe-428c-4361-ba14-f1d3a01d1ce6@arm.com>
Date: Thu, 13 Feb 2025 16:23:58 -0600
From: Stuart Yoder <stuart.yoder@....com>
To: Jarkko Sakkinen <jarkko@...nel.org>
Cc: linux-integrity@...r.kernel.org, peterhuewe@....de, jgg@...pe.ca,
 sudeep.holla@....com, rafael@...nel.org, lenb@...nel.org,
 linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/5] tpm_crb: refactor check for idle support into TPM
 into inline function



On 2/13/25 4:13 PM, Jarkko Sakkinen wrote:
> On Wed, Feb 12, 2025 at 04:05:45PM -0600, Stuart Yoder wrote:
>> Refactor the two checks for whether the TPM supports idle into a single
>> inline function.
>>
>> Signed-off-by: Stuart Yoder <stuart.yoder@....com>
>> ---
>>   drivers/char/tpm/tpm_crb.c | 18 ++++++++++++------
>>   1 file changed, 12 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
>> index ea085b14ab7c..87d69e990249 100644
>> --- a/drivers/char/tpm/tpm_crb.c
>> +++ b/drivers/char/tpm/tpm_crb.c
>> @@ -115,6 +115,16 @@ struct tpm2_crb_pluton {
>>   	u64 reply_addr;
>>   };
>>   
>> +static inline bool does_tpm_support_idle(u32 start_method)
>> +{
>> +	if ((start_method == ACPI_TPM2_START_METHOD) ||
>> +	    (start_method == ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD) ||
>> +	    (start_method == ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC))
>> +		return false;
>> +	else
>> +		return true;
>> +}
>> +
> 
> I think we could also prefix tpm_crb stuff with tpm_crb_* for the sake
> of easier grepping etc.
> 
> So I'd propose this to be called as: tpm_crb_has_idle()

Ack.

Stuart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ