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]
Date:   Fri, 30 Jun 2023 12:08:31 +0000
From:   "Limonciello, Mario" <Mario.Limonciello@....com>
To:     Jarkko Sakkinen <jarkko@...nel.org>,
        Jerry Snitselaar <jsnitsel@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>
CC:     "Jason A. Donenfeld" <Jason@...c4.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Peter Huewe <peterhuewe@....de>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        Linux regressions mailing list <regressions@...ts.linux.dev>,
        "Aneesh Kumar K . V" <aneesh.kumar@...ux.ibm.com>,
        Sachin Sant <sachinp@...ux.ibm.com>
Subject: RE: [PATCH] tpm: return false from tpm_amd_is_rng_defective on
 non-x86 platforms

[Public]

> -----Original Message-----
> From: Jarkko Sakkinen <jarkko@...nel.org>
> Sent: Friday, June 30, 2023 5:07 AM
> To: Jerry Snitselaar <jsnitsel@...hat.com>; linux-kernel@...r.kernel.org;
> linux-integrity@...r.kernel.org
> Cc: Jason A. Donenfeld <Jason@...c4.com>; Jason Gunthorpe
> <jgg@...pe.ca>; Peter Huewe <peterhuewe@....de>;
> stable@...r.kernel.org; Linux regressions mailing list
> <regressions@...ts.linux.dev>; Limonciello, Mario
> <Mario.Limonciello@....com>; Aneesh Kumar K . V
> <aneesh.kumar@...ux.ibm.com>; Sachin Sant <sachinp@...ux.ibm.com>
> Subject: Re: [PATCH] tpm: return false from tpm_amd_is_rng_defective on
> non-x86 platforms
>
> On Thu Jun 29, 2023 at 11:41 PM EEST, Jerry Snitselaar wrote:
> > tpm_amd_is_rng_defective is for dealing with an issue related to the
> > AMD firmware TPM, so on non-x86 architectures just have it inline and
> > return false.
> >
> > Cc: Jarkko Sakkinen <jarkko@...nel.org>
> > Cc: "Jason A. Donenfeld" <Jason@...c4.com>
> > Cc: Jason Gunthorpe <jgg@...pe.ca>
> > Cc: Peter Huewe <peterhuewe@....de>
> > Cc: stable@...r.kernel.org
> > Cc: Linux regressions mailing list <regressions@...ts.linux.dev>
> > Cc: Mario Limonciello <mario.limonciello@....com>
> > Reported-by: Aneesh Kumar K. V <aneesh.kumar@...ux.ibm.com>
> > Reported-by: Sachin Sant <sachinp@...ux.ibm.com>
> > Closes: https://lore.kernel.org/lkml/99B81401-DB46-49B9-B321-
> CF832B50CAC3@...ux.ibm.com/
> > Fixes: f1324bbc4011 ("tpm: disable hwrng for fTPM on some AMD
> designs")
> > Signed-off-by: Jerry Snitselaar <jsnitsel@...hat.com>
> > ---
> >  drivers/char/tpm/tpm-chip.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
> > index cd48033b804a..cf5499e51999 100644
> > --- a/drivers/char/tpm/tpm-chip.c
> > +++ b/drivers/char/tpm/tpm-chip.c
> > @@ -518,6 +518,7 @@ static int tpm_add_legacy_sysfs(struct tpm_chip
> *chip)
> >   * 6.x.y.z series: 6.0.18.6 +
> >   * 3.x.y.z series: 3.57.y.5 +
> >   */
> > +#ifdef CONFIG_X86
> >  static bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
> >  {
> >     u32 val1, val2;
> > @@ -566,6 +567,12 @@ static bool tpm_amd_is_rng_defective(struct
> tpm_chip *chip)
> >
> >     return true;
> >  }
> > +#else
> > +static inline bool tpm_amd_is_rng_defective(struct tpm_chip *chip)
> > +{
> > +   return false;
> > +}
> > +#endif /* CONFIG_X86 */
> >
> >  static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool
> wait)
> >  {
> > --
> > 2.38.1
>
> Sanity check, this was the right patch, right?
>

Yup.

> I'll apply it.
>
> BR, Jarkko

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ