1. 04 7月, 2018 1 次提交
  2. 16 6月, 2018 1 次提交
  3. 24 1月, 2018 1 次提交
    • S
      ftrace, orc, x86: Handle ftrace dynamically allocated trampolines · 6be7fa3c
      Steven Rostedt (VMware) 提交于
      The function tracer can create a dynamically allocated trampoline that is
      called by the function mcount or fentry hook that is used to call the
      function callback that is registered. The problem is that the orc undwinder
      will bail if it encounters one of these trampolines. This breaks the stack
      trace of function callbacks, which include the stack tracer and setting the
      stack trace for individual functions.
      
      Since these dynamic trampolines are basically copies of the static ftrace
      trampolines defined in ftrace_*.S, we do not need to create new orc entries
      for the dynamic trampolines. Finding the return address on the stack will be
      identical as the functions that were copied to create the dynamic
      trampolines. When encountering a ftrace dynamic trampoline, we can just use
      the orc entry of the ftrace static function that was copied for that
      trampoline.
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      6be7fa3c
  4. 17 1月, 2018 1 次提交
  5. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  6. 17 10月, 2017 1 次提交
  7. 11 10月, 2017 1 次提交
  8. 06 10月, 2017 2 次提交
    • S
      ftrace/kallsyms: Have /proc/kallsyms show saved mod init functions · 6171a031
      Steven Rostedt (VMware) 提交于
      If a module is loaded while tracing is enabled, then there's a possibility
      that the module init functions were traced. These functions have their name
      and address stored by ftrace such that it can translate the function address
      that is written into the buffer into a human readable function name.
      
      As userspace tools may be doing the same, they need a way to map function
      names to their address as well. This is done through reading /proc/kallsyms.
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      6171a031
    • S
      ftrace: Save module init functions kallsyms symbols for tracing · aba4b5c2
      Steven Rostedt (VMware) 提交于
      If function tracing is active when the module init functions are freed, then
      store them to be referenced by kallsyms. As module init functions can now be
      traced on module load, they were useless:
      
       ># echo ':mod:snd_seq' > set_ftrace_filter
       ># echo function > current_tracer
       ># modprobe snd_seq
       ># cat trace
       # tracer: function
       #
       #                              _-----=> irqs-off
       #                             / _----=> need-resched
       #                            | / _---=> hardirq/softirq
       #                            || / _--=> preempt-depth
       #                            ||| /     delay
       #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
       #              | |       |   ||||       |         |
               modprobe-2786  [000] ....  3189.037874: 0xffffffffa0860000 <-do_one_initcall
               modprobe-2786  [000] ....  3189.037876: 0xffffffffa086004d <-0xffffffffa086000f
               modprobe-2786  [000] ....  3189.037876: 0xffffffffa086010d <-0xffffffffa0860018
               modprobe-2786  [000] ....  3189.037877: 0xffffffffa086011a <-0xffffffffa0860021
               modprobe-2786  [000] ....  3189.037877: 0xffffffffa0860080 <-0xffffffffa086002a
               modprobe-2786  [000] ....  3189.039523: 0xffffffffa0860400 <-0xffffffffa0860033
               modprobe-2786  [000] ....  3189.039523: 0xffffffffa086038a <-0xffffffffa086041c
               modprobe-2786  [000] ....  3189.039591: 0xffffffffa086038a <-0xffffffffa0860436
               modprobe-2786  [000] ....  3189.039657: 0xffffffffa086038a <-0xffffffffa0860450
               modprobe-2786  [000] ....  3189.039719: 0xffffffffa0860127 <-0xffffffffa086003c
               modprobe-2786  [000] ....  3189.039742: snd_seq_create_kernel_client <-0xffffffffa08601f6
      
      When the output is shown, the kallsyms for the module init functions have
      already been freed, and the output of the trace can not convert them to
      their function names.
      
      Now this looks like this:
      
       # tracer: function
       #
       #                              _-----=> irqs-off
       #                             / _----=> need-resched
       #                            | / _---=> hardirq/softirq
       #                            || / _--=> preempt-depth
       #                            ||| /     delay
       #           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
       #              | |       |   ||||       |         |
               modprobe-2463  [002] ....   174.243237: alsa_seq_init <-do_one_initcall
               modprobe-2463  [002] ....   174.243239: client_init_data <-alsa_seq_init
               modprobe-2463  [002] ....   174.243240: snd_sequencer_memory_init <-alsa_seq_init
               modprobe-2463  [002] ....   174.243240: snd_seq_queues_init <-alsa_seq_init
               modprobe-2463  [002] ....   174.243240: snd_sequencer_device_init <-alsa_seq_init
               modprobe-2463  [002] ....   174.244860: snd_seq_info_init <-alsa_seq_init
               modprobe-2463  [002] ....   174.244861: create_info_entry <-snd_seq_info_init
               modprobe-2463  [002] ....   174.244936: create_info_entry <-snd_seq_info_init
               modprobe-2463  [002] ....   174.245003: create_info_entry <-snd_seq_info_init
               modprobe-2463  [002] ....   174.245072: snd_seq_system_client_init <-alsa_seq_init
               modprobe-2463  [002] ....   174.245094: snd_seq_create_kernel_client <-snd_seq_system_client_init
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      aba4b5c2
  9. 05 10月, 2017 1 次提交
  10. 01 9月, 2017 1 次提交
  11. 20 7月, 2017 1 次提交
  12. 26 6月, 2017 2 次提交
  13. 22 6月, 2017 1 次提交
  14. 09 5月, 2017 1 次提交
  15. 21 4月, 2017 2 次提交
  16. 19 4月, 2017 1 次提交
    • S
      ftrace: Move the probe function into the tracing directory · ec19b859
      Steven Rostedt (VMware) 提交于
      As nothing outside the tracing directory uses the function probes mechanism,
      I'm moving the prototypes out of the include/linux/ftrace.h and into the
      local kernel/trace/trace.h header. I plan on making them hook to the
      trace_array structure which is local to kernel/trace, and I do not want to
      expose it to the rest of the kernel. This requires that the probe functions
      must also be local to tracing. But luckily nothing else uses them.
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      ec19b859
  17. 11 4月, 2017 2 次提交
  18. 04 4月, 2017 1 次提交
    • S
      ftrace: Have init/main.c call ftrace directly to free init memory · b80f0f6c
      Steven Rostedt (VMware) 提交于
      Relying on free_reserved_area() to call ftrace to free init memory proved to
      not be sufficient. The issue is that on x86, when debug_pagealloc is
      enabled, the init memory is not freed, but simply set as not present. Since
      ftrace was uninformed of this, starting function tracing still tries to
      update pages that are not present according to the page tables, causing
      ftrace to bug, as well as killing the kernel itself.
      
      Instead of relying on free_reserved_area(), have init/main.c call ftrace
      directly just before it frees the init memory. Then it needs to use
      __init_begin and __init_end to know where the init memory location is.
      Looking at all archs (and testing what I can), it appears that this should
      work for each of them.
      Reported-by: Nkernel test robot <xiaolong.ye@intel.com>
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
      b80f0f6c
  19. 25 3月, 2017 2 次提交
  20. 24 11月, 2016 1 次提交
    • S
      tracing: Make tracepoint_printk a static_key · 42391745
      Steven Rostedt (Red Hat) 提交于
      Currently, when tracepoint_printk is set (enabled by the "tp_printk" kernel
      command line), it causes trace events to print via printk(). This is a very
      dangerous operation, but is useful for debugging.
      
      The issue is, it's seldom used, but it is always checked even if it's not
      enabled by the kernel command line. Instead of having this feature called by
      a branch against a variable, turn that variable into a static key, and this
      will remove the test and jump.
      
      To simplify things, the functions output_printk() and
      trace_event_buffer_commit() were moved from trace_events.c to trace.c.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      42391745
  21. 16 11月, 2016 1 次提交
  22. 02 9月, 2016 1 次提交
  23. 24 8月, 2016 3 次提交
    • J
      ftrace: Add ftrace_graph_ret_addr() stack unwinding helpers · 223918e3
      Josh Poimboeuf 提交于
      When function graph tracing is enabled for a function, ftrace modifies
      the stack by replacing the original return address with the address of a
      hook function (return_to_handler).
      
      Stack unwinders need a way to get the original return address.  Add an
      arch-independent helper function for that named ftrace_graph_ret_addr().
      
      This adds two variations of the function: one depends on
      HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, and the other relies on an index state
      variable.
      
      The former is recommended because, in some cases, the latter can cause
      problems when the unwinder skips stack frames.  It can get out of sync
      with the ret_stack index and wrong addresses can be reported for the
      stack trace.
      
      Once all arches have been ported to use
      HAVE_FUNCTION_GRAPH_RET_ADDR_PTR, we can get rid of the distinction.
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Byungchul Park <byungchul.park@lge.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/36bd90f762fc5e5af3929e3797a68a64906421cf.1471607358.git.jpoimboe@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      223918e3
    • J
      ftrace: Add return address pointer to ftrace_ret_stack · 9a7c348b
      Josh Poimboeuf 提交于
      Storing this value will help prevent unwinders from getting out of sync
      with the function graph tracer ret_stack.  Now instead of needing a
      stateful iterator, they can compare the return address pointer to find
      the right ret_stack entry.
      
      Note that an array of 50 ftrace_ret_stack structs is allocated for every
      task.  So when an arch implements this, it will add either 200 or 400
      bytes of memory usage per task (depending on whether it's a 32-bit or
      64-bit platform).
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Byungchul Park <byungchul.park@lge.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/a95cfcc39e8f26b89a430c56926af0bb217bc0a1.1471607358.git.jpoimboe@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      9a7c348b
    • J
      ftrace: Only allocate the ret_stack 'fp' field when needed · daa460a8
      Josh Poimboeuf 提交于
      This saves some memory when HAVE_FUNCTION_GRAPH_FP_TEST isn't defined.
      On x86_64 with newer versions of gcc which have -mfentry, it saves 400
      bytes per task.
      Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Byungchul Park <byungchul.park@lge.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nilay Vaish <nilayvaish@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/5c7747d9ea7b5cb47ef0a8ce8a6cea6bf7aa94bf.1471607358.git.jpoimboe@redhat.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      daa460a8
  24. 06 7月, 2016 1 次提交
  25. 14 4月, 2016 1 次提交
  26. 26 3月, 2016 1 次提交
  27. 29 2月, 2016 1 次提交
  28. 18 2月, 2016 1 次提交
  29. 14 1月, 2016 1 次提交
  30. 08 1月, 2016 2 次提交
    • S
      ftrace: Add infrastructure for delayed enabling of module functions · b7ffffbb
      Steven Rostedt (Red Hat) 提交于
      Qiu Peiyang pointed out that there's a race when enabling function tracing
      and loading a module. In order to make the modifications of converting nops
      in the prologue of functions into callbacks, the text needs to be converted
      from read-only to read-write. When enabling function tracing, the text
      permission is updated, the functions are modified, and then they are put
      back.
      
      When loading a module, the updates to convert function calls to mcount is
      done before the module text is set to read-only. But after it is done, the
      module text is visible by the function tracer. Thus we have the following
      race:
      
      	CPU 0			CPU 1
      	-----			-----
         start function tracing
         set text to read-write
      			     load_module
      			     add functions to ftrace
      			     set module text read-only
      
         update all functions to callbacks
         modify module functions too
         < Can't it's read-only >
      
      When this happens, ftrace detects the issue and disables itself till the
      next reboot.
      
      To fix this, a new DISABLED flag is added for ftrace records, which all
      module functions get when they are added. Then later, after the module code
      is all set, the records will have the DISABLED flag cleared, and they will
      be enabled if any callback wants all functions to be traced.
      
      Note, this doesn't add the delay to later. It simply changes the
      ftrace_module_init() to do both the setting of DISABLED records, and then
      immediately calls the enable code. This helps with testing this new code as
      it has the same behavior as previously. Another change will come after this
      to have the ftrace_module_enable() called after the text is set to
      read-only.
      
      Cc: Qiu Peiyang <peiyangx.qiu@intel.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      b7ffffbb
    • S
      ftrace/module: Call clean up function when module init fails early · 049fb9bd
      Steven Rostedt (Red Hat) 提交于
      If the module init code fails after calling ftrace_module_init() and before
      calling do_init_module(), we can suffer from a memory leak. This is because
      ftrace_module_init() allocates pages to store the locations that ftrace
      hooks are placed in the module text. If do_init_module() fails, it still
      calls the MODULE_GOING notifiers which will tell ftrace to do a clean up of
      the pages it allocated for the module. But if load_module() fails before
      then, the pages allocated by ftrace_module_init() will never be freed.
      
      Call ftrace_release_mod() on the module if load_module() fails before
      getting to do_init_module().
      
      Link: http://lkml.kernel.org/r/567CEA31.1070507@intel.comReported-by: N"Qiu, PeiyangX" <peiyangx.qiu@intel.com>
      Fixes: a949ae56 "ftrace/module: Hardcode ftrace_module_init() call into load_module()"
      Cc: stable@vger.kernel.org # v2.6.38+
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      049fb9bd
  31. 24 12月, 2015 1 次提交
    • S
      ftrace: Remove use of control list and ops · ba27f2bc
      Steven Rostedt (Red Hat) 提交于
      Currently perf has its own list function within the ftrace infrastructure
      that seems to be used only to allow for it to have per-cpu disabling as well
      as a check to make sure that it's not called while RCU is not watching. It
      uses something called the "control_ops" which is used to iterate over ops
      under it with the control_list_func().
      
      The problem is that this control_ops and control_list_func unnecessarily
      complicates the code. By replacing FTRACE_OPS_FL_CONTROL with two new flags
      (FTRACE_OPS_FL_RCU and FTRACE_OPS_FL_PER_CPU) we can remove all the code
      that is special with the control ops and add the needed checks within the
      generic ftrace_list_func().
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      ba27f2bc
  32. 26 11月, 2015 1 次提交
    • S
      ftrace: Add variable ftrace_expected for archs to show expected code · b05086c7
      Steven Rostedt (Red Hat) 提交于
      When an anomaly is found while modifying function code, ftrace_bug() is
      called which disables the function tracing infrastructure and reports
      information about what failed. If the code that is to be replaced does not
      match what is expected, then actual code is shown. Currently there is no
      arch generic way to show what was expected.
      
      Add a new variable pointer calld ftrace_expected that the arch code can set
      to point to what it expected so that ftrace_bug() can report the actual text
      as well as the text that was expected to be there.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      b05086c7