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:   Thu, 14 Oct 2021 03:00:09 +0300
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Chen Jun <chenjun102@...wei.com>, linux-kernel@...r.kernel.org,
        linux-integrity@...r.kernel.org
Cc:     peterhuewe@....de, jgg@...pe.ca, rui.xiang@...wei.com
Subject: Re: [PATCH v2 1/1] tpm: add request_locality before write
 TPM_INT_ENABLE

On Wed, 2021-10-13 at 06:25 +0000, Chen Jun wrote:
> Locality is not appropriately requested before writing the int mask.
> Add the missing boilerplate.
> 
> Fixes: e6aef069b6e9 ("tpm_tis: convert to using locality callbacks")
> Signed-off-by: Chen Jun <chenjun102@...wei.com>
> ---
> 
>  v2: rewrite the commit message.
> 
>  drivers/char/tpm/tpm_tis_core.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> index 69579efb247b..bea587301917 100644
> --- a/drivers/char/tpm/tpm_tis_core.c
> +++ b/drivers/char/tpm/tpm_tis_core.c
> @@ -978,7 +978,15 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
>         intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT |
>                    TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT;
>         intmask &= ~TPM_GLOBAL_INT_ENABLE;
> +
> +       rc = request_locality(chip, 0);
> +       if (rc < 0) {
> +               rc = -ENODEV;
> +               goto out_err;
> +       }
> +
>         tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask);
> +       release_locality(chip, 0);
>  
>         rc = tpm_chip_start(chip);
>         if (rc)

Thank you.

Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ