On 09/11/2015 05:21 PM, Ahmed, Safayet (GE Global Research) wrote:
> The current bleeding-edge version of TBOOT contains a fix for a 
> stack-overflow problem that was present in the code you cited:
>
> http://sourceforge.net/p/tboot/code/ci/a21e913550866591ba838d49fb3aed43b2f6aadd/tree//tboot/common/printk.c?diff=9040e000ccc4cd85fe8e34616f21e0207808604a
>
> The resulting overflow would overwrite strings in the .rodata section of 
> TBOOT memory. I'm wondering if this was the cause of the hangs.

Hmm, well that certainly sounds like a nasty problem. We were curious 
about the gigantic buffer on the stack in that routine. It seems the BSP 
stack size is still not big enough even with this patch?

I will try these fixes out, thanks for pointing that out. I suspect we 
may have another problem though. The previous terminating condition was 
correctly wrapping the log in memlog_write. It seems the new logic for 
whether to try to zip does not provide a correct terminating condition 
and the zipping could overflow the log. This is consistent with our 
problem only showing up on resume from S3 since in this case we are 
adding even more to the buffer that is still present from before S3. 
Anyway, needs more investigation...

Thanks

>
> -----Original Message-----
> From: Ross Philipson [mailto:ross.philip...@gmail.com]
> Sent: Friday, September 11, 2015 5:16 PM
> To: tboot-devel@lists.sourceforge.net
> Subject: Re: [tboot-devel] TBOOT 1.8.3 fails to resume from S3
>
> On 09/10/2015 03:35 PM, Ross Philipson wrote:
>> I have been working on moving our project from TBOOT 1.7.0 to 1.8.3. I
>> have discovered that while our 1.7.0 version of TBOOT resumes from S3
>> just fine, 1.8.3 does not.
>>
>> The most common symptom seems to be a hang just after TBOOT enters SMX
>> mode. The hang happens at different places so I don't think it is one
>> specific thing that TBOOT is doing to cause the hang. The hang can be
>> short (on the order of seconds) or longs (several minutes). Then
>> suddenly the platform will "unhang". It looks like the platform
>> restarts quickly and goes right back in to TBOOT but it is a little
>> hard to tell exactly what happens right around this point. We see this
>> on every system we have tried it on.
>>
>> I have backed all our patches out and I still see the problem with a
>> clean 1.8.3 code base. I have also tried using TBOOT with a Debian
>> Jessie install and I get similar problems there. I have been comparing
>> the code between the version and have so far not found anything that
>> makes a difference.
>>
>> Any help in this matter is appreciated.
>> Thanks
>
> I spent some time tracking this down today. If I build without these two 
> patches, I no longer get a hang on resume from S3:
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__hg.code.sf.net_p_tboot_code_rev_9040e000ccc4&d=BQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=lDSLRzn8YUPmwjLuy9Ek9Dy-T15T3uK505eKqf1EFfg&m=LAxK0DGQNQEDu2T5Lov2U5XNSelVt93H8xUJDDWj864&s=pJ6y0vwTNPdTGh85FoFOBH4j9WSTx-I4p0Ncr3n1i1I&e=
> https://urldefense.proofpoint.com/v2/url?u=http-3A__hg.code.sf.net_p_tboot_code_rev_78713e04bdd9&d=BQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=lDSLRzn8YUPmwjLuy9Ek9Dy-T15T3uK505eKqf1EFfg&m=LAxK0DGQNQEDu2T5Lov2U5XNSelVt93H8xUJDDWj864&s=eszD9yhtQidHK6kMeMRcXUsjs_0u_frsAZENAWez6zA&e=
>
> I have not identified the exact cause yet but I wanted to get these results 
> posted to the list.
>
> Thanks
>
> --
> Ross Philipson
>
> ------------------------------------------------------------------------------
> _______________________________________________
> tboot-devel mailing list
> tboot-devel@lists.sourceforge.net
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_tboot-2Ddevel&d=BQICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=lDSLRzn8YUPmwjLuy9Ek9Dy-T15T3uK505eKqf1EFfg&m=LAxK0DGQNQEDu2T5Lov2U5XNSelVt93H8xUJDDWj864&s=UHGtkbuNtbT5_PcWwQKBwJ9kDfHkcpd_iF23GT8LCmg&e=
>


-- 
Ross Philipson

------------------------------------------------------------------------------
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to