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: <348157d8-f3dc-6894-2bad-6d2a85cf879e@amd.com>
Date:   Mon, 1 May 2023 13:47:08 -0500
From:   Tom Lendacky <thomas.lendacky@....com>
To:     Mario Limonciello <mario.limonciello@....com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        John Allen <john.allen@....com>
Cc:     David S Miller <davem@...emloft.net>, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 04/10] crypto: ccp: move setting PSP master to earlier
 in the init

On 4/28/23 13:55, Mario Limonciello wrote:
> Dynamic boost control needs to use platform access symbols
> that look for the PSP master as part of initialization.
> 
> So move the PSP master before psp_init() so that dynamic boost
> control can be initialized properly.
> 
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
>   drivers/crypto/ccp/psp-dev.c | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/crypto/ccp/psp-dev.c b/drivers/crypto/ccp/psp-dev.c
> index e3d6955d3265..e9136e398174 100644
> --- a/drivers/crypto/ccp/psp-dev.c
> +++ b/drivers/crypto/ccp/psp-dev.c
> @@ -173,13 +173,14 @@ int psp_dev_init(struct sp_device *sp)
>   		goto e_err;
>   	}
>   
> +	/* master device must be set for platform access */
> +	if (psp->sp->set_psp_master_device)
> +		psp->sp->set_psp_master_device(psp->sp);
> +
>   	ret = psp_init(psp);
>   	if (ret)
>   		goto e_irq;

If psp_init() fails, should we check for and call clear_psp_master_device now?

Thanks,
Tom

>   
> -	if (sp->set_psp_master_device)
> -		sp->set_psp_master_device(sp);
> -
>   	/* Enable interrupt */
>   	iowrite32(-1, psp->io_regs + psp->vdata->inten_reg);
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ