• Steven Rostedt's avatar
    ftrace: remove direct reference to mcount in trace code · 3b47bfc1
    Steven Rostedt authored
    The mcount record method of ftrace scans objdump for references to mcount.
    Using mcount as the reference to test if the calls to mcount being replaced
    are indeed calls to mcount, this use of mcount was also caught as a
    location to change. Using a variable that points to the mcount address
    moves this reference into the data section that is not scanned, and
    we do not use a false location to try and modify.
    
    The warn on code was what was used to detect this bug.
    Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    3b47bfc1
ftrace.c 39 KB