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, 24 Nov 2022 08:58:07 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Lino Sanfilippo <LinoSanfilippo@....de>
Cc:     peterhuewe@....de, jgg@...pe.ca, stefanb@...ux.vnet.ibm.com,
        linux@...ewoehner.de, linux-integrity@...r.kernel.org,
        linux-kernel@...r.kernel.org, jandryuk@...il.com,
        pmenzel@...gen.mpg.de, l.sanfilippo@...bus.com, lukas@...ner.de,
        p.rosenberger@...bus.com
Subject: Re: [PATCH v10 04/14] tpm, tpm_tis: Do not skip reset of original
 interrupt vector

On Sun, Nov 20, 2022 at 02:31:24PM +0100, Lino Sanfilippo wrote:
> From: Lino Sanfilippo <l.sanfilippo@...bus.com>
> 
> If in tpm_tis_probe_irq_single() an error occurs after the original
> interrupt vector has been read, restore the interrupts before the error is
> returned.
> 
> Since the caller does not check the error value, return -1 in any case that
> the TPM_CHIP_FLAG_IRQ flag is not set. Since the return value of function
> tpm_tis_gen_interrupt() is not longer used, make it a void function.
> 
> Fixes: 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access")
> Signed-off-by: Lino Sanfilippo <l.sanfilippo@...bus.com>
> ---
>  drivers/char/tpm/tpm_tis_core.c | 33 +++++++++++++--------------------
>  1 file changed, 13 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> index 603b82ca56da..1eac1279594d 100644
> --- a/drivers/char/tpm/tpm_tis_core.c
> +++ b/drivers/char/tpm/tpm_tis_core.c
> @@ -729,7 +729,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id)
>  	return IRQ_HANDLED;
>  }
>  
> -static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
> +static void tpm_tis_gen_interrupt(struct tpm_chip *chip)
>  {
>  	const char *desc = "attempting to generate an interrupt";
>  	u32 cap2;
> @@ -738,16 +738,14 @@ static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
>  
>  	ret = request_locality(chip, 0);
>  	if (ret < 0)
> -		return ret;
> +		return;
>  
>  	if (chip->flags & TPM_CHIP_FLAG_TPM2)
> -		ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc);
> +		tpm2_get_tpm_pt(chip, 0x100, &cap2, desc);

In a successive patch:

-               tpm2_get_tpm_pt(chip, 0x100, &cap2, desc);
+               ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc);
`

BR, Jarkko 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ