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: <ec30815d-22c0-4a65-9b55-f9e10781d5b2@paulmck-laptop>
Date: Wed, 3 Apr 2024 12:58:16 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Alexei Starovoitov <ast@...nel.org>, Chris Mason <clm@...com>
Subject: Re: [PATCH RFC ftrace] Asynchronous grace period for
 register_ftrace_direct()

On Wed, Apr 03, 2024 at 03:29:12PM -0400, Steven Rostedt wrote:
> On Wed, 3 Apr 2024 11:53:14 -0700
> "Paul E. McKenney" <paulmck@...nel.org> wrote:
> 
> > @@ -5366,6 +5366,13 @@ static void remove_direct_functions_hash(struct ftrace_hash *hash, unsigned long
> >  	}
> >  }
> >  
> > +static void register_ftrace_direct_cb(struct rcu_head *rhp)
> > +{
> > +	struct ftrace_hash *fhp = container_of(rhp, struct ftrace_hash, rcu);
> > +
> > +	free_ftrace_hash(fhp);
> > +}
> > +
> >  /**
> >   * register_ftrace_direct - Call a custom trampoline directly
> >   * for multiple functions registered in @ops
> > @@ -5464,10 +5471,8 @@ int register_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)
> >   out_unlock:
> >  	mutex_unlock(&direct_mutex);
> >  
> > -	if (free_hash && free_hash != EMPTY_HASH) {
> > -		synchronize_rcu_tasks();
> > -		free_ftrace_hash(free_hash);
> > -	}
> > +	if (free_hash && free_hash != EMPTY_HASH)
> > +		call_rcu_tasks(&free_hash->rcu, register_ftrace_direct_cb);
> >  
> >  	if (new_hash)
> >  		free_ftrace_hash(new_hash);
> 
> I'm getting ready to go on PTO, but a quick glance doesn't look like this
> would cause any harm.

It is not urgent, as in v6.10 merge window at the earliest.  So if I
don't hear from you in a few weeks, I will re-send.  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ