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:   Wed, 9 Feb 2022 15:12:05 +0100
From:   Jens Wiklander <jens.wiklander@...aro.org>
To:     linux-kernel@...r.kernel.org, op-tee@...ts.trustedfirmware.org,
        Herbert Xu <herbert@...dor.apana.org.au>
Cc:     Sumit Garg <sumit.garg@...aro.org>,
        Devaraj Rangasamy <Devaraj.Rangasamy@....com>,
        Rijo Thomas <Rijo-john.Thomas@....com>,
        David Howells <dhowells@...hat.com>,
        Tyler Hicks <tyhicks@...ux.microsoft.com>
Subject: Re: [PATCH v4 01/10] hwrng: optee-rng: use tee_shm_alloc_kernel_buf()

Hi Herbert,

On Fri, Feb 4, 2022 at 10:34 AM Jens Wiklander
<jens.wiklander@...aro.org> wrote:
>
> Uses the new simplified tee_shm_alloc_kernel_buf() function instead of
> the old deprecated tee_shm_alloc() function which required specific
> TEE_SHM-flags.
>
> Reviewed-by: Sumit Garg <sumit.garg@...aro.org>
> Signed-off-by: Jens Wiklander <jens.wiklander@...aro.org>
> ---
>  drivers/char/hw_random/optee-rng.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Since this patch depends on other patches in this patch set and vice
versa is it OK if I take this patch via my tree? I'm aiming for v5.18
with this.

Thanks,
Jens

>
> diff --git a/drivers/char/hw_random/optee-rng.c b/drivers/char/hw_random/optee-rng.c
> index 135a82590923..a948c0727b2b 100644
> --- a/drivers/char/hw_random/optee-rng.c
> +++ b/drivers/char/hw_random/optee-rng.c
> @@ -145,10 +145,10 @@ static int optee_rng_init(struct hwrng *rng)
>         struct optee_rng_private *pvt_data = to_optee_rng_private(rng);
>         struct tee_shm *entropy_shm_pool = NULL;
>
> -       entropy_shm_pool = tee_shm_alloc(pvt_data->ctx, MAX_ENTROPY_REQ_SZ,
> -                                        TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
> +       entropy_shm_pool = tee_shm_alloc_kernel_buf(pvt_data->ctx,
> +                                                   MAX_ENTROPY_REQ_SZ);
>         if (IS_ERR(entropy_shm_pool)) {
> -               dev_err(pvt_data->dev, "tee_shm_alloc failed\n");
> +               dev_err(pvt_data->dev, "tee_shm_alloc_kernel_buf failed\n");
>                 return PTR_ERR(entropy_shm_pool);
>         }
>
> --
> 2.31.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ