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: <160736478377.1580929.9110917864533891175@swboyd.mtv.corp.google.com>
Date:   Mon, 07 Dec 2020 10:13:03 -0800
From:   Stephen Boyd <swboyd@...omium.org>
To:     dikshita@...eaurora.org, linux-media@...r.kernel.org,
        stanimir.varbanov@...aro.org
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        vgarodia@...eaurora.org, Dikshita Agarwal <dikshita@...eaurora.org>
Subject: Re: [PATCH v3] venus: core: add support to dump FW region

Quoting dikshita@...eaurora.org (2020-12-06 22:13:30)
> From: Dikshita Agarwal <dikshita@...eaurora.org>
> 
> Add support to dump video FW region during FW crash
> using devcoredump helpers.
> 
> Signed-off-by: Dikshita Agarwal <dikshita@...eaurora.org>
> ---

One nit below.

Reviewed-by: Stephen Boyd <swboyd@...omium.org>

Usually this contains a "Changes from v1" section. What changed?

>  drivers/media/platform/qcom/venus/core.c     | 31 ++++++++++++++++++++++++++++
>  drivers/media/platform/qcom/venus/core.h     |  2 ++
>  drivers/media/platform/qcom/venus/firmware.c |  3 +++
>  3 files changed, 36 insertions(+)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 5102403..f23923d 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -22,6 +24,33 @@
>  #include "firmware.h"
>  #include "pm_helpers.h"
>  
> +static void venus_coredump(struct venus_core *core)
> +{
> +       struct device *dev;
> +       phys_addr_t mem_phys;
> +       size_t mem_size;
> +       void *mem_va;
> +       void *data;
> +
> +       dev = core->dev;
> +       mem_phys = core->fw.mem_phys;
> +       mem_size = core->fw.mem_size;
> +
> +       mem_va = memremap(mem_phys, mem_size, MEMREMAP_WC);
> +       if (!mem_va)
> +               return;
> +
> +       data = vmalloc(mem_size);
> +       if (!data) {
> +               memunmap(mem_va);
> +               return;
> +       }
> +
> +       memcpy(data, mem_va, mem_size);
> +       dev_coredumpv(dev, data, mem_size, GFP_KERNEL);
> +       memunmap(mem_va);

Technically we could unmap right after memcpy() so that the mapping only
exists for the memcpy() and then mem_va isn't "alive" for the
dev_coredumpv() call.

> +}
> +
>  static void venus_event_notify(struct venus_core *core, u32 event)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ