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: Tue, 26 Mar 2024 12:53:48 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Sunil Khatri <sunil.khatri@....com>
Cc: Alex Deucher <alexander.deucher@....com>, 
	Christian König <christian.koenig@....com>, 
	Shashank Sharma <shashank.sharma@....com>, amd-gfx@...ts.freedesktop.org, 
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
	Hawking Zhang <Hawking.Zhang@....com>, Felix Kuehling <Felix.Kuehling@....com>, 
	Lijo Lazar <lijo.lazar@....com>
Subject: Re: [PATCH] drm/amdgpu: add support of bios dump in devcoredump

On Tue, Mar 26, 2024 at 10:38 AM Sunil Khatri <sunil.khatri@....com> wrote:
>
> dump the bios binary in the devcoredump.
>
> Signed-off-by: Sunil Khatri <sunil.khatri@....com>
> ---
>  .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c  | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
> index 44c5da8aa9ce..f33963d777eb 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c
> @@ -132,6 +132,26 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
>         drm_printf(&p, "Faulty page starting at address: 0x%016llx\n", fault_info->addr);
>         drm_printf(&p, "Protection fault status register: 0x%x\n\n", fault_info->status);
>
> +       /* Dump BIOS */
> +       if (coredump->adev->bios && coredump->adev->bios_size) {
> +               int i = 0;
> +
> +               drm_printf(&p, "BIOS Binary dump\n");
> +               drm_printf(&p, "Valid BIOS  Size:%d bytes type:%s\n",
> +                          coredump->adev->bios_size,
> +                          coredump->adev->is_atom_fw ?
> +                          "Atom bios":"Non Atom Bios");
> +
> +               while (i < coredump->adev->bios_size) {
> +                       /* Printing 15 bytes in a line */
> +                       if (i % 15 == 0)
> +                               drm_printf(&p, "\n");
> +                       drm_printf(&p, "0x%x \t", coredump->adev->bios[i]);
> +                       i++;
> +               }
> +               drm_printf(&p, "\n");
> +       }

I don't think it's too useful to dump this as text.  I was hoping it
could be a binary.  I guess, we can just get this from debugfs if we
need it if a binary is not possible.

Alex


> +
>         /* Add ring buffer information */
>         drm_printf(&p, "Ring buffer information\n");
>         for (int i = 0; i < coredump->adev->num_rings; i++) {
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ