mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Marco Elver <elver@google.com>, linux-kernel@vger.kernel.org
Subject: Re: RCU vs data_race()
Date: Tue, 6 Jul 2021 07:03:37 -0700	[thread overview]
Message-ID: <20210706140337.GZ4397@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <YOQxYJaypdsmqhlX@hirez.programming.kicks-ass.net>

On Tue, Jul 06, 2021 at 12:33:04PM +0200, Peter Zijlstra wrote:
> On Tue, Jul 06, 2021 at 10:44:46AM +0200, Marco Elver wrote:
> > On Tue, 6 Jul 2021 at 10:00, Peter Zijlstra <peterz@infradead.org> wrote:
> > [...]
> > > In that case, would not an explicit: data_debug(addr) call (implemented
> > > by KASAN/KCSAN/whoever), which would report whatever knowledge they have
> > > about that address, be even more useful?
> > 
> > KCSAN/KASAN report data-races/memory errors as soon as they encounter
> > them, but before they do, cannot give you any more than that (metadata
> > if it exists, but not sure it can be interpreted in any useful way
> > before an error occurs).
> > 
> > But maybe I misunderstood. Is data_debug() meant to not return
> > anything and instead just be a "fake access"?
> 
> Mostly just print any meta data that you might have. Like who allocated
> it, or which code touched it. I'm thinking KASAN/KCSAN need to keep
> track of such stuff for when a violation is detected.
> 
> If I understand Paul right; and there's a fair chance I didn't; I tihnk
> the issue is that when RCU finds a double call_rcu() (or some other
> fail), it has very little clue how we got there, and any addition
> information might be useful.

If it is a current reference, we know that reference is relevant.
After all, if the structure is being passed to call_rcu(), then there
better not not be something else referencing it right now.  But the
historical data you are (I think?) asking for might be completely
irrelevant due to its having happened too long ago.

							Thanx, Paul

  reply	other threads:[~2021-07-06 14:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18  8:24 Peter Zijlstra
2021-06-18  8:59 ` Marco Elver
2021-06-18 11:26   ` Peter Zijlstra
2021-06-18 20:48     ` Paul E. McKenney
2021-06-20 19:14       ` Peter Zijlstra
2021-06-20 21:01         ` Paul E. McKenney
2021-06-21  7:28           ` Peter Zijlstra
2021-06-21 13:37             ` Paul E. McKenney
2021-07-06  8:00               ` Peter Zijlstra
2021-07-06  8:44                 ` Marco Elver
2021-07-06 10:33                   ` Peter Zijlstra
2021-07-06 14:03                     ` Paul E. McKenney [this message]
2021-07-06  8:37               ` Peter Zijlstra
2021-07-06 14:16                 ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210706140337.GZ4397@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®