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: <418f0953-1815-1844-e3f5-a11f2a5eaf33@siemens.com>
Date:   Thu, 23 Jul 2020 12:25:22 +0200
From:   Jan Kiszka <jan.kiszka@...mens.com>
To:     Stefano Garzarella <sgarzare@...hat.com>,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Kieran Bingham <kbingham@...nel.org>
Subject: Re: [PATCH] scripts/gdb: fix lx-symbols 'gdb.error' while loading
 modules

On 22.07.20 12:22, Stefano Garzarella wrote:
> Commit ed66f991bb19 ("module: Refactor section attr into bin
> attribute") removed the 'name' field from 'struct module_sect_attr'
> triggering the following error when invoking lx-symbols:
> 
>    (gdb) lx-symbols
>    loading vmlinux
>    scanning for modules in linux/build
>    loading @0xffffffffc014f000: linux/build/drivers/net/tun.ko
>    Python Exception <class 'gdb.error'> There is no member named name.:
>    Error occurred in Python: There is no member named name.
> 
> This patch fixes the issue taking the module name from the 'struct
> attribute'.
> 
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
> ---
>   scripts/gdb/linux/symbols.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
> index be984aa29b75..1be9763cf8bb 100644
> --- a/scripts/gdb/linux/symbols.py
> +++ b/scripts/gdb/linux/symbols.py
> @@ -96,7 +96,7 @@ lx-symbols command."""
>               return ""
>           attrs = sect_attrs['attrs']
>           section_name_to_address = {
> -            attrs[n]['name'].string(): attrs[n]['address']
> +            attrs[n]['battr']['attr']['name'].string(): attrs[n]['address']
>               for n in range(int(sect_attrs['nsections']))}
>           args = []
>           for section_name in [".data", ".data..read_mostly", ".rodata", ".bss",
> 

Reviewed-by: Jan Kiszka <jan.kiszka@...mens.com>

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ