Re: [PATCH] perf record: Fix segfault when running with suid and kptr_restrict is 1

2016-09-23 Thread Wangnan (F)
On 2016/9/22 23:41, Arnaldo Carvalho de Melo wrote: Em Wed, Sep 21, 2016 at 03:56:20AM +, Wang Nan escreveu: Before this patch perf panic if kptr_restrict set to 1 and perf is owned by root with suid set: $ whoami wangnan $ ls -l ./perf -rwsr-xr-x 1 root root 19781908 Sep 21 19:29

Re: [PATCH] perf record: Fix segfault when running with suid and kptr_restrict is 1

2016-09-22 Thread Arnaldo Carvalho de Melo
Em Wed, Sep 21, 2016 at 03:56:20AM +, Wang Nan escreveu: > Before this patch perf panic if kptr_restrict set to 1 and perf is owned > by root with suid set: > > $ whoami > wangnan > $ ls -l ./perf > -rwsr-xr-x 1 root root 19781908 Sep 21 19:29 /home/wangnan/perf > $ cat /proc/sys/kernel/k

[PATCH] perf record: Fix segfault when running with suid and kptr_restrict is 1

2016-09-20 Thread Wang Nan
Before this patch perf panic if kptr_restrict set to 1 and perf is owned by root with suid set: $ whoami wangnan $ ls -l ./perf -rwsr-xr-x 1 root root 19781908 Sep 21 19:29 /home/wangnan/perf $ cat /proc/sys/kernel/kptr_restrict 1 $ cat /proc/sys/kernel/perf_event_paranoid -1 $ ./perf rec

Re: [PATCH] perf record: Fix segfault when running with suid and kptr_restrict is 1

2016-09-20 Thread Wangnan (F)
On 2016/9/21 11:48, Wang Nan wrote: Before this patch perf panic if kptr_restrict set to 1 and perf is owned by root with suid set: $ whoami wangnan $ ls -l ./perf -rwsr-xr-x 1 root root 19781908 Sep 21 19:29 /home/wangnan/perf $ cat /proc/sys/kernel/kptr_restrict 1 $ cat /proc/s

[PATCH] perf record: Fix segfault when running with suid and kptr_restrict is 1

2016-09-20 Thread Wang Nan
Before this patch perf panic if kptr_restrict set to 1 and perf is owned by root with suid set: $ whoami wangnan $ ls -l ./perf -rwsr-xr-x 1 root root 19781908 Sep 21 19:29 /home/wangnan/perf $ cat /proc/sys/kernel/kptr_restrict 1 $ cat /proc/sys/kernel/perf_event_paranoid -1 $ ./perf rec