Main-line Linux kernel tree http://www.kernel.org
Go to file
Paul E. McKenney 1dcaa3b462 context_tracking: Use arch_atomic_read() in __ct_state for KASAN
Context tracking's __ct_state() function can be invoked from noinstr state
where RCU is not watching.  This means that its use of atomic_read()
causes KASAN to invoke the non-noinstr __kasan_check_read() function
from the noinstr function __ct_state().  This is problematic because
someone tracing the __kasan_check_read() function could get a nasty
surprise because of RCU not watching.

This commit therefore replaces the __ct_state() function's use of
atomic_read() with arch_atomic_read(), which KASAN does not attempt to
add instrumention to.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Marco Elver <elver@google.com>
Reviewed-by: Marco Elver <elver@google.com>
2022-07-05 13:33:00 -07:00
arch context_tracking: Take NMI eqs entrypoints over RCU 2022-07-05 13:32:59 -07:00
block
certs
crypto
Documentation rcu/context-tracking: Remove unused and/or unecessary middle functions 2022-07-05 13:33:00 -07:00
drivers context_tracking: Take IRQ eqs entrypoints over RCU 2022-07-05 13:32:59 -07:00
fs
include context_tracking: Use arch_atomic_read() in __ct_state for KASAN 2022-07-05 13:33:00 -07:00
init context_tracking: Split user tracking Kconfig 2022-06-29 17:04:09 -07:00
ipc
kernel MAINTAINERS: Add Paul as context tracking maintainer 2022-07-05 13:33:00 -07:00
lib
LICENSES
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Add Paul as context tracking maintainer 2022-07-05 13:33:00 -07:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.