mirror of
https://github.com/dynup/kpatch
synced 2025-04-27 13:37:57 +00:00
* 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>
26 lines
894 B
Diff
26 lines
894 B
Diff
diff -Nupr src.orig/drivers/tty/n_tty.c src/drivers/tty/n_tty.c
|
|
--- src.orig/drivers/tty/n_tty.c 2022-04-29 15:52:13.274335318 -0400
|
|
+++ src/drivers/tty/n_tty.c 2022-04-29 15:53:04.777518603 -0400
|
|
@@ -2253,7 +2253,7 @@ more_to_be_read:
|
|
* lock themselves)
|
|
*/
|
|
|
|
-static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
|
|
+static ssize_t noinline kpatch_n_tty_write(struct tty_struct *tty, struct file *file,
|
|
const unsigned char *buf, size_t nr)
|
|
{
|
|
const unsigned char *b = buf;
|
|
@@ -2340,6 +2340,12 @@ break_out:
|
|
return (b - buf) ? b - buf : retval;
|
|
}
|
|
|
|
+static ssize_t __attribute__((optimize("-fno-optimize-sibling-calls"))) n_tty_write(struct tty_struct *tty, struct file *file,
|
|
+ const unsigned char *buf, size_t nr)
|
|
+{
|
|
+ return kpatch_n_tty_write(tty, file, buf, nr);
|
|
+}
|
|
+
|
|
/**
|
|
* n_tty_poll - poll method for N_TTY
|
|
* @tty: terminal device
|