Re: [GIT pull - RFC] locking/kcsan for v5.8
From: Will Deacon
Date: Fri Jun 05 2020 - 07:15:39 EST
Hi folks,
On Tue, Jun 02, 2020 at 01:05:02PM -0000, Thomas Gleixner wrote:
> Linus,
>
> please consider to pull the latest locking/kcsan branch from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-kcsan-2020-06-02
>
> up to: f05e1242fbb2: compiler_types.h: Use unoptimized __unqual_scalar_typeof for sparse
Just in case it's not clear, this pull request also contains the READ_ONCE
rework I've been working on for a while, which bumps the minimum GCC version
and improves code-gen on arm64 when stack protector is enabled:
> Will Deacon (19):
> sparc32: mm: Fix argument checking in __srmmu_get_nocache()
> sparc32: mm: Restructure sparc32 MMU page-table layout
> sparc32: mm: Change pgtable_t type to pte_t * instead of struct page *
> sparc32: mm: Reduce allocation size for PMD and PTE tables
> compiler/gcc: Raise minimum GCC version for kernel builds to 4.8
> linux/compiler.h: Remove redundant '#else'
> netfilter: Avoid assigning 'const' pointer to non-const pointer
> net: tls: Avoid assigning 'const' pointer to non-const pointer
> fault_inject: Don't rely on "return value" from WRITE_ONCE()
> arm64: csum: Disable KASAN for do_csum()
> READ_ONCE: Simplify implementations of {READ,WRITE}_ONCE()
> READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses
> READ_ONCE: Drop pointer qualifiers when reading from scalar types
> locking/barriers: Use '__unqual_scalar_typeof' for load-acquire macros
> arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release macros
> gcov: Remove old GCC 3.4 support
> kcsan: Rework data_race() so that it can be used by READ_ONCE()
> READ_ONCE: Use data_race() to avoid KCSAN instrumentation
> READ_ONCE: Fix comment describing 2x32-bit atomicity
The reason it's bundled up with KCSAN is because of conflicts in linux-next
but the series is reasonably mature so it would be a shame if it missed 5.8.
On the off-chance that this lot doesn't make it (it is, after all, an RFC!),
I've stuck the READ_ONCE stuff on its own branch (see below), with some
cherry-picks of fixes that ended up in -tip. The sparc patches are all
sitting in sparc-next, so they'll come in via davem.
Obviously it would better if everything went upstream, but I'm just trying
to avoid throwing the baby out with the bathwater if KCSAN needs a little
longer to bake.
Cheers,
Will
--->8
The following changes since commit 8f3d9f354286745c751374f5f1fcafee6b3f3136:
Linux 5.7-rc1 (2020-04-12 12:35:55 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git rwonce/rework
for you to fetch changes up to b398ace5d2ea0b7f00d9f1ce23c647e289c206ca:
compiler_types.h: Use unoptimized __unqual_scalar_typeof for sparse (2020-06-05 11:40:01 +0100)
----------------------------------------------------------------
Marco Elver (2):
compiler_types.h: Optimize __unqual_scalar_typeof compilation time
compiler_types.h: Use unoptimized __unqual_scalar_typeof for sparse
Will Deacon (14):
compiler/gcc: Raise minimum GCC version for kernel builds to 4.8
netfilter: Avoid assigning 'const' pointer to non-const pointer
net: tls: Avoid assigning 'const' pointer to non-const pointer
fault_inject: Don't rely on "return value" from WRITE_ONCE()
arm64: csum: Disable KASAN for do_csum()
READ_ONCE: Simplify implementations of {READ,WRITE}_ONCE()
READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses
READ_ONCE: Drop pointer qualifiers when reading from scalar types
locking/barriers: Use '__unqual_scalar_typeof' for load-acquire macros
arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release macros
gcov: Remove old GCC 3.4 support
READ_ONCE: Fix comment describing 2x32-bit atomicity
compiler-types.h: Include naked type in __pick_integer_type() match
compiler.h: Enforce that READ_ONCE_NOCHECK() access size is sizeof(long)
Documentation/process/changes.rst | 2 +-
arch/arm/crypto/Kconfig | 12 +-
arch/arm64/include/asm/barrier.h | 16 +-
arch/arm64/lib/csum.c | 20 +-
crypto/Kconfig | 1 -
drivers/xen/time.c | 2 +-
include/asm-generic/barrier.h | 16 +-
include/linux/compiler-gcc.h | 5 +-
include/linux/compiler.h | 148 +++++-----
include/linux/compiler_types.h | 47 ++++
init/Kconfig | 1 -
kernel/gcov/Kconfig | 24 --
kernel/gcov/Makefile | 3 +-
kernel/gcov/gcc_3_4.c | 573 --------------------------------------
lib/fault-inject.c | 4 +-
net/netfilter/core.c | 2 +-
net/tls/tls_main.c | 2 +-
scripts/gcc-plugins/Kconfig | 2 +-
18 files changed, 161 insertions(+), 719 deletions(-)
delete mode 100644 kernel/gcov/gcc_3_4.c