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: <20110120154603.2bdf5d9b@alice>
Date:	Thu, 20 Jan 2011 15:46:03 +0100
From:	Michal Schmidt <mschmidt@...hat.com>
To:	jmorris@...ei.org
Cc:	Rajiv Andrade <srajiv@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, eparis@...hat.com
Subject: Re: [PATCH] TPM: Long default timeout fix

James,

what is the status of this patch from Rajiv? It has been in Fedora
kernels for some time, but I do not see it applied upstream:

On Fri, 12 Nov 2010 19:18:50 -0200 Rajiv Andrade wrote:
> If duration variable value is 0 at this point, it's because
> chip->vendor.duration wasn't filled by tpm_get_timeouts() yet.
> This patch sets then the lowest timeout just to give enough
> time for tpm_get_timeouts() to further succeed.
> 
> This fix avoids long boot times in case another entity attempts
> to send commands to the TPM when the TPM isn't accessible.
> 
> Signed-off-by: Rajiv Andrade <srajiv@...ux.vnet.ibm.com>
> ---
>  drivers/char/tpm/tpm.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
> index 7c41335..5635ac0 100644
> --- a/drivers/char/tpm/tpm.c
> +++ b/drivers/char/tpm/tpm.c
> @@ -364,12 +364,14 @@ unsigned long tpm_calc_ordinal_duration(struct
> tpm_chip *chip, tpm_protected_ordinal_duration[ordinal &
>  						   TPM_PROTECTED_ORDINAL_MASK];
>  
> -	if (duration_idx != TPM_UNDEFINED)
> +	if (duration_idx != TPM_UNDEFINED) {
>  		duration = chip->vendor.duration[duration_idx];
> -	if (duration <= 0)
> +		/* if duration is 0, it's because
> chip->vendor.duration wasn't */
> +		/* filled yet, so we set the lowest timeout just to
> give enough */
> +		/* time for tpm_get_timeouts() to succeed */
> +		return (duration <= 0 ? HZ : duration);
> +	} else 
>  		return 2 * 60 * HZ;
> -	else
> -		return duration;
>  }
>  EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);
>  
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ