From: Emil Condrea <emilcondrea@gmail.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] vTPM: Fix Atmel timeout bug.
Date: Fri, 7 Nov 2014 12:45:54 +0200 [thread overview]
Message-ID: <CAAULxKKT7RBxbG+03wcK-PGUCVF4eG55pQkHjEuFZA6v30FOng@mail.gmail.com> (raw)
In-Reply-To: <545BEFC5.3010803@tycho.nsa.gov>
[-- Attachment #1.1: Type: text/plain, Size: 2374 bytes --]
Daniel,
So, is the patch going to be approved(adjusting all short timeouts) or it
needs to be modified?
On Fri, Nov 7, 2014 at 12:01 AM, Daniel De Graaf <dgdegra@tycho.nsa.gov>
wrote:
> On 11/04/2014 05:15 AM, Ian Campbell wrote:
>
>> On Thu, 2014-10-30 at 15:48 +0200, Emil Condrea wrote:
>>
>>> Of course we can use max, but I thought that it might be useful to
>>> have a prink to inform the user that the timeout was adjusted.
>>> In init_tpm_tis the default timeouts are set using:
>>> /* Set default timeouts */ tpm->timeout_a =
>>> MILLISECS(TIS_SHORT_TIMEOUT);//750*1000000UL tpm->timeout_b =
>>> MILLISECS(TIS_LONG_TIMEOUT);//2000*1000000UL tpm->timeout_c =
>>> MILLISECS(TIS_SHORT_TIMEOUT); tpm->timeout_d =
>>> MILLISECS(TIS_SHORT_TIMEOUT);
>>>
>>>
>>>
>>> But in kernel fix they are set as 750*1000 instead of 750*1000000UL :
>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/
>>> linux.git/tree/drivers/char/tpm/tpm_tis.c#n381
>>> So if we want to integrate kernel changes I think we should use
>>> MICROSECS(TIS_SHORT_TIMEOUT) which is 750000
>>> Also in kernel the default timeouts are initialized using
>>> msecs_to_jiffies which is different from MILLISECS
>>> macro.: https://git.kernel.org/cgit/linux/kernel/git/torvalds/
>>> linux.git/tree/drivers/char/tpm/tpm_tis.c#n548
>>> Is there a certain reason for not using msecs_to_jiffies ?
>>>
>>
>> jiffies are a Linux specific concept which mini-os doesn't share.
>>
>> Daniel, do you have any opinion on this patch?
>>
>> It seems like the Linux fix is made only for the specifically broken
>> platform. That seems to make sense to me since presumably other systems
>> report short timeouts which they can indeed cope with. It's only Atmel
>> which brokenly reports something it cannot handle.
>>
>> Ian.
>>
>
> I agree that an adjustment is needed when values are too short. Adjusting
> in all cases is not quite as nice as only fixing the broken TPMs, but it
> is a lot simpler. It also doesn't seem harmful to have the timeouts be
> too large in the driver: a properly functioning TPM will not time out its
> requests in any case, so the user won't notice normally, and the default
> short timeout is 0.75 seconds - very few people will complain if they have
> to wait that long to get a timeout instead of what their TPM actually uses.
>
> --
> Daniel De Graaf
> National Security Agency
>
[-- Attachment #1.2: Type: text/html, Size: 3439 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-11-07 10:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-30 13:05 [PATCH] vTPM: Fix Atmel timeout bug Emil Condrea
2014-10-30 12:58 ` Andrew Cooper
2014-10-30 13:48 ` Emil Condrea
2014-11-04 10:15 ` Ian Campbell
2014-11-06 22:01 ` Daniel De Graaf
2014-11-07 10:45 ` Emil Condrea [this message]
2014-11-10 12:01 ` Ian Campbell
2014-11-10 14:35 ` Konrad Rzeszutek Wilk
2014-11-14 10:34 ` Ian Campbell
2014-11-10 22:10 ` Daniel De Graaf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAULxKKT7RBxbG+03wcK-PGUCVF4eG55pQkHjEuFZA6v30FOng@mail.gmail.com \
--to=emilcondrea@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).