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: <53889229-333a-7833-d9bf-42bef71d1d68@loongson.cn>
Date: Wed, 10 Dec 2025 08:48:22 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Chenghao Duan <duanchenghao@...inos.cn>, hengqi.chen@...il.com,
 chenhuacai@...nel.org
Cc: kernel@...0n.name, zhangtianyang@...ngson.cn, masahiroy@...nel.org,
 linux-kernel@...r.kernel.org, loongarch@...ts.linux.dev,
 bpf@...r.kernel.org, guodongtai@...inos.cn, youling.tang@...ux.dev,
 jianghaoran@...inos.cn, vincent.mc.li@...il.com,
 Youling Tang <tangyouling@...inos.cn>
Subject: Re: [PATCH v1 1/2] LoongArch: Modify the jump logic of the trampoline

On 2025/12/9 下午5:34, Chenghao Duan wrote:
> There are two methods to jump into the trampoline code for execution:
> 1. ftrace-managed.
> 2. Direct call.
> 
> Whether ftrace-managed or direct jump, ensure before trampoline entry:
> t0=parent func return addr, ra=traced func return addr.
> When managed by ftrace, the trampoline code execution flow utilizes
> ftrace direct call, and it is required to ensure that the original
> data in registers t0 and ra is not modification.
> 
> samples/ftrace/ftrace-direct_xxxx.c: update test code for ftrace direct
> call (modify together).
> 
> Trampoline: adjust jump logic to use t0 (parent func return addr) and
> ra (traced func return addr) as jump targets for respective scenarios
> 
> Signed-off-by: Youling Tang <tangyouling@...inos.cn>

When several people work on a single patch, please use the tag:
"Co-developed-by", for more info please see:

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

> Signed-off-by: Chenghao Duan <duanchenghao@...inos.cn>
> ---
>   arch/loongarch/kernel/mcount_dyn.S          | 14 +++++---
>   arch/loongarch/net/bpf_jit.c                | 37 +++++++++++++++------
>   samples/ftrace/ftrace-direct-modify.c       |  8 ++---
>   samples/ftrace/ftrace-direct-multi-modify.c |  8 ++---
>   samples/ftrace/ftrace-direct-multi.c        |  4 +--
>   samples/ftrace/ftrace-direct-too.c          |  4 +--
>   samples/ftrace/ftrace-direct.c              |  4 +--
>   7 files changed, 50 insertions(+), 29 deletions(-)

Thanks for the patch, it is good news.

Please split this patch into three parts:
(1) ftrace code
(2) sample test
(3) bpf code
and use proper patch subject and commit message for each patch.

Thanks,
Tiezhu


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ