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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CS6TEW6NY7FJ.39VTQYTEN8FBH@suppilovahvero>
Date:   Wed, 26 Apr 2023 19:07:01 +0300
From:   "Jarkko Sakkinen" <jarkko@...nel.org>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     "Thorsten Leemhuis" <regressions@...mhuis.info>,
        "James Bottomley" <James.Bottomley@...senpartnership.com>,
        "Vlastimil Babka" <vbabka@...e.cz>,
        "Peter Huewe" <peterhuewe@....de>,
        "Jason Gunthorpe" <jgg@...pe.ca>, "Jan Dabros" <jsd@...ihalf.com>,
        <regressions@...ts.linux.dev>,
        "LKML" <linux-kernel@...r.kernel.org>,
        <linux-integrity@...r.kernel.org>,
        "Dominik Brodowski" <linux@...inikbrodowski.net>,
        "Herbert Xu" <herbert@...dor.apana.org.au>,
        "Linus Torvalds" <torvalds@...ux-foundation.org>,
        "Johannes Altmanninger" <aclopte@...il.com>
Subject: Re: [REGRESSION] suspend to ram fails in 6.2-rc1 due to tpm errors

On Wed Apr 26, 2023 at 4:32 AM EEST, Jason A. Donenfeld wrote:
> Nice work! Happy that you got it figured out. That trace seems
> consistent with what I was seeing in my traces, so I think you've
> spotted the right bug.
>
> Jason

Unfortunately there might be two bugs. Unless I interpreted logs
incorrectly also hwrng can race with resume (sorry, I forgot to
save it).

Looking at drivers/char/hw_random/core.c there seems to be no
binding to the PM so I guess that this it supports what I'm
observing [*].

So there's two ways to fix the issue:

1. Unregister hwrng for the course of suspend
2. Add something like TPM_CHIP_SUSPENDED, which is set by suspend and
   cleared by the resume.

I try the 2nd option first because I see it less complicated.
Probably would make sense to turn chip flags as atomic while
at it.

[*] https://elixir.bootlin.com/linux/latest/source/drivers/char/hw_random/core.c

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ