Patch "ftrace/x86: Add back ftrace_expected for ftrace bug reports" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ftrace/x86: Add back ftrace_expected for ftrace bug reports

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ftrace-x86-add-back-ftrace_expected-for-ftrace-bug-reports.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From fd3dc56253acbe9c641a66d312d8393cd55eb04c Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
Date: Fri, 9 Dec 2022 10:52:47 -0500
Subject: ftrace/x86: Add back ftrace_expected for ftrace bug reports

From: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

commit fd3dc56253acbe9c641a66d312d8393cd55eb04c upstream.

After someone reported a bug report with a failed modification due to the
expected value not matching what was found, it came to my attention that
the ftrace_expected is no longer set when that happens. This makes for
debugging the issue a bit more difficult.

Set ftrace_expected to the expected code before calling ftrace_bug, so
that it shows what was expected and why it failed.

Link: https://lore.kernel.org/all/CA+wXwBQ-VhK+hpBtYtyZP-NiX4g8fqRRWithFOHQW-0coQ3vLg@xxxxxxxxxxxxxx/
Link: https://lore.kernel.org/linux-trace-kernel/20221209105247.01d4e51d@xxxxxxxxxxxxxxxxxx

Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Fixes: 768ae4406a5c ("x86/ftrace: Use text_poke()")
Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/x86/kernel/ftrace.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -217,7 +217,9 @@ void ftrace_replace_code(int enable)
 
 		ret = ftrace_verify_code(rec->ip, old);
 		if (ret) {
+			ftrace_expected = old;
 			ftrace_bug(ret, rec);
+			ftrace_expected = NULL;
 			return;
 		}
 	}


Patches currently in stable-queue which might be from rostedt@xxxxxxxxxxx are

queue-6.0/tracing-fix-race-where-eprobes-can-be-called-before-the-event.patch
queue-6.0/tracing-fix-issue-of-missing-one-synthetic-field.patch
queue-6.0/tracing-hist-fix-wrong-return-value-in-parse_action_params.patch
queue-6.0/tracing-probes-handle-system-names-with-hyphens.patch
queue-6.0/tracing-hist-fix-out-of-bound-write-on-action_data.var_ref_idx.patch
queue-6.0/kest.pl-fix-grub2-menu-handling-for-rebooting.patch
queue-6.0/ktest.pl-minconfig-unset-configs-instead-of-just-removing-them.patch
queue-6.0/tracing-fix-complicated-dependency-of-config_tracer_max_trace.patch
queue-6.0/tracing-fix-infinite-loop-in-tracing_read_pipe-on-overflowed-print_trace_line.patch
queue-6.0/ftrace-x86-add-back-ftrace_expected-for-ftrace-bug-reports.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux