From e7e117005133418180aae4a810cfb18b17f415f2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 14 Aug 2022 11:40:26 +0200 Subject: [PATCH] fix up selftests-livepatch-better-synchronize-test_klp_call.patch to apply using quilt --- ...tch-better-synchronize-test_klp_call.patch | 33 ++++++++----------- ...tch-better-synchronize-test_klp_call.patch | 33 ++++++++----------- ...tch-better-synchronize-test_klp_call.patch | 33 ++++++++----------- ...tch-better-synchronize-test_klp_call.patch | 22 ++++++------- 4 files changed, 53 insertions(+), 68 deletions(-) diff --git a/queue-5.10/selftests-livepatch-better-synchronize-test_klp_call.patch b/queue-5.10/selftests-livepatch-better-synchronize-test_klp_call.patch index c54039b063d..fdc75c35f1c 100644 --- a/queue-5.10/selftests-livepatch-better-synchronize-test_klp_call.patch +++ b/queue-5.10/selftests-livepatch-better-synchronize-test_klp_call.patch @@ -18,17 +18,17 @@ 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 +# --- 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 @@ -41,14 +41,12 @@ Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220602203233.979681-1-joe.lawrence@redhat.com Signed-off-by: Sasha Levin --- - lib/livepatch/test_klp_callbacks_busy.c | 8 ++++++++ + lib/livepatch/test_klp_callbacks_busy.c | 8 ++++++++ 1 file changed, 8 insertions(+) -diff --git a/lib/livepatch/test_klp_callbacks_busy.c b/lib/livepatch/test_klp_callbacks_busy.c -index 7ac845f65be5..133929e0ce8f 100644 --- a/lib/livepatch/test_klp_callbacks_busy.c +++ b/lib/livepatch/test_klp_callbacks_busy.c -@@ -16,10 +16,12 @@ MODULE_PARM_DESC(block_transition, "block_transition (default=false)"); +@@ -16,10 +16,12 @@ MODULE_PARM_DESC(block_transition, "bloc static void busymod_work_func(struct work_struct *work); static DECLARE_WORK(work, busymod_work_func); @@ -61,7 +59,7 @@ index 7ac845f65be5..133929e0ce8f 100644 while (READ_ONCE(block_transition)) { /* -@@ -37,6 +39,12 @@ static int test_klp_callbacks_busy_init(void) +@@ -37,6 +39,12 @@ static int test_klp_callbacks_busy_init( pr_info("%s\n", __func__); schedule_work(&work); @@ -74,6 +72,3 @@ index 7ac845f65be5..133929e0ce8f 100644 if (!block_transition) { /* * Serialize output: print all messages from the work --- -2.35.1 - diff --git a/queue-5.15/selftests-livepatch-better-synchronize-test_klp_call.patch b/queue-5.15/selftests-livepatch-better-synchronize-test_klp_call.patch index 35b27125a3f..25ad96c39bc 100644 --- a/queue-5.15/selftests-livepatch-better-synchronize-test_klp_call.patch +++ b/queue-5.15/selftests-livepatch-better-synchronize-test_klp_call.patch @@ -18,17 +18,17 @@ 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 +# --- 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 @@ -41,14 +41,12 @@ Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220602203233.979681-1-joe.lawrence@redhat.com Signed-off-by: Sasha Levin --- - lib/livepatch/test_klp_callbacks_busy.c | 8 ++++++++ + lib/livepatch/test_klp_callbacks_busy.c | 8 ++++++++ 1 file changed, 8 insertions(+) -diff --git a/lib/livepatch/test_klp_callbacks_busy.c b/lib/livepatch/test_klp_callbacks_busy.c -index 7ac845f65be5..133929e0ce8f 100644 --- a/lib/livepatch/test_klp_callbacks_busy.c +++ b/lib/livepatch/test_klp_callbacks_busy.c -@@ -16,10 +16,12 @@ MODULE_PARM_DESC(block_transition, "block_transition (default=false)"); +@@ -16,10 +16,12 @@ MODULE_PARM_DESC(block_transition, "bloc static void busymod_work_func(struct work_struct *work); static DECLARE_WORK(work, busymod_work_func); @@ -61,7 +59,7 @@ index 7ac845f65be5..133929e0ce8f 100644 while (READ_ONCE(block_transition)) { /* -@@ -37,6 +39,12 @@ static int test_klp_callbacks_busy_init(void) +@@ -37,6 +39,12 @@ static int test_klp_callbacks_busy_init( pr_info("%s\n", __func__); schedule_work(&work); @@ -74,6 +72,3 @@ index 7ac845f65be5..133929e0ce8f 100644 if (!block_transition) { /* * Serialize output: print all messages from the work --- -2.35.1 - diff --git a/queue-5.18/selftests-livepatch-better-synchronize-test_klp_call.patch b/queue-5.18/selftests-livepatch-better-synchronize-test_klp_call.patch index ec78b6ace29..8ef119b9947 100644 --- a/queue-5.18/selftests-livepatch-better-synchronize-test_klp_call.patch +++ b/queue-5.18/selftests-livepatch-better-synchronize-test_klp_call.patch @@ -18,17 +18,17 @@ 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 +# --- 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 @@ -41,14 +41,12 @@ Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220602203233.979681-1-joe.lawrence@redhat.com Signed-off-by: Sasha Levin --- - lib/livepatch/test_klp_callbacks_busy.c | 8 ++++++++ + lib/livepatch/test_klp_callbacks_busy.c | 8 ++++++++ 1 file changed, 8 insertions(+) -diff --git a/lib/livepatch/test_klp_callbacks_busy.c b/lib/livepatch/test_klp_callbacks_busy.c -index 7ac845f65be5..133929e0ce8f 100644 --- a/lib/livepatch/test_klp_callbacks_busy.c +++ b/lib/livepatch/test_klp_callbacks_busy.c -@@ -16,10 +16,12 @@ MODULE_PARM_DESC(block_transition, "block_transition (default=false)"); +@@ -16,10 +16,12 @@ MODULE_PARM_DESC(block_transition, "bloc static void busymod_work_func(struct work_struct *work); static DECLARE_WORK(work, busymod_work_func); @@ -61,7 +59,7 @@ index 7ac845f65be5..133929e0ce8f 100644 while (READ_ONCE(block_transition)) { /* -@@ -37,6 +39,12 @@ static int test_klp_callbacks_busy_init(void) +@@ -37,6 +39,12 @@ static int test_klp_callbacks_busy_init( pr_info("%s\n", __func__); schedule_work(&work); @@ -74,6 +72,3 @@ index 7ac845f65be5..133929e0ce8f 100644 if (!block_transition) { /* * Serialize output: print all messages from the work --- -2.35.1 - diff --git a/queue-5.19/selftests-livepatch-better-synchronize-test_klp_call.patch b/queue-5.19/selftests-livepatch-better-synchronize-test_klp_call.patch index 7cb025c1f6c..3ac49f0aa3f 100644 --- a/queue-5.19/selftests-livepatch-better-synchronize-test_klp_call.patch +++ b/queue-5.19/selftests-livepatch-better-synchronize-test_klp_call.patch @@ -18,17 +18,17 @@ 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 +# --- 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 -- 2.47.3