|
@@ -54,12 +54,11 @@ static int ftrace_modify_code(unsigned long pc, unsigned char *old_code,
|
|
|
unsigned char replaced[MCOUNT_INSN_SIZE];
|
|
|
|
|
|
/*
|
|
|
- * Note: Due to modules and __init, code can
|
|
|
- * disappear and change, we need to protect against faulting
|
|
|
- * as well as code changing.
|
|
|
- *
|
|
|
- * No real locking needed, this code is run through
|
|
|
- * kstop_machine.
|
|
|
+ * Note:
|
|
|
+ * We are paranoid about modifying text, as if a bug was to happen, it
|
|
|
+ * could cause us to read or write to someplace that could cause harm.
|
|
|
+ * Carefully read and modify the code with probe_kernel_*(), and make
|
|
|
+ * sure what we read is what we expected it to be before modifying it.
|
|
|
*/
|
|
|
|
|
|
/* read the text we want to modify */
|