RE: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-26 Thread Lubashev, Igor
On Tue, August 20, 2019 at 1:14 PM Arnaldo Carvalho de Melo wrote: > > Arnaldo, once we decide what the right fix is, I am happy to post the > update (options 1, 1+2) as a patch series. > > I think you should get the checks for ref_reloc_sym in place so as to make the > code overall more

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-20 Thread Arnaldo Carvalho de Melo
Em Mon, Aug 19, 2019 at 10:22:07PM +, Lubashev, Igor escreveu: > On Mon, August 19, 2019 at 12:51 PM Mathieu Poirier > wrote: > > On Thu, 15 Aug 2019 at 15:42, Arnaldo Carvalho de Melo > > wrote: > > Things are working properly on your perf/cap branch. I tested with on both > > x86 and

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-20 Thread Mathieu Poirier
On Mon, 19 Aug 2019 at 16:22, Lubashev, Igor wrote: > > On Mon, August 19, 2019 at 12:51 PM Mathieu Poirier > wrote: > > On Thu, 15 Aug 2019 at 15:42, Arnaldo Carvalho de Melo > > wrote: > > > > > > Em Thu, Aug 15, 2019 at 02:16:48PM -0600, Mathieu Poirier escreveu: > > > > On Wed, 14 Aug 2019

RE: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-19 Thread Lubashev, Igor
On Mon, August 19, 2019 at 12:51 PM Mathieu Poirier wrote: > On Thu, 15 Aug 2019 at 15:42, Arnaldo Carvalho de Melo > wrote: > > > > Em Thu, Aug 15, 2019 at 02:16:48PM -0600, Mathieu Poirier escreveu: > > > On Wed, 14 Aug 2019 at 14:02, Lubashev, Igor > wrote: > > > > > > > > > On Wed, August

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-19 Thread Mathieu Poirier
On Thu, 15 Aug 2019 at 15:42, Arnaldo Carvalho de Melo wrote: > > Em Thu, Aug 15, 2019 at 02:16:48PM -0600, Mathieu Poirier escreveu: > > On Wed, 14 Aug 2019 at 14:02, Lubashev, Igor wrote: > > > > > > > On Wed, August 14, 2019 at 2:52 PM Arnaldo Carvalho de Melo > > > > wrote: > > > > Em Wed,

RE: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-15 Thread Lubashev, Igor
On Thu, August 15, 2019 at 4:17 PM Mathieu Poirier wrote: > On Wed, 14 Aug 2019 at 14:02, Lubashev, Igor > wrote: > > > > > On Wed, August 14, 2019 at 2:52 PM Arnaldo Carvalho de Melo > wrote: > > > Em Wed, Aug 14, 2019 at 03:48:14PM -0300, Arnaldo Carvalho de Melo > > > escreveu: > > > > Em

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-15 Thread Arnaldo Carvalho de Melo
Em Thu, Aug 15, 2019 at 02:16:48PM -0600, Mathieu Poirier escreveu: > On Wed, 14 Aug 2019 at 14:02, Lubashev, Igor wrote: > > > > > On Wed, August 14, 2019 at 2:52 PM Arnaldo Carvalho de Melo > > > wrote: > > > Em Wed, Aug 14, 2019 at 03:48:14PM -0300, Arnaldo Carvalho de Melo > > > escreveu: >

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-15 Thread Mathieu Poirier
On Wed, 14 Aug 2019 at 14:02, Lubashev, Igor wrote: > > > On Wed, August 14, 2019 at 2:52 PM Arnaldo Carvalho de Melo > > wrote: > > Em Wed, Aug 14, 2019 at 03:48:14PM -0300, Arnaldo Carvalho de Melo > > escreveu: > > > Em Wed, Aug 14, 2019 at 12:04:33PM -0600, Mathieu Poirier escreveu: > > > >

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-15 Thread Mathieu Poirier
On Wed, 14 Aug 2019 at 14:02, Lubashev, Igor wrote: > > > On Wed, August 14, 2019 at 2:52 PM Arnaldo Carvalho de Melo > > wrote: > > Em Wed, Aug 14, 2019 at 03:48:14PM -0300, Arnaldo Carvalho de Melo > > escreveu: > > > Em Wed, Aug 14, 2019 at 12:04:33PM -0600, Mathieu Poirier escreveu: > > > >

RE: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-14 Thread Lubashev, Igor
> On Wed, August 14, 2019 at 2:52 PM Arnaldo Carvalho de Melo > wrote: > Em Wed, Aug 14, 2019 at 03:48:14PM -0300, Arnaldo Carvalho de Melo > escreveu: > > Em Wed, Aug 14, 2019 at 12:04:33PM -0600, Mathieu Poirier escreveu: > > > # echo 0 > /proc/sys/kernel/kptr_restrict # ./tools/perf/perf

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-14 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 14, 2019 at 03:48:14PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Aug 14, 2019 at 12:04:33PM -0600, Mathieu Poirier escreveu: > > # echo 0 > /proc/sys/kernel/kptr_restrict > > # ./tools/perf/perf record -e instructions:k uname > > perf: Segmentation fault > > Obtained 10 stack

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-14 Thread Arnaldo Carvalho de Melo
Em Wed, Aug 14, 2019 at 12:04:33PM -0600, Mathieu Poirier escreveu: > On Wed, 7 Aug 2019 at 08:44, Igor Lubashev wrote: > > > > Kernel is using CAP_SYSLOG capability instead of uid==0 and euid==0 when > > checking kptr_restrict. Make perf do the same. > > > > Also, the kernel is a more

Re: [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks

2019-08-14 Thread Mathieu Poirier
On Wed, 7 Aug 2019 at 08:44, Igor Lubashev wrote: > > Kernel is using CAP_SYSLOG capability instead of uid==0 and euid==0 when > checking kptr_restrict. Make perf do the same. > > Also, the kernel is a more restrictive than "no restrictions" in case of > kptr_restrict==0, so add the same logic to