All of lore.kernel.org
 help / color / mirror / Atom feed
* Suspend/Resume issue in 4.8-rc8
@ 2016-10-10  6:36 Genki Marshall
  2016-10-10 12:07 ` Jarkko Sakkinen
  2016-10-11 11:41   ` Jarkko Sakkinen
  0 siblings, 2 replies; 7+ messages in thread
From: Genki Marshall @ 2016-10-10  6:36 UTC (permalink / raw)
  To: Jason Gunthorpe, Peter Huewe, Marcel Selhorst, Jarkko Sakkinen,
	tpmdd-devel
  Cc: linux-kernel

  Hello,

On 4.8-rc8, I'm having an issue with laptop suspend/resume for the
Chromebook Pixel (2015). Specifically:

When on commit 24532f7 on Linus's tree (latest commit at time of
writing) I'm having the following issue happen consistently:

1. Close lid.
2. Wait for CPU to wind down and laptop lid's light to go off.
3. Open lid.
4. Observe that the computer is booting from scratch.

I noticed that 4.8-rc7 was working fine. Bisecting, I found 0c54133 to
be the commit at which this issue starts happening, which is a
patch to drivers/char/tpm/tpm-interface.c .

I confirmed this is still relevant as I can proceed to checkout
24532f7 again, do a git revert 0c54133, recompile, and the issue no
longer happens.

It's a very small patch. Looking through the code, it's strange, as it
seems to use the tpm_pcr_read_dev() helper correctly (to my totally
untrained eye).

In the version with 0c54133 _reverted_, when I make the values of 'rc'
be printed, recompile, and then resume my laptop (which again, it does
successfully), I see the values go like:

  rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE, 0);
  /* rc == 30 here */
  ...
  rc = be32_to_cpu(cmd.header.out.return_code);
  /* rc == 0 here */

So it returns 0 correctly as expected. But tpm_transmit_cmd() looks
like it should do effectively the same thing (calling tpm_transmit()
then calling be32_to_cpu()), and it would just be that rc == 0 right
away. It started to be difficult to debug as I can't see the results
of prints when resuming on the broken tree (as it goes straight to
rebooting).

Anyway, I was advised on #kernel-newbies that at this point it would
be best to just email in like this. Let me know if it would be helpful
for me to answer/test anything.

  Genki

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume issue in 4.8-rc8
  2016-10-10  6:36 Suspend/Resume issue in 4.8-rc8 Genki Marshall
@ 2016-10-10 12:07 ` Jarkko Sakkinen
  2016-10-11 11:41   ` Jarkko Sakkinen
  1 sibling, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2016-10-10 12:07 UTC (permalink / raw)
  To: Genki Marshall
  Cc: Jason Gunthorpe, Peter Huewe, Marcel Selhorst, tpmdd-devel, linux-kernel

On Mon, Oct 10, 2016 at 02:36:43AM -0400, Genki Marshall wrote:
>   Hello,
> 
> On 4.8-rc8, I'm having an issue with laptop suspend/resume for the
> Chromebook Pixel (2015). Specifically:
> 
> When on commit 24532f7 on Linus's tree (latest commit at time of
> writing) I'm having the following issue happen consistently:
> 
> 1. Close lid.
> 2. Wait for CPU to wind down and laptop lid's light to go off.
> 3. Open lid.
> 4. Observe that the computer is booting from scratch.
> 
> I noticed that 4.8-rc7 was working fine. Bisecting, I found 0c54133 to
> be the commit at which this issue starts happening, which is a
> patch to drivers/char/tpm/tpm-interface.c .
> 
> I confirmed this is still relevant as I can proceed to checkout
> 24532f7 again, do a git revert 0c54133, recompile, and the issue no
> longer happens.
> 
> It's a very small patch. Looking through the code, it's strange, as it
> seems to use the tpm_pcr_read_dev() helper correctly (to my totally
> untrained eye).
> 
> In the version with 0c54133 _reverted_, when I make the values of 'rc'
> be printed, recompile, and then resume my laptop (which again, it does
> successfully), I see the values go like:
> 
>   rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE, 0);
>   /* rc == 30 here */
>   ...
>   rc = be32_to_cpu(cmd.header.out.return_code);
>   /* rc == 0 here */
> 
> So it returns 0 correctly as expected. But tpm_transmit_cmd() looks
> like it should do effectively the same thing (calling tpm_transmit()
> then calling be32_to_cpu()), and it would just be that rc == 0 right
> away. It started to be difficult to debug as I can't see the results
> of prints when resuming on the broken tree (as it goes straight to
> rebooting).
> 
> Anyway, I was advised on #kernel-newbies that at this point it would
> be best to just email in like this. Let me know if it would be helpful
> for me to answer/test anything.

Sure. Thank you for sending this and taking time to provide a detailed
description. I'll come back to this ASAP.

>   Genki

Email is fine. I also try to track bugzilla.kernel.org for TPM related
bugs.

/Jarkko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume issue in 4.8-rc8
@ 2016-10-11 11:41   ` Jarkko Sakkinen
  0 siblings, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2016-10-11 11:41 UTC (permalink / raw)
  To: Genki Marshall
  Cc: Jason Gunthorpe, Peter Huewe, Marcel Selhorst, tpmdd-devel, linux-kernel

On Mon, Oct 10, 2016 at 02:36:43AM -0400, Genki Marshall wrote:
>   Hello,
> 
> On 4.8-rc8, I'm having an issue with laptop suspend/resume for the
> Chromebook Pixel (2015). Specifically:
> 
> When on commit 24532f7 on Linus's tree (latest commit at time of
> writing) I'm having the following issue happen consistently:
> 
> 1. Close lid.
> 2. Wait for CPU to wind down and laptop lid's light to go off.
> 3. Open lid.
> 4. Observe that the computer is booting from scratch.
> 
> I noticed that 4.8-rc7 was working fine. Bisecting, I found 0c54133 to
> be the commit at which this issue starts happening, which is a
> patch to drivers/char/tpm/tpm-interface.c .
> 
> I confirmed this is still relevant as I can proceed to checkout
> 24532f7 again, do a git revert 0c54133, recompile, and the issue no
> longer happens.
> 
> It's a very small patch. Looking through the code, it's strange, as it
> seems to use the tpm_pcr_read_dev() helper correctly (to my totally
> untrained eye).
> 
> In the version with 0c54133 _reverted_, when I make the values of 'rc'
> be printed, recompile, and then resume my laptop (which again, it does
> successfully), I see the values go like:
> 
>   rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE, 0);
>   /* rc == 30 here */
>   ...
>   rc = be32_to_cpu(cmd.header.out.return_code);
>   /* rc == 0 here */
> 
> So it returns 0 correctly as expected. But tpm_transmit_cmd() looks
> like it should do effectively the same thing (calling tpm_transmit()
> then calling be32_to_cpu()), and it would just be that rc == 0 right
> away. It started to be difficult to debug as I can't see the results
> of prints when resuming on the broken tree (as it goes straight to
> rebooting).
> 
> Anyway, I was advised on #kernel-newbies that at this point it would
> be best to just email in like this. Let me know if it would be helpful
> for me to answer/test anything.

The commit is not in 4.8:

jsakkine at jsakkine-mobl1 in ~/projects/tpm2/git/linux-torvalds
(master) 
$ git describe --contains 0c54133    
fatal: cannot describe '0c541332231e7957f23013e37f3720db33e7804c'

It's in fact part of my 4.9 PR:

https://lkml.org/lkml/2016/9/15/333

I think the issue is this:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/65da72b7ddcdd8990e4783d09c7e86d90ccb4121

I've sent a PR containing this fix to James Morris but AFAIK he
hasn't yet pulled it so you either have to stick to 4.8 kernel or
apply this fix manually.

Hope this helps.

/Jarkko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume issue in 4.8-rc8
@ 2016-10-11 11:41   ` Jarkko Sakkinen
  0 siblings, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2016-10-11 11:41 UTC (permalink / raw)
  To: Genki Marshall
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Mon, Oct 10, 2016 at 02:36:43AM -0400, Genki Marshall wrote:
>   Hello,
> 
> On 4.8-rc8, I'm having an issue with laptop suspend/resume for the
> Chromebook Pixel (2015). Specifically:
> 
> When on commit 24532f7 on Linus's tree (latest commit at time of
> writing) I'm having the following issue happen consistently:
> 
> 1. Close lid.
> 2. Wait for CPU to wind down and laptop lid's light to go off.
> 3. Open lid.
> 4. Observe that the computer is booting from scratch.
> 
> I noticed that 4.8-rc7 was working fine. Bisecting, I found 0c54133 to
> be the commit at which this issue starts happening, which is a
> patch to drivers/char/tpm/tpm-interface.c .
> 
> I confirmed this is still relevant as I can proceed to checkout
> 24532f7 again, do a git revert 0c54133, recompile, and the issue no
> longer happens.
> 
> It's a very small patch. Looking through the code, it's strange, as it
> seems to use the tpm_pcr_read_dev() helper correctly (to my totally
> untrained eye).
> 
> In the version with 0c54133 _reverted_, when I make the values of 'rc'
> be printed, recompile, and then resume my laptop (which again, it does
> successfully), I see the values go like:
> 
>   rc = tpm_transmit(chip, (u8 *) &cmd, READ_PCR_RESULT_SIZE, 0);
>   /* rc == 30 here */
>   ...
>   rc = be32_to_cpu(cmd.header.out.return_code);
>   /* rc == 0 here */
> 
> So it returns 0 correctly as expected. But tpm_transmit_cmd() looks
> like it should do effectively the same thing (calling tpm_transmit()
> then calling be32_to_cpu()), and it would just be that rc == 0 right
> away. It started to be difficult to debug as I can't see the results
> of prints when resuming on the broken tree (as it goes straight to
> rebooting).
> 
> Anyway, I was advised on #kernel-newbies that at this point it would
> be best to just email in like this. Let me know if it would be helpful
> for me to answer/test anything.

The commit is not in 4.8:

jsakkine at jsakkine-mobl1 in ~/projects/tpm2/git/linux-torvalds
(master) 
$ git describe --contains 0c54133    
fatal: cannot describe '0c541332231e7957f23013e37f3720db33e7804c'

It's in fact part of my 4.9 PR:

https://lkml.org/lkml/2016/9/15/333

I think the issue is this:

http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/65da72b7ddcdd8990e4783d09c7e86d90ccb4121

I've sent a PR containing this fix to James Morris but AFAIK he
hasn't yet pulled it so you either have to stick to 4.8 kernel or
apply this fix manually.

Hope this helps.

/Jarkko

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume issue in 4.8-rc8
       [not found]   ` <20161011114122.GA25108-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
@ 2016-10-14  5:02     ` Genki Marshall
  2016-10-14 11:53         ` Jarkko Sakkinen
  0 siblings, 1 reply; 7+ messages in thread
From: Genki Marshall @ 2016-10-14  5:02 UTC (permalink / raw)
  To: Jarkko Sakkinen
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Quoting Jarkko Sakkinen (2016-10-11 07:41:22)
> The commit is not in 4.8:
>
> jsakkine at jsakkine-mobl1 in ~/projects/tpm2/git/linux-torvalds
> (master)
> $ git describe --contains 0c54133
> fatal: cannot describe '0c541332231e7957f23013e37f3720db33e7804c'
>
> It's in fact part of my 4.9 PR:
>
> https://lkml.org/lkml/2016/9/15/333

Ah, I see, apologies. So, it is/was in the range between v4.8-rc8 and
Linus's tree's HEAD and I mixed the two when I was looking into it.

> I think the issue is this:
>
> http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/65da72b7ddcdd8990e4783d09c7e86d90ccb4121
>
> I've sent a PR containing this fix to James Morris but AFAIK he
> hasn't yet pulled it so you either have to stick to 4.8 kernel or
> apply this fix manually.
>
> Hope this helps.

It does very much, thanks. I applied the patch and it resolves the
issue on my machine.

> /Jarkko

-----
genki

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume issue in 4.8-rc8
@ 2016-10-14 11:53         ` Jarkko Sakkinen
  0 siblings, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2016-10-14 11:53 UTC (permalink / raw)
  To: Genki Marshall
  Cc: Jason Gunthorpe, Peter Huewe, Marcel Selhorst, tpmdd-devel, linux-kernel

On Fri, Oct 14, 2016 at 01:02:20AM -0400, Genki Marshall wrote:
> Quoting Jarkko Sakkinen (2016-10-11 07:41:22)
> > The commit is not in 4.8:
> >
> > jsakkine at jsakkine-mobl1 in ~/projects/tpm2/git/linux-torvalds
> > (master)
> > $ git describe --contains 0c54133
> > fatal: cannot describe '0c541332231e7957f23013e37f3720db33e7804c'
> >
> > It's in fact part of my 4.9 PR:
> >
> > https://lkml.org/lkml/2016/9/15/333
> 
> Ah, I see, apologies. So, it is/was in the range between v4.8-rc8 and
> Linus's tree's HEAD and I mixed the two when I was looking into it.
> 
> > I think the issue is this:
> >
> > http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/65da72b7ddcdd8990e4783d09c7e86d90ccb4121
> >
> > I've sent a PR containing this fix to James Morris but AFAIK he
> > hasn't yet pulled it so you either have to stick to 4.8 kernel or
> > apply this fix manually.
> >
> > Hope this helps.
> 
> It does very much, thanks. I applied the patch and it resolves the
> issue on my machine.

Good to hear!

/Jarkko

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Suspend/Resume issue in 4.8-rc8
@ 2016-10-14 11:53         ` Jarkko Sakkinen
  0 siblings, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2016-10-14 11:53 UTC (permalink / raw)
  To: Genki Marshall
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Fri, Oct 14, 2016 at 01:02:20AM -0400, Genki Marshall wrote:
> Quoting Jarkko Sakkinen (2016-10-11 07:41:22)
> > The commit is not in 4.8:
> >
> > jsakkine at jsakkine-mobl1 in ~/projects/tpm2/git/linux-torvalds
> > (master)
> > $ git describe --contains 0c54133
> > fatal: cannot describe '0c541332231e7957f23013e37f3720db33e7804c'
> >
> > It's in fact part of my 4.9 PR:
> >
> > https://lkml.org/lkml/2016/9/15/333
> 
> Ah, I see, apologies. So, it is/was in the range between v4.8-rc8 and
> Linus's tree's HEAD and I mixed the two when I was looking into it.
> 
> > I think the issue is this:
> >
> > http://git.infradead.org/users/jjs/linux-tpmdd.git/commit/65da72b7ddcdd8990e4783d09c7e86d90ccb4121
> >
> > I've sent a PR containing this fix to James Morris but AFAIK he
> > hasn't yet pulled it so you either have to stick to 4.8 kernel or
> > apply this fix manually.
> >
> > Hope this helps.
> 
> It does very much, thanks. I applied the patch and it resolves the
> issue on my machine.

Good to hear!

/Jarkko

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-10-14 11:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10  6:36 Suspend/Resume issue in 4.8-rc8 Genki Marshall
2016-10-10 12:07 ` Jarkko Sakkinen
2016-10-11 11:41 ` Jarkko Sakkinen
2016-10-11 11:41   ` Jarkko Sakkinen
     [not found]   ` <20161011114122.GA25108-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-10-14  5:02     ` Genki Marshall
2016-10-14 11:53       ` Jarkko Sakkinen
2016-10-14 11:53         ` Jarkko Sakkinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.