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: <20210805130700.0bc7e52a@oasis.local.home>
Date:   Thu, 5 Aug 2021 13:07:00 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc:     Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Stefan Metzmacher <metze@...ba.org>, stable@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Fix: tracepoint: static call: compare data on
 transition from 2->1 callees

On Thu,  5 Aug 2021 09:27:15 -0400
Mathieu Desnoyers <mathieu.desnoyers@...icios.com> wrote:

> On transition from 2->1 callees, we should be comparing .data rather
> than .func, because the same callback can be registered twice with
> different data, and what we care about here is that the data of array
> element 0 is unchanged to skip rcu sync.
> 
> Link: https://lore.kernel.org/io-uring/4ebea8f0-58c9-e571-fd30-0ce4f6f09c70@samba.org/

FYI, You only need to show one Fixes.

> Fixes: d25e37d89dd2 ("tracepoint: Optimize using static_call()")

The above is fixed by the one below. Which means all the stable kernels
that have the above, will also have the below, and thus the above is
just redundant.

> Fixes: 547305a64632 ("tracepoint: Fix out of sync data passing by static caller")

The above is what the patch actually fixes.

> Fixes: 352384d5c84e ("tracepoints: Update static_call before tp_funcs when adding a tracepoint")

How does this patch fix the above? Perhaps the above did not go enough
to fix the issue, but it's unrelated.

I'll remove the first and last Fixes tag.

> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: "Paul E. McKenney" <paulmck@...nel.org>
> Cc: Stefan Metzmacher <metze@...ba.org>
> Cc: <stable@...r.kernel.org> # 5.10+

The "# 5.10+" is now obsolete, and not needed. The Fixes tag is used to
determine where this gets backported to.

Other than that. This patch looks good.

-- Steve

> ---
>  kernel/tracepoint.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
> index fc32821f8240..133b6454b287 100644
> --- a/kernel/tracepoint.c
> +++ b/kernel/tracepoint.c
> @@ -338,7 +338,7 @@ static int tracepoint_remove_func(struct tracepoint *tp,
>  	} else {
>  		rcu_assign_pointer(tp->funcs, tp_funcs);
>  		tracepoint_update_call(tp, tp_funcs,
> -				       tp_funcs[0].func != old[0].func);
> +				       tp_funcs[0].data != old[0].data);
>  	}
>  	release_probes(old);
>  	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ