The source for the Linux kernel used in Windows Subsystem for Linux 2 (WSL2)
Перейти к файлу
Joe Lawrence 55eb9a6c8b selftests/livepatch: better synchronize test_klp_callbacks_busy
The test_klp_callbacks_busy module conditionally blocks a future
livepatch transition by busy waiting inside its workqueue function,
busymod_work_func().  After scheduling this work, a test livepatch is
loaded, introducing the transition under test.

Both events are marked in the kernel log for later verification, but
there is no synchronization to ensure that busymod_work_func() logs its
function entry message before subsequent selftest commands log their own
messages.  This can lead to a rare test failure due to unexpected
ordering like:

  --- expected
  +++ result
  @@ -1,7 +1,7 @@
   % modprobe test_klp_callbacks_busy block_transition=Y
   test_klp_callbacks_busy: test_klp_callbacks_busy_init
  -test_klp_callbacks_busy: busymod_work_func enter
   % modprobe test_klp_callbacks_demo
  +test_klp_callbacks_busy: busymod_work_func enter
   livepatch: enabling patch 'test_klp_callbacks_demo'
   livepatch: 'test_klp_callbacks_demo': initializing patching transition
   test_klp_callbacks_demo: pre_patch_callback: vmlinux

Force the module init function to wait until busymod_work_func() has
started (and logged its message), before exiting to the next selftest
steps.

Fixes: 547840bd5a ("selftests/livepatch: simplify test-klp-callbacks busy target tests")
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20220602203233.979681-1-joe.lawrence@redhat.com
2022-06-15 10:29:10 +02:00
Documentation RTC for 5.19 2022-06-01 14:48:13 -07:00
LICENSES
arch Livepatching changes for 5.19 2022-06-02 08:55:01 -07:00
block
certs
crypto This update includes the following changes: 2022-05-27 18:06:49 -07:00
drivers i2c: ismt: prevent memory corruption in ismt_access() 2022-06-02 08:40:56 -07:00
fs xfs: Changes for 5.19-rc1 [2nd set] 2022-06-01 17:23:53 -07:00
include Livepatching changes for 5.19 2022-06-02 08:55:01 -07:00
init RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
ipc
kernel Livepatching changes for 5.19 2022-06-02 08:55:01 -07:00
lib selftests/livepatch: better synchronize test_klp_callbacks_busy 2022-06-15 10:29:10 +02:00
mm RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
net NFS Client Updates for Linux 5.18 2022-05-31 16:58:24 -07:00
samples
scripts Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
security
sound m68knommu: changes for linux 5.19 2022-05-30 10:56:18 -07:00
tools memblock: comment updates for memblock test suite 2022-06-02 08:46:30 -07:00
usr Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
virt VFIO updates for v5.19-rc1 2022-06-01 13:49:15 -07:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Livepatching changes for 5.19 2022-06-02 08:55:01 -07:00
Makefile
README

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.