Skip to content
Snippets Groups Projects
Select Git revision
  • 9cc40bc58b42210df2655638f4ff1b8b4db70db4
  • openEuler-1.0-LTS default protected
  • openEuler-22.09
  • OLK-5.10
  • openEuler-22.03-LTS
  • openEuler-22.03-LTS-Ascend
  • master
  • openEuler-22.03-LTS-LoongArch-NW
  • openEuler-22.09-HCK
  • openEuler-20.03-LTS-SP3
  • openEuler-21.09
  • openEuler-21.03
  • openEuler-20.09
  • 4.19.90-2210.5.0
  • 5.10.0-123.0.0
  • 5.10.0-60.63.0
  • 5.10.0-60.62.0
  • 4.19.90-2210.4.0
  • 5.10.0-121.0.0
  • 5.10.0-60.61.0
  • 4.19.90-2210.3.0
  • 5.10.0-60.60.0
  • 5.10.0-120.0.0
  • 5.10.0-60.59.0
  • 5.10.0-119.0.0
  • 4.19.90-2210.2.0
  • 4.19.90-2210.1.0
  • 5.10.0-118.0.0
  • 5.10.0-106.19.0
  • 5.10.0-60.58.0
  • 4.19.90-2209.6.0
  • 5.10.0-106.18.0
  • 5.10.0-106.17.0
33 results

init

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Steven Rostedt (VMware) authored and Cheng Jian committed
    stable inclusion
    from linux-4.19.176
    commit a19749a5fbd97f2147a8768813d084d584d9e045
    
    --------------------------------
    
    commit 7e0a9220467dbcfdc5bc62825724f3e52e50ab31 upstream.
    
    On some archs, the idle task can call into cpu_suspend(). The cpu_suspend()
    will disable or pause function graph tracing, as there's some paths in
    bringing down the CPU that can have issues with its return address being
    modified. The task_struct structure has a "tracing_graph_pause" atomic
    counter, that when set to something other than zero, the function graph
    tracer will not modify the return address.
    
    The problem is that the tracing_graph_pause counter is initialized when the
    function graph tracer is enabled. This can corrupt the counter for the idle
    task if it is suspended in these architectures.
    
       CPU 1				CPU 2
       -----				-----
      do_idle()
        cpu_suspend()
          pause_graph_tracing()
              task_struct->tracing_graph_pause++ (0 -> 1)
    
    				start_graph_tracing()
    				  for_each_online_cpu(cpu) {
    				    ftrace_graph_init_idle_task(cpu)
    				      task-struct->tracing_graph_pause = 0 (1 -> 0)
    
          unpause_graph_tracing()
              task_struct->tracing_graph_pause-- (0 -> -1)
    
    The above should have gone from 1 to zero, and enabled function graph
    tracing again. But instead, it is set to -1, which keeps it disabled.
    
    There's no reason that the field tracing_graph_pause on the task_struct can
    not be initialized at boot up.
    
    Cc: stable@vger.kernel.org
    Fixes: 380c4b14 ("tracing/function-graph-tracer: append the tracing_graph_flag")
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=211339
    
    
    Reported-by: default avatar <pierre.gondois@arm.com>
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
    Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
    9cc40bc5
    History
    Name Last commit Last update
    ..