linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] fixes for v5.8-rc4
@ 2020-07-02 20:47 Christian Brauner
  2020-07-03  5:45 ` Linus Torvalds
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Christian Brauner @ 2020-07-02 20:47 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List

Hey Linus,

/* Summary */
This contains an annotation patch for a data race in copy_process() reported by
KCSAN when reading and writing nr_threads. The data race is intentional and
benign. This is obvious from the comment above the relevant code and based on
general consensus when discussing this issue. So simply using data_race() to
annotate this as an intentional race seems the best option.

A few comments on this since doing a grep data_race() reveals that currently
only kernel/rcu/* is making use of this new annotation and this seems to be the
first annotation in core kernel: when this was first sent to me I was obviously
aware of the existence of KCSAN but not whether we had established a consenus
around annotating places in the (core) kernel where we currently have benign
data races that KCSAN complains about. I don't know whether we have reached a
consensus in general yet or we're just doing this subsystem specific. We had a
bit of a back and forth on this topic related to this patch here. Most people
argued that because this is an intentional and benign data race that we should
simply annotate it. Now, we're obviously doing this for the sake of KCSAN and
given that KCSAN is now upstream and starting to report data races I guess
doing this is sensible. The linux-next tree contains various mm/* patches that
push in the same direction of annotating benign data races. So it seems going
forward we'll just funnel such patches upstream where they make sense.

/* Testing */
All patches have seen exposure in linux-next and are based on v5.8-rc1.

/* Conflicts */
At the time of creating this pr no merge conflicts were reported.
Fyi, I applied this patch right on top of the previous fixes before -rc2 was
out and hence didn't rebase my fixes tree on top of -rc3 because of that.

The following changes since commit 86f56395feb2b106b125c47e72192e37da5dd088:

  tests: test for setns() EINVAL regression (2020-06-17 00:48:54 +0200)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/for-linus-2020-07-02

for you to fetch changes up to c17d1a3a8ee4dac7539d5c976b45d9300f6f10bc:

  fork: annotate data race in copy_process() (2020-06-26 01:05:29 +0200)

Please consider pulling these changes from the signed for-linus-2020-07-02 tag.

Thanks!
Christian

----------------------------------------------------------------
for-linus-2020-07-02

----------------------------------------------------------------
Weilong Chen (1):
      fork: annotate data race in copy_process()

 kernel/fork.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] fixes for v5.8-rc4
  2020-07-02 20:47 [GIT PULL] fixes for v5.8-rc4 Christian Brauner
@ 2020-07-03  5:45 ` Linus Torvalds
  2020-07-03  6:10 ` pr-tracker-bot
  2020-07-12 21:03 ` Pavel Machek
  2 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2020-07-03  5:45 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linux Kernel Mailing List

On Thu, Jul 2, 2020 at 1:51 PM Christian Brauner
<christian.brauner@ubuntu.com> wrote:
>
> A few comments on this since doing a grep data_race() reveals that currently
> only kernel/rcu/* is making use of this new annotation and this seems to be the
> first annotation in core kernel: when this was first sent to me I was obviously
> aware of the existence of KCSAN but not whether we had established a consenus
> around annotating places in the (core) kernel where we currently have benign
> data races that KCSAN complains about. I don't know whether we have reached a
> consensus in general yet or we're just doing this subsystem specific.

I'm not sure there's any consensus, and it depends on the quality of
the KCSAN bug reports (and the reporters). There were some KCSAN
reports that seemed to not actually be real data races as much as
"KCSAN was being stupid and not understanding idempotent value
setting".

It also depends on the quality of the patch and the description. If
KCSAN patches end up being "just shut up the tool", I will stop taking
them.

But in this case, as you say, we already had the comment about the
situation, and telling the tool about it obviously won't hurt.

            Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] fixes for v5.8-rc4
  2020-07-02 20:47 [GIT PULL] fixes for v5.8-rc4 Christian Brauner
  2020-07-03  5:45 ` Linus Torvalds
@ 2020-07-03  6:10 ` pr-tracker-bot
  2020-07-12 21:03 ` Pavel Machek
  2 siblings, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2020-07-03  6:10 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linus Torvalds, Linux Kernel Mailing List

The pull request you sent on Thu,  2 Jul 2020 22:47:33 +0200:

> git@gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux tags/for-linus-2020-07-02

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/45564bcd57046ebe8c9309527c114dcd042cb7e5

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] fixes for v5.8-rc4
  2020-07-02 20:47 [GIT PULL] fixes for v5.8-rc4 Christian Brauner
  2020-07-03  5:45 ` Linus Torvalds
  2020-07-03  6:10 ` pr-tracker-bot
@ 2020-07-12 21:03 ` Pavel Machek
  2 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2020-07-12 21:03 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Linus Torvalds, Linux Kernel Mailing List

Hi!

> /* Summary */
> This contains an annotation patch for a data race in copy_process() reported by
> KCSAN when reading and writing nr_threads. The data race is intentional and

Would "KCSAN fixes" be better subject of the pull request? fixes is a bit
too generic...
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-12 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 20:47 [GIT PULL] fixes for v5.8-rc4 Christian Brauner
2020-07-03  5:45 ` Linus Torvalds
2020-07-03  6:10 ` pr-tracker-bot
2020-07-12 21:03 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).