• Namhyung Kim's avatar
    perf annotate-data: Add stack canary type · b3c95109
    Namhyung Kim authored
    When the stack protector is enabled, compiler would generate code to
    check stack overflow with a special value called 'stack carary' at
    runtime.  On x86_64, GCC hard-codes the stack canary as %gs:40.
    
    While there's a definition of fixed_percpu_data in asm/processor.h,
    it seems that the header is not included everywhere and many places
    it cannot find the type info.  As it's in the well-known location (at
    %gs:40), let's add a pseudo stack canary type to handle it specially.
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Link: https://lore.kernel.org/r/20240319055115.4063940-22-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    b3c95109
annotate-data.c 40.8 KB