Re: KCSAN: data-race in __alloc_file / __alloc_file
From: Paul E. McKenney
Date: Sun Nov 10 2019 - 16:31:46 EST
On Sun, Nov 10, 2019 at 01:10:39PM -0800, Linus Torvalds wrote:
> On Sun, Nov 10, 2019 at 12:44 PM Paul E. McKenney <paulmck@xxxxxxxxxx> wrote:
> >
> > But will "one size fits all" be practical and useful?
>
> Oh, I do agree that if KCSAN has some mode where it says "I'll ignore
> repeated writes with the same value" (or whatever), it could/should
> likely be behind some flag.
>
> I don't think it should be a subsystem flag, though. More of a "I'm
> willing to actually analyze and ignore false positives" flag. Because
> I don't think it's so much about the code, as it is about the person
> who looks at the results.
>
> For example, we're already getting push-back from people on some of
> the KCSAN-inspired patches. If we have people sending patches to add
> READ_ONCE/WRITE_ONCE to random places to shut up KCSAN reports, I
> don't think that's good.
>
> But if we have people who _work_ on memory ordering issues etc, and
> want to see a strict mode, knowing there are false positives and able
> to handle them, that's a completely different thing..
>
> No?
Understood on the pushback! And I especially agree that it is bad to
automatically add *_ONCE() just to shut up KCSAN. For one thing, doing
that inconveniences people later on who might want to take a closer look.
As long as I can get the full-up reports for RCU. And as long as the
others who want the full-up reports can also get them. ;-)
And agreed, if the results are adjusted based on who is processing them,
that should be good.
Thanx, Paul