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: <CAAhV-H4bgShB3NqM3KC9Vtcr3Pz+DiwmGgjgif2H2tKpxLeO+g@mail.gmail.com>
Date: Wed, 3 Dec 2025 17:17:26 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: WangYuli <wangyuli@...c.io>
Cc: jpoimboe@...nel.org, peterz@...radead.org, kernel@...0n.name, 
	yangtiezhu@...ngson.cn, pmladek@...e.com, alexandre.chartre@...cle.com, 
	linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev, 
	guanwentao@...ontech.com, WangYuli <wangyl5933@...naunicom.cn>
Subject: Re: [PATCH] LoongArch: Add klp-build support for live patching

Hi, Yuli,

On Wed, Dec 3, 2025 at 5:11 PM WangYuli <wangyuli@...c.io> wrote:
>
> From: WangYuli <wangyl5933@...naunicom.cn>
>
> Add klp-build support for the LoongArch architecture, enabling
> automated live patch module generation using objtool.
Have you verified the functions?

Huacai

>
> Signed-off-by: WangYuli <wangyl5933@...naunicom.cn>
> ---
>  arch/loongarch/Kconfig                | 1 +
>  tools/objtool/Makefile                | 3 ++-
>  tools/objtool/arch/loongarch/decode.c | 5 +++++
>  3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> index 1a0a5f9def33..7b5f2a329908 100644
> --- a/arch/loongarch/Kconfig
> +++ b/arch/loongarch/Kconfig
> @@ -159,6 +159,7 @@ config LOONGARCH
>         select HAVE_KPROBES
>         select HAVE_KPROBES_ON_FTRACE
>         select HAVE_KRETPROBES
> +       select HAVE_KLP_BUILD
>         select HAVE_LIVEPATCH
>         select HAVE_MOD_ARCH_SPECIFIC
>         select HAVE_NMI
> diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
> index ad6e1ec706ce..cead37c25a69 100644
> --- a/tools/objtool/Makefile
> +++ b/tools/objtool/Makefile
> @@ -8,7 +8,8 @@ ifeq ($(SRCARCH),x86)
>  endif
>
>  ifeq ($(SRCARCH),loongarch)
> -       BUILD_ORC          := y
> +       BUILD_ORC    := y
> +       ARCH_HAS_KLP := y
>  endif
>
>  ifeq ($(ARCH_HAS_KLP),y)
> diff --git a/tools/objtool/arch/loongarch/decode.c b/tools/objtool/arch/loongarch/decode.c
> index 6cd288150f49..674e4efd138f 100644
> --- a/tools/objtool/arch/loongarch/decode.c
> +++ b/tools/objtool/arch/loongarch/decode.c
> @@ -34,6 +34,11 @@ s64 arch_insn_adjusted_addend(struct instruction *insn, struct reloc *reloc)
>         return reloc_addend(reloc);
>  }
>
> +u64 arch_adjusted_addend(struct reloc *reloc)
> +{
> +       return reloc_addend(reloc);
> +}
> +
>  bool arch_pc_relative_reloc(struct reloc *reloc)
>  {
>         return false;
> --
> 2.51.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ