linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Will Deacon <will@kernel.org>
Cc: linux-kernel@vger.kernel.org, boqun.feng@gmail.com, bp@alien8.de,
	catalin.marinas@arm.com, dvyukov@google.com, elver@google.com,
	ink@jurassic.park.msu.ru, jonas@southpole.se,
	juri.lelli@redhat.com, linux@armlinux.org.uk, luto@kernel.org,
	mattst88@gmail.com, mingo@redhat.com, monstr@monstr.eu,
	paulmck@kernel.org, peterz@infradead.org, rth@twiddle.net,
	shorne@gmail.com, stefan.kristiansson@saunalahti.fi,
	tglx@linutronix.de, vincent.guittot@linaro.org
Subject: Re: [PATCH v2 0/9] thread_info: use helpers to snapshot thread flags
Date: Tue, 22 Jun 2021 15:45:46 +0100	[thread overview]
Message-ID: <20210622144546.GB71782@C02TD0UTHF1T.local> (raw)
In-Reply-To: <20210621175452.GB29713@willie-the-truck>

On Mon, Jun 21, 2021 at 06:54:53PM +0100, Will Deacon wrote:
> On Mon, Jun 21, 2021 at 10:05:52AM +0100, Mark Rutland wrote:
> > As thread_info::flags scan be manipulated by remote threads, it is
> > necessary to use atomics or READ_ONCE() to ensure that code manipulates
> > a consistent snapshot, but we open-code plain accesses to
> > thread_info::flags across the kernel tree.
> > 
> > Generally we get away with this, but tools like KCSAN legitimately warn
> > that there is a data-race, and this is potentially fragile with compiler
> > optimizations, LTO, etc.
> > 
> > These patches introduce new helpers to snahpshot the thread flags, with
> > the intent being that these should replace all plain accesses.
> > 
> > Since v1 [1]:
> > * Drop RFC
> > * Make read_ti_thread_flags() __always_inline
> > * Clarify commit messages
> > * Fix typo in arm64 patch
> > * Accumulate Reviewed-by / Acked-by tags
> > * Drop powerpc patch to avoid potential conflicts (per [2])
> > 
> > [1] https://lore.kernel.org/r/20210609122001.18277-1-mark.rutland@arm.com
> > [2] https://lore.kernel.org/r/87k0mvtgeb.fsf@mpe.ellerman.id.au
> > 
> > Thanks,
> > Mark.
> > 
> > Mark Rutland (9):
> >   thread_info: add helpers to snapshot thread flags
> >   entry: snapshot thread flags
> >   sched: snapshot thread flags
> >   alpha: snapshot thread flags
> >   arm: snapshot thread flags
> >   arm64: snapshot thread flags
> 
> FWIW, you have two identical arm64 patches in this series, just with a
> different subject.

Whoops; I'd tried to bring arm64 in line with the other patches, but
forgot to delete the stale patch file when I did that. I'll keep the
"snapshot thread flags" version.

> For the one you decide to keep:
>
> Acked-by: Will Deacon <will@kernel.org>

Thanks!

Mark.

      reply	other threads:[~2021-06-22 14:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  9:05 [PATCH v2 0/9] thread_info: use helpers to snapshot thread flags Mark Rutland
2021-06-21  9:05 ` [PATCH v2 1/9] thread_info: add " Mark Rutland
2021-06-21  9:05 ` [PATCH v2 2/9] entry: " Mark Rutland
2021-06-21  9:05 ` [PATCH v2 3/9] sched: " Mark Rutland
2021-06-21  9:05 ` [PATCH v2 4/9] alpha: " Mark Rutland
2021-06-21  9:05 ` [PATCH v2 5/9] arm: " Mark Rutland
2021-06-21  9:05 ` [PATCH v2 6/9] arm64: read " Mark Rutland
2021-06-21  9:05 ` [PATCH v2 6/9] arm64: snapshot " Mark Rutland
2021-06-21  9:06 ` [PATCH v2 7/9] microblaze: " Mark Rutland
2021-06-21  9:06 ` [PATCH v2 8/9] openrisc: " Mark Rutland
2021-06-21  9:06 ` [PATCH v2 9/9] x86: " Mark Rutland
2021-06-21 17:54 ` [PATCH v2 0/9] thread_info: use helpers to " Will Deacon
2021-06-22 14:45   ` Mark Rutland [this message]

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=20210622144546.GB71782@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jonas@southpole.se \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=luto@kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rth@twiddle.net \
    --cc=shorne@gmail.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=will@kernel.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;
as well as URLs for NNTP newsgroup(s).