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: <CAKf6xpsc9KRUKo5Z-kPqDcSCdpf9-tjf+ZdREnEiJUdHwyDQcA@mail.gmail.com>
Date:   Fri, 26 Aug 2022 13:43:07 -0400
From:   Jason Andryuk <jandryuk@...il.com>
To:     Lino Sanfilippo <LinoSanfilippo@....de>
Cc:     Peter Huewe <peterhuewe@....de>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Stefan Berger <stefanb@...ux.vnet.ibm.com>,
        linux@...ewoehner.de, linux-integrity@...r.kernel.org,
        open list <linux-kernel@...r.kernel.org>,
        l.sanfilippo@...bus.com, lukas@...ner.de, p.rosenberger@...bus.com
Subject: Re: [PATCH v7 05/10] tpm, tpm_tis: Only handle supported interrupts

On Wed, Jun 29, 2022 at 7:28 PM Lino Sanfilippo <LinoSanfilippo@....de> wrote:

> @@ -1007,8 +1029,39 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
>         if (rc < 0)
>                 goto out_err;
>
> -       intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT |
> -                  TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT;
> +       /* Figure out the capabilities */
> +       rc = tpm_tis_read32(priv, TPM_INTF_CAPS(priv->locality), &intfcaps);
> +       if (rc < 0)
> +               goto out_err;
> +
> +       dev_dbg(dev, "TPM interface capabilities (0x%x):\n",
> +               intfcaps);
> +       if (intfcaps & TPM_INTF_BURST_COUNT_STATIC)
> +               dev_dbg(dev, "\tBurst Count Static\n");
> +       if (intfcaps & TPM_INTF_CMD_READY_INT) {
> +               intmask |= TPM_INTF_CMD_READY_INT;
> +               dev_dbg(dev, "\tCommand Ready Int Support\n");
> +       }
> +       if (intfcaps & TPM_INTF_INT_EDGE_FALLING)
> +               dev_dbg(dev, "\tInterrupt Edge Falling\n");
> +       if (intfcaps & TPM_INTF_INT_EDGE_RISING)
> +               dev_dbg(dev, "\tInterrupt Edge Rising\n");
> +       if (intfcaps & TPM_INTF_INT_LEVEL_LOW)
> +               dev_dbg(dev, "\tInterrupt Level Low\n");
> +       if (intfcaps & TPM_INTF_INT_LEVEL_HIGH)
> +               dev_dbg(dev, "\tInterrupt Level High\n");
> +       if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT)

Hi, you may already have fixed this, but I just saw:

error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
 1144 |         if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT)
      |         ^~

> +               intmask |= TPM_INTF_LOCALITY_CHANGE_INT;
> +               dev_dbg(dev, "\tLocality Change Int Support\n");

You need { } for the block.

Regards,
Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ