diff options
author | Will Deacon <[email protected]> | 2017-05-09 18:00:04 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-05-10 07:54:00 +0200 |
commit | 88b0193d9418c00340e45e0a913a0813bc6c8c96 (patch) | |
tree | 027a83b76832b465f3f120471ce58518e4fce2e0 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | cefec668868be847ac3733c927ccd527c305b529 (diff) |
perf/callchain: Force USER_DS when invoking perf_callchain_user()
Perf can generate and record a user callchain in response to a synchronous
request, such as a tracepoint firing. If this happens under set_fs(KERNEL_DS),
then we can end up walking the user stack (and dereferencing/saving whatever we
find there) without the protections usually afforded by checks such as
access_ok.
Rather than play whack-a-mole with each architecture's stack unwinding
implementation, fix the root of the problem by ensuring that we force USER_DS
when invoking perf_callchain_user from the perf core.
Reported-by: Al Viro <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions