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: <ZlimlGhgULcpCQlO@bergen.fritz.box>
Date: Thu, 30 May 2024 18:17:24 +0200
From: Nicolas Schier <nicolas@...sle.eu>
To: Adrian Huang <adrianhuang0701@...il.com>
Cc: Jan Kiszka <jan.kiszka@...mens.com>,
	Kieran Bingham <kbingham@...nel.org>,
	Masahiro Yamada <masahiroy@...nel.org>,
	linux-kernel@...r.kernel.org, Adrian Huang <ahuang12@...ovo.com>
Subject: Re: [PATCH 1/1] kbuild: Fix 'import module' error

On Wed 29 May 2024 23:46:21 GMT, Adrian Huang wrote:
> From: Adrian Huang <ahuang12@...ovo.com>
> 
> Commit b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src)
> for source directory") only changes 'symlinks'. However, 'cmd_symlink'
> is not changed accordingly. This leads to the following error:
> 
> Traceback (most recent call last):
>   File "/your_kernel_obj/linux/vmlinux-gdb.py",
>  line 29, in <module>
>     import linux.utils
> ModuleNotFoundError: No module named 'linux.utils'
> 
> Fix the issue by using $(src) instead of $(srctree)/$(src).
> 
> Fixes: b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory")
> Signed-off-by: Adrian Huang <ahuang12@...ovo.com>
> ---
>  scripts/gdb/linux/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/gdb/linux/Makefile b/scripts/gdb/linux/Makefile
> index d77ad9079d0f..fcd32fcf3ae0 100644
> --- a/scripts/gdb/linux/Makefile
> +++ b/scripts/gdb/linux/Makefile
> @@ -5,7 +5,7 @@ ifdef building_out_of_srctree
>  symlinks := $(patsubst $(src)/%,%,$(wildcard $(src)/*.py))
>  
>  quiet_cmd_symlink = SYMLINK $@
> -      cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(srctree))/$(src)/%,$@) $@
> +      cmd_symlink = ln -fsn $(patsubst $(obj)/%,$(abspath $(src))/%,$@) $@
>  
>  always-y += $(symlinks)
>  $(addprefix $(obj)/, $(symlinks)): FORCE
> -- 
> 2.25.1

Hi Adrian,

this is already fixed in kbuild/for-next.  Unfortunately the patch is 
not available at lore.kernel.org (did not not pass any usual mailing 
list?), but you can find the pre-applied patch in [1].

Kind regards,
Nicolas

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git/commit/?h=for-next&id=659bbf7e1b08267b8e1dd900b316edcb6f6d9e2e

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ