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:   Thu, 17 Dec 2020 09:31:46 +0100
From:   Jan Kiszka <jan.kiszka@...mens.com>
To:     Johannes Berg <johannes@...solutions.net>,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Kieran Bingham <kbingham@...nel.org>,
        Johannes Berg <johannes.berg@...el.com>
Subject: Re: [PATCH v2] gdb: lx-symbols: store the abspath()

On 17.12.20 09:17, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@...el.com>
> 
> If we store the relative path, the user might later cd to a
> different directory, and that would break the automatic symbol
> resolving that happens when a module is loaded into the target
> kernel. Fix this by storing the abspath() of each path given,
> just like we already do for the cwd (os.getcwd() is absolute.)
> 
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>
> ---
> v2: break the long line
> ---
>  scripts/gdb/linux/symbols.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
> index 1be9763cf8bb..08d264ac328b 100644
> --- a/scripts/gdb/linux/symbols.py
> +++ b/scripts/gdb/linux/symbols.py
> @@ -164,7 +164,8 @@ lx-symbols command."""
>              saved_state['breakpoint'].enabled = saved_state['enabled']
>  
>      def invoke(self, arg, from_tty):
> -        self.module_paths = [os.path.expanduser(p) for p in arg.split()]
> +        self.module_paths = [os.path.abspath(os.path.expanduser(p))
> +                             for p in arg.split()]
>          self.module_paths.append(os.getcwd())
>  
>          # enforce update
> 

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

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ