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: <20220917195807.GA39579@lothringen>
Date:   Sat, 17 Sep 2022 21:58:07 +0200
From:   Frederic Weisbecker <frederic@...nel.org>
To:     "Joel Fernandes (Google)" <joel@...lfernandes.org>
Cc:     rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
        rushikesh.s.kadam@...el.com, urezki@...il.com,
        neeraj.iitr10@...il.com, paulmck@...nel.org, rostedt@...dmis.org
Subject: Re: [PATCH rcu/next 3/3] rcu: Call trace_rcu_callback() also for
 bypass queuing (v2)

On Sat, Sep 17, 2022 at 04:42:00PM +0000, Joel Fernandes (Google) wrote:
> @@ -2809,17 +2825,15 @@ void call_rcu(struct rcu_head *head, rcu_callback_t func)
>  	}
>  
>  	check_cb_ovld(rdp);
> -	if (rcu_nocb_try_bypass(rdp, head, &was_alldone, flags))
> +
> +	if (rcu_nocb_try_bypass(rdp, head, &was_alldone, flags)) {
> +		__trace_rcu_callback(head, rdp);
>  		return; // Enqueued onto ->nocb_bypass, so just leave.
> +	}

I think the bypass enqueues should be treated differently. Either with extending
the current trace_rcu_callback/trace_rcu_kvfree_callback (might break tools) or
with creating a new trace_rcu_callback_bypass()/trace_rcu_kvfree_callback_bypass().

Those could later be paired with a trace_rcu_bypass_flush().

Thanks.


> +
>  	// If no-CBs CPU gets here, rcu_nocb_try_bypass() acquired ->nocb_lock.
>  	rcu_segcblist_enqueue(&rdp->cblist, head);
> -	if (__is_kvfree_rcu_offset((unsigned long)func))
> -		trace_rcu_kvfree_callback(rcu_state.name, head,
> -					 (unsigned long)func,
> -					 rcu_segcblist_n_cbs(&rdp->cblist));
> -	else
> -		trace_rcu_callback(rcu_state.name, head,
> -				   rcu_segcblist_n_cbs(&rdp->cblist));
> +	__trace_rcu_callback(head, rdp);
>  
>  	trace_rcu_segcb_stats(&rdp->cblist, TPS("SegCBQueued"));
>  
> -- 
> 2.37.3.968.ga6b4b080e4-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ