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: <20230622093905.e0619ea5e1fa3db9772d26eb@kernel.org>
Date:   Thu, 22 Jun 2023 09:39:05 +0900
From:   Masami Hiramatsu (Google) <mhiramat@...nel.org>
To:     Kui-Feng Lee <sinquersw@...il.com>
Cc:     linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Steven Rostedt <rostedt@...dmis.org>,
        Florent Revest <revest@...omium.org>,
        Mark Rutland <mark.rutland@....com>,
        Will Deacon <will@...nel.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Martin KaFai Lau <martin.lau@...ux.dev>, bpf@...r.kernel.org,
        Bagas Sanjaya <bagasdotme@...il.com>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] tracing/probes: Fix tracepoint event with $arg* to
 fetch correct argument

On Wed, 14 Jun 2023 12:50:34 -0700
Kui-Feng Lee <sinquersw@...il.com> wrote:

> 
> 
> On 6/12/23 04:58, Masami Hiramatsu (Google) wrote:
> > From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> > 
> > To hide the first dummy 'data' argument on the tracepoint probe events,
> > the BTF argument array was modified (skip the first argument for tracepoint),
> > but the '$arg*' meta argument parser missed that.
> > 
> > Fix to increment the argument index if it is tracepoint probe. And decrement
> > the index when searching the type of the argument.
> > 
> > Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> > ---
> >   kernel/trace/trace_probe.c |   10 ++++++++--
> >   1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c
> > index 473e1c43bc57..643aa3a51d5a 100644
> > --- a/kernel/trace/trace_probe.c
> > +++ b/kernel/trace/trace_probe.c
> > @@ -456,7 +456,10 @@ static int parse_btf_arg(const char *varname, struct fetch_insn *code,
> >   
> >   		if (name && !strcmp(name, varname)) {
> >   			code->op = FETCH_OP_ARG;
> > -			code->param = i;
> > +			if (ctx->flags & TPARG_FL_TPOINT)
> > +				code->param = i + 1;
> > +			else
> > +				code->param = i;
> >   			return 0;
> >   		}
> >   	}
> > @@ -470,8 +473,11 @@ static const struct fetch_type *parse_btf_arg_type(int arg_idx,
> >   	struct btf *btf = traceprobe_get_btf();
> >   	const char *typestr = NULL;
> >   
> > -	if (btf && ctx->params)
> > +	if (btf && ctx->params) {
> > +		if (ctx->flags & TPARG_FL_TPOINT)
> > +			arg_idx--;
> >   		typestr = type_from_btf_id(btf, ctx->params[arg_idx].type);
> > +	}
> >   
> >   	return find_fetch_type(typestr, ctx->flags);
> >   }
> > 
> > 
> 
> I failed to apply this patch.
> Would you mind to rebase this patch?

Ah, this is against for the probes/for-next branch on
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git

Thanks,

> 


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ