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: <ZvFKy9WLiz18GjEZ@krava>
Date: Mon, 23 Sep 2024 13:02:35 +0200
From: Jiri Olsa <olsajiri@...il.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Jiri Olsa <olsajiri@...il.com>, Peter Zijlstra <peterz@...radead.org>,
	Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Andrii Nakryiko <andrii@...nel.org>, bpf@...r.kernel.org,
	Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>,
	Yonghong Song <yhs@...com>,
	John Fastabend <john.fastabend@...il.com>,
	KP Singh <kpsingh@...omium.org>,
	Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCHv4 02/14] uprobe: Add support for session consumer

On Mon, Sep 23, 2024 at 12:05:53PM +0200, Oleg Nesterov wrote:
> On 09/23, Jiri Olsa wrote:
> >
> > change below should do what you proposed originally
> 
> LGTM, just one nit below.
> 
> But I guess you need to do this on top of bpf/bpf.git, Andrii has already
> applied your series.

that seems confusing but looks like just that one fix with the
commit link in [1] was applied

[1] https://lore.kernel.org/bpf/172708047825.3261420.5126267811201364070.git-patchwork-notify@kernel.org/T/#mb065649b5ab8f7ea5b03c215bdc6555a0b76c0d7

> 
> And to remind, 02/14 must be fixed in any case unless I am totally confused,
> handler_chain() can leak return_instance.

yep it was missing kfree, but it's not needed in this new version

> 
> > also on top of that.. I discussed with Andrii the possibility of dropping
> > the UPROBE_HANDLER_IWANTMYCOOKIE completely and setup cookie for any consumer
> > that has both 'handler' and 'ret_handler' defined, wdyt?
> 
> Up to you. As I said from the very beginning I won't insist on _IWANTMYCOOKIE.

ok

> 
> >  	list_for_each_entry_srcu(uc, &uprobe->consumers, cons_node,
> >  				 srcu_read_lock_held(&uprobes_srcu)) {
> > +		ric = return_consumer_find(ri, &ric_idx, uc->id);
> >  		if (uc->ret_handler)
> > -			uc->ret_handler(uc, ri->func, regs);
> > +			uc->ret_handler(uc, ri->func, regs, ric ? &ric->cookie : NULL);
> >  	}
> >  	srcu_read_unlock(&uprobes_srcu, srcu_idx);
> 
> return_consumer_find() makes no sense if !uc->ret_handler, can you move
> 
> 		ric = return_consumer_find(ri, &ric_idx, uc->id);
> 
> into the "if (uc->ret_handler)" block?

ok, will move that

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ