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]
Date:   Thu, 13 Apr 2023 14:04:49 -0700
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Kieran Bingham <kieran.bingham@...asonboard.com>
Cc:     Pankaj Raghav <p.raghav@...sung.com>, jan.kiszka@...mens.com,
        kbingham@...nel.org, gost.dev@...sung.com,
        linux-kernel@...r.kernel.org, song@...nel.org,
        Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH v2] scripts/gdb: use mem instead of core_layout to get
 the module address

On Thu, Apr 13, 2023 at 02:47:30PM +0100, Kieran Bingham wrote:
> Quoting Pankaj Raghav (2023-04-13 08:44:38)
> > On 2023-04-13 02:53, Luis Chamberlain wrote:
> > > On Wed, Apr 12, 2023 at 10:25:18PM +0200, Pankaj Raghav wrote:
> > >> commit ac3b43283923 ("module: replace module_layout with module_memory")
> > >> changed the struct module data structure from module_layout to
> > >> module_memory. The core_layout member which is used while loading
> > >> modules are not available anymore leading to the following error while
> > >> running gdb:
> > >>
> > >> (gdb) lx-symbols
> > >> loading vmlinux
> > >> Python Exception <class 'gdb.error'>: There is no member named core_layout.
> > >> Error occurred in Python: There is no member named core_layout.
> > >>
> > >> Replace core_layout with its new counterpart mem[MOD_TEXT].
> > >>
> > >> Fixes: ac3b43283923 ("module: replace module_layout with module_memory")
> > >> Signed-off-by: Pankaj Raghav <p.raghav@...sung.com>
> > >> ---
> > >>  scripts/gdb/linux/constants.py.in | 3 +++
> > >>  scripts/gdb/linux/modules.py      | 4 ++--
> > >>  scripts/gdb/linux/symbols.py      | 4 ++--
> > >>  3 files changed, 7 insertions(+), 4 deletions(-)
> > >>
> > >> diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in
> > >> index 36fd2b145853..471300ba176c 100644
> > >> --- a/scripts/gdb/linux/constants.py.in
> > >> +++ b/scripts/gdb/linux/constants.py.in
> > >> @@ -62,6 +62,9 @@ LX_GDBPARSED(hrtimer_resolution)
> > >>  LX_GDBPARSED(IRQD_LEVEL)
> > >>  LX_GDBPARSED(IRQ_HIDDEN)
> > >>  
> > >> +/* linux/module.h */
> > >> +LX_GDBPARSED(MOD_TEXT)
> > > 
> > > Should we just fill in the rest of the other sections too while at it?
> > > 
> > 
> > I don't see them used in the scripts. Maybe we can add them when needed?
> 
> I think there's a runtime-cost to getting these constants, as we
> interogate GDB to get the values.
> 
> Because of that, I think values should only be added when required,
> unless the python code is only lazy-evaluating these.

OK thanks, applied and pushed to modules-next.

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ