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: <20240320214648.a805dbd31fef4452b87d70c1@kernel.org>
Date: Wed, 20 Mar 2024 21:46:48 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Ye Bin <yebin10@...wei.com>
Cc: <rostedt@...dmis.org>, <mathieu.desnoyers@...icios.com>,
 <linux-trace-kernel@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 3/8] tracing/probes: support '%pd' type for fprobe

Hi Ye,

BTW, if you have a chance, please squash [1/8] to [3/8] patches
into 1 patch. There is no reason to split these since these are
a local(= the same subsystem) function implementation and callers.

Thank you,

On Fri, 15 Mar 2024 14:55:35 +0800
Ye Bin <yebin10@...wei.com> wrote:

> Support print type '%pd' for print dentry's or file's name.
> 
> Signed-off-by: Ye Bin <yebin10@...wei.com>
> ---
>  kernel/trace/trace_fprobe.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/kernel/trace/trace_fprobe.c b/kernel/trace/trace_fprobe.c
> index 7d2ddbcfa377..988d68e906ad 100644
> --- a/kernel/trace/trace_fprobe.c
> +++ b/kernel/trace/trace_fprobe.c
> @@ -976,6 +976,7 @@ static int __trace_fprobe_create(int argc, const char *argv[])
>  	char gbuf[MAX_EVENT_NAME_LEN];
>  	char sbuf[KSYM_NAME_LEN];
>  	char abuf[MAX_BTF_ARGS_LEN];
> +	char *dbuf = NULL;
>  	bool is_tracepoint = false;
>  	struct tracepoint *tpoint = NULL;
>  	struct traceprobe_parse_context ctx = {
> @@ -1086,6 +1087,10 @@ static int __trace_fprobe_create(int argc, const char *argv[])
>  		argv = new_argv;
>  	}
>  
> +	ret = traceprobe_expand_dentry_args(argc, argv, &dbuf);
> +	if (ret)
> +		goto out;
> +
>  	/* setup a probe */
>  	tf = alloc_trace_fprobe(group, event, symbol, tpoint, maxactive,
>  				argc, is_return);
> @@ -1131,6 +1136,7 @@ static int __trace_fprobe_create(int argc, const char *argv[])
>  	trace_probe_log_clear();
>  	kfree(new_argv);
>  	kfree(symbol);
> +	kfree(dbuf);
>  	return ret;
>  
>  parse_error:
> -- 
> 2.31.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ