Adrian Hunter
5a0baf5123
perf tools: Fix mode setting in copyfile_mode_ns()
slow_copyfile() opens the file by name, so "write" permissions must not
be removed in copyfile_mode_ns() before calling slow_copyfile().
Example:
Before:
$ sudo chmod +r /proc/kcore
$ sudo setcap "cap_sys_admin,cap_sys_ptrace,cap_syslog,cap_sys_rawio=ep" tools/perf/perf
$ tools/perf/perf buildid-cache -k /proc/kcore
Couldn't add /proc/kcore
After:
$ sudo chmod +r /proc/kcore
$ sudo setcap "cap_sys_admin,cap_sys_ptrace,cap_syslog,cap_sys_rawio=ep" tools/perf/perf
$ tools/perf/perf buildid-cache -v -k /proc/kcore
kcore added to build-id cache directory /home/ahunter/.debug/[kernel.kcore]/37e340b1b5a7cf4f57ba8de2bc777359588a957f/2019100709562289
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lore.kernel.org/lkml/20191007070221.11158-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-10-15 12:05:18 -03:00
..
2019-09-30 17:29:30 -03:00
2019-09-06 16:49:17 +02:00
2019-08-12 17:14:14 -03:00
2019-09-10 12:31:39 -06:00
2019-07-12 12:24:03 -07:00
2019-07-09 09:07:00 -07:00
2019-09-24 12:36:31 -07:00
2019-08-18 20:45:57 +01:00
2019-09-30 17:29:30 -03:00
2019-06-19 17:09:53 +02:00
2019-06-19 17:11:22 +02:00
2019-07-25 20:07:52 +02:00
2019-10-07 15:15:24 +02:00
2019-08-09 10:28:57 -07:00
2019-09-25 15:23:33 +02:00
2019-07-15 20:44:49 -07:00
2019-06-19 17:09:08 +02:00
2019-10-15 12:05:18 -03:00
2019-09-24 12:39:40 -07:00
2019-07-23 09:04:54 -03:00
2019-10-12 14:13:55 -07:00
2019-06-05 17:36:37 +02:00
2019-07-25 18:12:20 +02:00
2019-06-19 17:09:52 +02:00
2019-07-12 11:05:46 -07:00
2019-06-19 17:09:55 +02:00
2019-08-14 10:59:59 -03:00