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: <5d5173a6.1c69fb81.3bbe4.6118@mx.google.com>
Date:   Mon, 12 Aug 2019 07:11:48 -0700
From:   Stephen Boyd <swboyd@...omium.org>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
        Peter Huewe <peterhuewe@....de>
Cc:     linux-kernel@...r.kernel.org, linux-integrity@...r.kernel.org,
        Andrey Pronin <apronin@...omium.org>,
        Duncan Laurie <dlaurie@...omium.org>,
        Jason Gunthorpe <jgg@...pe.ca>, Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Guenter Roeck <groeck@...omium.org>,
        Alexander Steffen <Alexander.Steffen@...ineon.com>
Subject: Re: [PATCH v3 1/4] tpm: Add a flag to indicate TPM power is managed by firmware

Quoting Jarkko Sakkinen (2019-08-09 11:02:01)
> On Tue, 2019-08-06 at 15:07 -0700, Stephen Boyd wrote:
> > On some platforms, the TPM power is managed by firmware and therefore we
> > don't need to stop the TPM on suspend when going to a light version of
> > suspend such as S0ix ("freeze" suspend state). Add a chip flag to
> > indicate this so that certain platforms can probe for the usage of this
> > light suspend and avoid touching the TPM state across suspend/resume.
> 
> The commit message should mention the new constant.

Alright.

> 
> > +     if (chip->flags & TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED)
> > +             if (!pm_suspend_via_firmware())
> 
> Why both checks are needed?
> 
> If both checks are needed, you could write it as a single
> conditional statement:
> 
> if (chip->flags & TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED &&
>     !pm_suspend_via_firmware())
> 

Ok. I'll combine them.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ