1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00

function graph fix of notrace functions:

When the function graph tracer was restructured to use the global section
 of the meta data in the shadow stack, the bit logic was changed. There's a
 TRACE_GRAPH_NOTRACE_BIT that is the bit number in the mask that tells if
 the function graph tracer is currently in the "notrace" mode. The
 TRACE_GRAPH_NOTRACE is the mask with that bit set. But when the code we
 restructured, the TRACE_GRAPH_NOTRACE_BIT was used when it should have
 been the TRACE_GRAPH_NOTRACE mask. This made notrace not work properly.
 -----BEGIN PGP SIGNATURE-----
 
 iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCZ6drQBQccm9zdGVkdEBn
 b29kbWlzLm9yZwAKCRAp5XQQmuv6qodZAQDpQY27L2aooxKjxjTwXDmmFu5z7x0M
 PDscxSeAuWzM5QEA/7KeepW+SmZYE7E6SGwKaPCE+cVs4US62AVrRuAsnQA=
 =w/Ns
 -----END PGP SIGNATURE-----

Merge tag 'ftrace-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull ftrace fix from Steven Rostedt:
 "Function graph fix of notrace functions.

  When the function graph tracer was restructured to use the global
  section of the meta data in the shadow stack, the bit logic was
  changed. There's a TRACE_GRAPH_NOTRACE_BIT that is the bit number in
  the mask that tells if the function graph tracer is currently in the
  "notrace" mode. The TRACE_GRAPH_NOTRACE is the mask with that bit set.

  But when the code we restructured, the TRACE_GRAPH_NOTRACE_BIT was
  used when it should have been the TRACE_GRAPH_NOTRACE mask. This made
  notrace not work properly"

* tag 'ftrace-v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  fgraph: Fix set_graph_notrace with setting TRACE_GRAPH_NOTRACE_BIT
This commit is contained in:
Linus Torvalds 2025-02-08 12:18:02 -08:00
commit a0df483fe3

View file

@ -198,7 +198,7 @@ int trace_graph_entry(struct ftrace_graph_ent *trace,
* returning from the function.
*/
if (ftrace_graph_notrace_addr(trace->func)) {
*task_var |= TRACE_GRAPH_NOTRACE_BIT;
*task_var |= TRACE_GRAPH_NOTRACE;
/*
* Need to return 1 to have the return called
* that will clear the NOTRACE bit.