From: Rohan McLure <rmclure@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Rohan McLure <rmclure@linux.ibm.com>, npiggin@gmail.com
Subject: [PATCH v3 0/5] powerpc: Add KCSAN support
Date: Mon, 6 Feb 2023 13:17:56 +1100 [thread overview]
Message-ID: <20230206021801.105268-1-rmclure@linux.ibm.com> (raw)
Add Kernel Concurrency Sanitiser support for PPC64. Doing so involves
exclusion of a number of compilation units from instrumentation, as was
done with KASAN.
KCSAN uses watchpoints on memory accesses to enforce the semantics of
the Linux kernel memory model, notifying the user of observed data races
which have not been declared to be intended in source through the
data_race() macro, in order to remove false positives.
A number of such race conditions are identified. This patch series
provides support for the instrumentation, with bug fixes as well as
removal of false positives to be issued in future patches.
v3: Restrict support to PPC64 as kcsan code expects support for
__atomic* builtins for 64-bit atomic types.
v2: Implement __smp_mb() in terms of __mb() to avoid multiple calls to
kcsan_mb().
Link: https://lore.kernel.org/linuxppc-dev/20230201043438.1301212-4-rmclure@linux.ibm.com/
v1: https://lore.kernel.org/linuxppc-dev/20230131234859.1275125-1-rmclure@linux.ibm.com/
Rohan McLure (5):
powerpc: kcsan: Add exclusions from instrumentation
powerpc: kcsan: Exclude udelay to prevent recursive instrumentation
powerpc: kcsan: Memory barriers semantics
powerpc: kcsan: Prevent recursive instrumentation with IRQ
save/restores
powerpc: kcsan: Add KCSAN Support
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/barrier.h | 12 ++++++------
arch/powerpc/kernel/Makefile | 10 ++++++++++
arch/powerpc/kernel/irq_64.c | 6 +++---
arch/powerpc/kernel/time.c | 4 ++--
arch/powerpc/kernel/trace/Makefile | 1 +
arch/powerpc/kernel/vdso/Makefile | 1 +
arch/powerpc/lib/Makefile | 2 ++
arch/powerpc/purgatory/Makefile | 1 +
arch/powerpc/xmon/Makefile | 1 +
10 files changed, 28 insertions(+), 11 deletions(-)
--
2.37.2
next reply other threads:[~2023-02-06 2:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-06 2:17 Rohan McLure [this message]
2023-02-06 2:17 ` [PATCH v3 1/5] powerpc: kcsan: Add exclusions from instrumentation Rohan McLure
2023-02-06 2:17 ` [PATCH v3 2/5] powerpc: kcsan: Exclude udelay to prevent recursive instrumentation Rohan McLure
2023-02-06 2:17 ` [PATCH v3 3/5] powerpc: kcsan: Memory barriers semantics Rohan McLure
2023-02-06 2:18 ` [PATCH v3 4/5] powerpc: kcsan: Prevent recursive instrumentation with IRQ save/restores Rohan McLure
2023-02-06 2:18 ` [PATCH v3 5/5] powerpc: kcsan: Add KCSAN Support Rohan McLure
2023-02-06 8:13 ` Christophe Leroy
2023-02-06 8:12 ` [PATCH v3 0/5] powerpc: Add KCSAN support Christophe Leroy
2023-02-15 12:41 ` Michael Ellerman
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=20230206021801.105268-1-rmclure@linux.ibm.com \
--to=rmclure@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.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;
as well as URLs for NNTP newsgroup(s).