mirror of
https://github.com/dynup/kpatch
synced 2024-12-12 00:14:35 +00:00
9c3c9b0c0a
gcc renames static local variables by appending a period and a number. For example, __key could be renamed to __key.31452. Unfortunately this number can arbitrarily change. Try to rename the patched version of the symbol to match the base version and then correlate them. Fixes #313.
27 lines
616 B
Diff
27 lines
616 B
Diff
Index: src/arch/x86/kernel/ldt.c
|
|
===================================================================
|
|
--- src.orig/arch/x86/kernel/ldt.c
|
|
+++ src/arch/x86/kernel/ldt.c
|
|
@@ -100,6 +100,12 @@ static inline int copy_ldt(mm_context_t
|
|
return 0;
|
|
}
|
|
|
|
+void hi_there(void)
|
|
+{
|
|
+ if (!jiffies)
|
|
+ printk("hi there\n");
|
|
+}
|
|
+
|
|
/*
|
|
* we do not have to muck with descriptors here, that is
|
|
* done in switch_mm() as needed.
|
|
@@ -109,6 +115,8 @@ int init_new_context(struct task_struct
|
|
struct mm_struct *old_mm;
|
|
int retval = 0;
|
|
|
|
+ hi_there();
|
|
+
|
|
mutex_init(&mm->context.lock);
|
|
mm->context.size = 0;
|
|
old_mm = current->mm;
|