mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Alexander Potapenko <glider@google.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Dmitry Vyukov <dvyukov@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Andrey Konovalov <andreyknvl@google.com>,
	Clark Williams <williams@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Marco Elver <elver@google.com>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Christoph Hellwig <hch@infradead.org>,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v7] kcov: fix data corruption and race conditions on PREEMPT_RT
Date: Sat, 25 Jul 2026 14:59:36 -0700	[thread overview]
Message-ID: <20260725145936.11e2d08c90044b8bcb3ab149@linux-foundation.org> (raw)
In-Reply-To: <43552d09-2ce2-4b19-b0d3-a2d1ab952145@I-love.SAKURA.ne.jp>

On Thu, 16 Jul 2026 08:01:29 +0900 Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> wrote:

> syzbot is reporting KCOV state corruption on PREEMPT_RT kernels, for the
> temporary storage used for saving/restoring remote KCOV state is currently
> allocated as the per-CPU area.
> 
> On PREEMPT_RT kernels, softirq handlers run as preemptible task threads
> (e.g., ksoftirqd). If a softirq context preempts a task running a remote
> KCOV session, it safely saves the task's state into the per-CPU area.
> However, if that softirq thread is subsequently preempted by a higher-
> priority softirq thread on the same CPU, the second softirq will overwrite
> the same per-CPU area, permanently destroying the original task's KCOV
> state.
> 
> Fix this data corruption by moving the temporary storage from the per-CPU
> area to the per-thread area. Since each softirq thread now owns its own
> task context, nested softirq preemption no longer causes data overwrites.

All sounds rather unpleasant.  Should we add cc:stable here?

  parent reply	other threads:[~2026-07-25 21:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-04 15:30 [PATCH (draft)] kcov: fix potential kcov_mode corruption under CONFIG_PREEMPT_RT Tetsuo Handa
2026-05-04 15:39 ` Tetsuo Handa
2026-05-05  8:15 ` [PATCH] " Tetsuo Handa
2026-05-06 11:55   ` [PATCH v2] kcov: fix state corruption under CONFIG_PREEMPT_RT by eliminating per-cpu data Tetsuo Handa
2026-05-09  8:09     ` [PATCH v3] kcov: move kcov_remote_data to task_struct for RT and remove local_lock Tetsuo Handa
2026-05-15  7:10       ` Dmitry Vyukov
2026-05-20 10:33         ` Tetsuo Handa
2026-05-20 15:12       ` Sebastian Andrzej Siewior
2026-05-21  8:38       ` Sebastian Andrzej Siewior
2026-05-21 15:28         ` Tetsuo Handa
2026-05-21 18:14           ` Sebastian Andrzej Siewior
2026-05-22  2:39             ` Tetsuo Handa
2026-05-22 11:10               ` [PATCH v4] kcov: move kcov_remote_data to task_struct " Tetsuo Handa
2026-05-22 13:27                 ` Sebastian Andrzej Siewior
2026-05-29  6:35                 ` Tetsuo Handa
2026-06-27  9:58                   ` [PATCH v5] kcov: fix data corruption and race conditions on PREEMPT_RT by moving saved remote state to task_struct Tetsuo Handa
2026-07-07 13:36                     ` Tetsuo Handa
2026-07-07 15:00                       ` Alexander Potapenko
2026-07-07 22:07                         ` Tetsuo Handa
2026-07-08 15:28                     ` Alexander Potapenko
2026-07-09 13:35                       ` Tetsuo Handa
2026-07-10 10:43                         ` Alexander Potapenko
2026-07-10 11:32                           ` [PATCH v6] " Tetsuo Handa
2026-07-10 12:16                             ` Alexander Potapenko
2026-07-15 23:01                               ` [PATCH v7] kcov: fix data corruption and race conditions on PREEMPT_RT Tetsuo Handa
2026-07-16  9:12                                 ` Alexander Potapenko
2026-07-25 21:59                                 ` Andrew Morton [this message]
2026-07-27 10:37                                   ` Alexander Potapenko
2026-07-10 14:24                             ` [PATCH v6] kcov: fix data corruption and race conditions on PREEMPT_RT by moving saved remote state to task_struct Sebastian Andrzej Siewior
2026-05-21 13:06       ` [PATCH v3] kcov: move kcov_remote_data to task_struct for RT and remove local_lock Alexander Potapenko
2026-05-21 14:39         ` Tetsuo Handa

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=20260725145936.11e2d08c90044b8bcb3ab149@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=andreyknvl@google.com \
    --cc=bigeasy@linutronix.de \
    --cc=broonie@kernel.org \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=roman.gushchin@linux.dev \
    --cc=stern@rowland.harvard.edu \
    --cc=williams@redhat.com \
    /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®