perf symbols: Relax checks on perf-PID.map ownership
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: bc055c54b887961bc3545c54e61c844fd4499c2b Gitweb: https://git.kernel.org/tip/bc055c54b887961bc3545c54e61c844fd4499c2b Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 18 Dec 2018 12:39:08 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 18 Dec 2018 16:17:41 -0300
perf symbols: Relax checks on perf-PID.map ownership
Those are simple enough, and usually not produced by root, instead by whatever user is running java, rust, Node.js JIT code that end up generating those /tmp/perf-PID.map for resolution of symbols in the anonymous executable maps.
Having to use --force to resolve symbols in 'perf top' is a distraction, as recently I experienced when node.js symbols were not being resolved by 'perf top'.
Acked-by Ingo Molnar <[email protected]>
Cc Adrian Hunter <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Hítalo Silva <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc Peter Zijlstra <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/symbol.c | 11 ----------- 1 file changed, 11 deletions(-)
tools/perf/util/symbol.c +0 -11
@@ -1537,17 +1537,6 @@ int dso__load(struct dso *dso, struct map *map) dso->adjust_symbols =0 ;if (perfmap) { -struct stat st; - -if (lstat (map_path, &st) <0 ) - goto out; - -if (!symbol_conf.force && st.st_uid && (st.st_uid !=geteuid ())) { -pr_warning ("File %s not owned by current user or root, " -"ignoring it (use -f to override).\n" , map_path); - goto out; - } - ret =dso__load_perf_map (map_path, dso); dso->symtab_type = ret >0 ?DSO_BINARY_TYPE__JAVA_JIT :DSO_BINARY_TYPE__NOT_FOUND ;