kpatch/test/integration
Josh Poimboeuf f499fc25e0 test/integration: Updated module.patch for Linux 6.2
Yulia reported a bug with module.patch which can be seen with
CONFIG_PROVE_RCU:

  BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
  in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1053, name: grep
  preempt_count: 0, expected: 0
  RCU nest depth: 1, expected: 0
  2 locks held by grep/1053:
   #0: ffff8881079bf1a0 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0x55/0x460
   #1: ffffffff8275d620 (rcu_read_lock){....}-{1:2}, at: cache_seq_start_rcu+0x5/0x140 [sunrpc]
  CPU: 3 PID: 1053 Comm: grep Tainted: G           OE K    6.2.0 #57
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.1-2.fc37 04/01/2014
  Call Trace:
   <TASK>
   dump_stack_lvl+0x5b/0x77
   __might_resched.cold+0xff/0x13a
   cpus_read_lock+0x16/0xd0
   static_key_disable+0xe/0x20
   e_show+0x5b/0xd70 [livepatch_module]
   seq_read_iter+0x127/0x460
   seq_read+0xa3/0xd0
   proc_reg_read+0x52/0xa0
   vfs_read+0xc9/0x2f0
   ? __do_sys_newfstat+0x57/0x60
   ? lock_is_held_type+0xe8/0x140
   ksys_read+0x6c/0xf0
   do_syscall_64+0x37/0x90
   entry_SYSCALL_64_after_hwframe+0x72/0xdc
  RIP: 0033:0x7fbd314f7af0
  Code: b6 fe ff ff 48 8d 3d 2f 78 09 00 48 83 ec 08 e8 96 25 02 00 66 0f 1f 44 00 00 83 3d d9 db 2c 00 00 75 10 b8 00 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 7e e3 01 00 48 89 04 24
  RSP: 002b:00007ffcd6f1c708 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
  RAX: ffffffffffffffda RBX: 0000000000008000 RCX: 00007fbd314f7af0
  RDX: 0000000000008000 RSI: 0000563c751ea000 RDI: 0000000000000003
  RBP: 0000000000008000 R08: 0000000000009008 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000000246 R12: 0000563c751ea000
  R13: 0000000000000003 R14: 0000000000000003 R15: 0000563c751ea000

The problem is that the patched module's seq_operations take an RCU read
lock before calling e_show(), which is patched to call
static_key_disable(), which can sleep.

Fix the issue by moving all the module test code to a different module
(xfs) which doesn't take an RCU lock.

Also enable the pr_debug() test and make the static branch test
unconditional since they're supported by newer kernels and this test is
for 6.2.

Reported-by: Yulia Kopkova <ykopkova@redhat.com>
Debugged-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2023-03-22 17:45:07 -07:00
..
common test/integration: Skip disabled tests in multiple.test 2019-10-31 12:47:01 +00:00
fedora-27 integration: disable tests with jump labels 2020-01-24 10:37:25 +01:00
linux-5.10.11 test/integration: Add tests for patching a syscall 2022-04-20 08:35:12 -07:00
linux-5.18.0 test/integration: tweak paravirt call in module.patch 2022-06-16 11:06:10 -04:00
linux-6.2.0 test/integration: Updated module.patch for Linux 6.2 2023-03-22 17:45:07 -07:00
rhel-7.4 integration: update gcc-static-local-var-4.test 2020-02-14 16:09:37 -05:00
rhel-7.5 integration: update gcc-static-local-var-4.test 2020-02-14 16:09:37 -05:00
rhel-7.6 test/integration: Add integration tests for symvers disagreement 2020-08-17 12:38:32 +01:00
rhel-7.7 test/integration: Add integration tests for symvers disagreement 2020-08-17 12:38:32 +01:00
rhel-7.8 test/integration: Add integration tests for symvers disagreement 2020-08-17 12:38:32 +01:00
rhel-7.9 test/integration: Add tests for patching a syscall 2022-04-20 08:35:12 -07:00
rhel-8.0 test/integration/rhel-8.0: disable unneeded test 2021-08-17 09:37:44 +02:00
rhel-8.1 test/integration: Add integration tests for symvers disagreement 2020-08-17 12:38:32 +01:00
rhel-8.2 test/integration: Add integration tests for symvers disagreement 2020-08-17 12:38:32 +01:00
rhel-8.3 test/integration: add rhel-8.3 rebased patches 2020-12-10 12:39:15 -05:00
rhel-8.4 test/integration: Add tests for patching a syscall 2022-04-20 08:35:12 -07:00
rhel-8.6 test/integration/rhel-8.6: add kernel-4.18.0-372.9.1.el8 tests 2022-04-29 16:14:30 -04:00
rhel-8.7 test/integration/rhel-8.7: add kernel-4.18.0-425.3.1.el8 tests 2022-10-24 15:44:16 -04:00
rhel-9.0 test/integration: add missing syscall-LOADED.test for rhel-9.0 2022-06-17 14:50:52 -04:00
rhel-9.1 test/integration/rhel-9.1: add kernel-5.14.0-162.6.1.el9_1 tests 2022-10-24 15:34:26 -04:00
ubuntu-16.04 integration: update gcc-static-local-var-4.test 2020-02-14 16:09:37 -05:00
.gitignore test: add much quicker combined test option 2014-05-27 09:40:24 -05:00
Makefile testing: pass KPATCH_BUILD_OPTS to kpatch-test 2021-08-09 17:58:02 -04:00
centos-7 integration/centos-7: update tests to current kernel 2020-05-05 20:06:46 +02:00
centos-8 test/integration: centos-8 support 2020-07-22 11:16:09 +02:00
kpatch-test kpatch-test: Change DYNDEBUG_CONTROL setting to use sudo 2021-11-02 15:22:03 +09:00
lib.sh test/integration/lib.sh: combine Fedora, CentOS with RHEL dependencies 2022-05-23 08:47:18 -04:00
rebase-patches testing/integration: update rebase_patches tool 2020-03-10 10:36:46 -04:00
test-vagrant integration: temporary disable ubuntu1604 2019-01-11 10:34:13 +01:00
vm-integration-run test/integration: Silence unspecified input warning 2020-06-04 20:30:28 +01:00