Re: [PATCH 1/2] perf ioctl: Add check for the sample_period value

2019-05-28 Thread Michael Ellerman
Ravi Bangoria writes: > On 5/13/19 2:26 PM, Peter Zijlstra wrote: >> On Mon, May 13, 2019 at 09:42:13AM +0200, Peter Zijlstra wrote: >>> On Sat, May 11, 2019 at 08:12:16AM +0530, Ravi Bangoria wrote: Add a check for sample_period value sent from userspace. Negative value does not make

Re: [PATCH 1/2] perf ioctl: Add check for the sample_period value

2019-05-13 Thread Ravi Bangoria
On 5/13/19 2:26 PM, Peter Zijlstra wrote: > On Mon, May 13, 2019 at 09:42:13AM +0200, Peter Zijlstra wrote: >> On Sat, May 11, 2019 at 08:12:16AM +0530, Ravi Bangoria wrote: >>> Add a check for sample_period value sent from userspace. Negative >>> value does not make sense. And in powerpc arch

Re: [PATCH 1/2] perf ioctl: Add check for the sample_period value

2019-05-13 Thread Peter Zijlstra
On Mon, May 13, 2019 at 09:42:13AM +0200, Peter Zijlstra wrote: > On Sat, May 11, 2019 at 08:12:16AM +0530, Ravi Bangoria wrote: > > Add a check for sample_period value sent from userspace. Negative > > value does not make sense. And in powerpc arch code this could cause > > a recursive PMI

Re: [PATCH 1/2] perf ioctl: Add check for the sample_period value

2019-05-13 Thread Peter Zijlstra
On Sat, May 11, 2019 at 08:12:16AM +0530, Ravi Bangoria wrote: > Add a check for sample_period value sent from userspace. Negative > value does not make sense. And in powerpc arch code this could cause > a recursive PMI leading to a hang (reported when running perf-fuzzer). > > Signed-off-by:

[PATCH 1/2] perf ioctl: Add check for the sample_period value

2019-05-10 Thread Ravi Bangoria
Add a check for sample_period value sent from userspace. Negative value does not make sense. And in powerpc arch code this could cause a recursive PMI leading to a hang (reported when running perf-fuzzer). Signed-off-by: Ravi Bangoria --- kernel/events/core.c | 3 +++ 1 file changed, 3