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: <20251216112814.71588752@gandalf.local.home>
Date: Tue, 16 Dec 2025 11:28:14 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Menglong Dong <menglong8.dong@...il.com>
Cc: mhiramat@...nel.org, mark.rutland@....com,
 mathieu.desnoyers@...icios.com, ast@...nel.org, jiang.biao@...ux.dev,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] ftrace: fix address for jmp mode in t_show

On Tue, 16 Dec 2025 11:45:33 +0800
Menglong Dong <menglong8.dong@...il.com> wrote:

> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index bbb37c0f8c6c..d4c41fb76a25 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -4492,8 +4492,12 @@ static int t_show(struct seq_file *m, void *v)
>  			unsigned long direct;
>  
>  			direct = ftrace_find_rec_direct(rec->ip);
> -			if (direct)
> -				seq_printf(m, "\n\tdirect-->%pS", (void *)direct);
> +			if (direct) {
> +				seq_printf(m, ftrace_is_jmp(direct) ?
> +					      "\n\tdirect(jmp)-->%pS" :
> +					      "\n\tdirect-->%pS",
> +					   (void *)ftrace_jmp_get(direct));

A little cleaner way to do the above:

				seq_printf(m, "\n\tdirect%s-->%pS",
					   ftrace_is_jmp(direct) ? "(jmp)" : "",
					   (void *)ftrace_jmp_get(direct));


-- Steve

> +			}
>  		}
>  	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ