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] [day] [month] [year] [list]
Message-ID: <YrfsP3/Da6+3dpbg@kernel.org>
Date:   Sun, 26 Jun 2022 08:19:36 +0300
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Michael Niewöhner <linux@...ewoehner.de>
Cc:     LinoSanfilippo@....de, James.Bottomley@...senpartnership.com,
        peterhuewe@....de, jgg@...pe.ca, stefanb@...ux.vnet.ibm.com,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
        l.sanfilippo@...bus.com, lukas@...ner.de, p.rosenberger@...bus.com
Subject: Re: [PATCH v5 10/10] tpm, tpm_tis: Enable interrupt test

On Thu, Jun 16, 2022 at 03:04:30PM +0200, Michael Niewöhner wrote:
> On Wed, 2022-06-15 at 21:26 +0300, Jarkko Sakkinen wrote:
> > On Fri, Jun 10, 2022 at 01:08:46PM +0200, LinoSanfilippo@....de wrote:
> > > From: Lino Sanfilippo <l.sanfilippo@...bus.com>
> > > 
> > > The test for interrupts in tpm_tis_send() is skipped if the flag
> > > TPM_CHIP_FLAG_IRQ is not set. Since the current code never sets the flag
> > > initially the test is never executed.
> > > 
> > > Fix this by setting the flag in tpm_tis_gen_interrupt() right after
> > > interrupts have been enabled.
> > > 
> > > Signed-off-by: Lino Sanfilippo <l.sanfilippo@...bus.com>
> > > ---
> > >  drivers/char/tpm/tpm_tis_core.c | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/drivers/char/tpm/tpm_tis_core.c
> > > b/drivers/char/tpm/tpm_tis_core.c
> > > index e5edf745fb23..be229c173f10 100644
> > > --- a/drivers/char/tpm/tpm_tis_core.c
> > > +++ b/drivers/char/tpm/tpm_tis_core.c
> > > @@ -774,11 +774,16 @@ static int tpm_tis_gen_interrupt(struct tpm_chip
> > > *chip)
> > >         if (ret < 0)
> > >                 return ret;
> > >  
> > > +       chip->flags |= TPM_CHIP_FLAG_IRQ;
> > > +
> > >         if (chip->flags & TPM_CHIP_FLAG_TPM2)
> > >                 ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc);
> > >         else
> > >                 ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap,
> > > desc, 0);
> > >  
> > > +       if (ret)
> > > +               chip->flags &= ~TPM_CHIP_FLAG_IRQ;
> > > +
> > >         release_locality(chip, 0);
> > >  
> > >         return ret;
> > > -- 
> > > 2.36.1
> > > 
> > 
> > James, do you have a chance to test this on your side? Thanks.
> > 
> > BR, Jarkko
> 
> Tested-by: Michael Niewöhner <linux@...ewoehner.de>

Thank you.

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ