mirror of
https://github.com/dynup/kpatch
synced 2024-12-18 11:24:33 +00:00
dc1d49a142
* gcc-constprop.patch In v4.20, 33e26418193f ("y2038: make do_gettimeofday() and get_seconds() inline"), do_gettimeofdat() no longer exists as a stand alone function in kernel/time/timekeeping.c. * gcc-static-local-var-4.patch Unlike on rhel-8.4, _always_inline put_aio_ring_file() is causing too many inlines and results in modified, but not ftrace-able, __do_sys_io_submit() and __do_sys_io_setup(). Remove the annotation from this function. * module.patch In v4.20, 9ceddd9da134 ("knfsd: Allow lockless lookups of the exports"), the nfs_exports_op seq_operations converted to RCU protected lookups. Calling yield() from a kpatched e_show() results in a kernel warning, "Voluntary context switch within RCU read-side critical section!" Substitute with single_task_running(), which does not context switch or have any other side effects. In v5.10, ec6347bb4339 ("x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()") did away with the mcsafe_key. Use another exported static key like context_tracking_enabled. In v5.13, a0e2bf7cb700 ("x86/paravirt: Switch time pvops functions to use static_call()"), paravirt_sched_clock() was converted from a paravirt call to a non-exported static call. Update the x86 code to instead call __flush_tlb_local() (which is still a paravirt call). Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
23 lines
548 B
Diff
23 lines
548 B
Diff
diff -Nupr src.orig/kernel/fork.c src/kernel/fork.c
|
|
--- src.orig/kernel/fork.c 2022-04-29 15:52:13.577336397 -0400
|
|
+++ src/kernel/fork.c 2022-04-29 15:53:18.857568709 -0400
|
|
@@ -1635,10 +1635,18 @@ static void posix_cpu_timers_init_group(
|
|
posix_cputimers_group_init(pct, cpu_limit);
|
|
}
|
|
|
|
+void kpatch_foo(void)
|
|
+{
|
|
+ if (!jiffies)
|
|
+ printk("kpatch copy signal\n");
|
|
+}
|
|
+
|
|
static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
|
|
{
|
|
struct signal_struct *sig;
|
|
|
|
+ kpatch_foo();
|
|
+
|
|
if (clone_flags & CLONE_THREAD)
|
|
return 0;
|
|
|