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] [day] [month] [year] [list]
Message-ID: <CAFCwf13GyEop7rWZ1i8E3=EXgtN6w3WJbB40KdsiG15ViMv-gQ@mail.gmail.com>
Date:   Wed, 18 Dec 2019 11:37:22 +0200
From:   Oded Gabbay <oded.gabbay@...il.com>
To:     Omer Shpigelman <oshpigelman@...ana.ai>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] habanalabs: use the user CB size as a default job size

On Mon, Dec 16, 2019 at 10:42 AM Omer Shpigelman <oshpigelman@...ana.ai> wrote:
>
> When no patched command buffer (CB) is created, use the user CB size as
> the job size.
>
> Signed-off-by: Omer Shpigelman <oshpigelman@...ana.ai>
> ---
>  drivers/misc/habanalabs/command_submission.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/misc/habanalabs/command_submission.c b/drivers/misc/habanalabs/command_submission.c
> index 8850f475a413..41e95513c591 100644
> --- a/drivers/misc/habanalabs/command_submission.c
> +++ b/drivers/misc/habanalabs/command_submission.c
> @@ -129,6 +129,8 @@ static int cs_parser(struct hl_fpriv *hpriv, struct hl_cs_job *job)
>                 spin_unlock(&job->user_cb->lock);
>                 hl_cb_put(job->user_cb);
>                 job->user_cb = NULL;
> +       } else if (!rc) {
> +               job->job_cb_size = job->user_cb_size;
>         }
>
>         return rc;
> @@ -585,10 +587,6 @@ static int _hl_cs_ioctl(struct hl_fpriv *hpriv, void __user *chunks,
>                 job->cs = cs;
>                 job->user_cb = cb;
>                 job->user_cb_size = chunk->cb_size;
> -               if (is_kernel_allocated_cb)
> -                       job->job_cb_size = cb->size;
> -               else
> -                       job->job_cb_size = chunk->cb_size;
>                 job->hw_queue_id = chunk->queue_index;
>
>                 cs->jobs_in_queue_cnt[job->hw_queue_id]++;
> --
> 2.17.1
>

This patch is:
Reviewed-by: Oded Gabbay <oded.gabbay@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ