Re: [RFC PATCH 1/6] perf: Move mlock accounting to ring buffer allocation

2016-09-23 Thread Alexander Shishkin
Peter Zijlstra writes: > On Fri, Sep 23, 2016 at 05:27:22PM +0300, Alexander Shishkin wrote: >> > Afaict there's no actual need to hide the AUX buffer for this sampling >> > stuff; the user knows about all this and can simply mmap() the AUX part. >> >> Yes, yo

Re: [RFC PATCH 1/6] perf: Move mlock accounting to ring buffer allocation

2016-09-23 Thread Alexander Shishkin
Peter Zijlstra <pet...@infradead.org> writes: > On Fri, Sep 23, 2016 at 02:27:21PM +0300, Alexander Shishkin wrote: >> In order to be able to allocate perf ring buffers in non-mmap path, we >> need to make sure we can still account the memory to the user and that >> th

Re: [RFC PATCH 1/6] perf: Move mlock accounting to ring buffer allocation

2016-09-23 Thread Alexander Shishkin
Peter Zijlstra writes: > On Fri, Sep 23, 2016 at 02:27:21PM +0300, Alexander Shishkin wrote: >> In order to be able to allocate perf ring buffers in non-mmap path, we >> need to make sure we can still account the memory to the user and that >> they don't exc

[RFC PATCH 3/6] perf: Add a helper for looking up pmus by type

2016-09-23 Thread Alexander Shishkin
This patch adds a helper for looking up a registered pmu by its type. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/core.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/

[RFC PATCH 5/6] perf: Disable PMU around address filter adjustment

2016-09-23 Thread Alexander Shishkin
these critical sections, so that AUX sampling won't take place there. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/core.c | 16 1 file changed, 16 insertions(+) diff --git a/kernel/events/core.c b/kernel/events/core.c index fdb2

[RFC PATCH 3/6] perf: Add a helper for looking up pmus by type

2016-09-23 Thread Alexander Shishkin
This patch adds a helper for looking up a registered pmu by its type. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 2e8a0e389b..b64a5c611f 100644

[RFC PATCH 5/6] perf: Disable PMU around address filter adjustment

2016-09-23 Thread Alexander Shishkin
these critical sections, so that AUX sampling won't take place there. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 16 1 file changed, 16 insertions(+) diff --git a/kernel/events/core.c b/kernel/events/core.c index fdb20fdeb1..f6582df1c9 100644 --- a/kernel/events

[RFC PATCH 6/6] perf: Disable IRQs in address filter sync path

2016-09-23 Thread Alexander Shishkin
If PMU callbacks are executed in hardirq context, the address filter sync code needs to disable interrupts when taking its spinlock to be consistent with the rest of its users. This may happen if the PMU is used in AUX sampling. Signed-off-by: Alexander Shishkin <alexander.sh

[RFC PATCH 6/6] perf: Disable IRQs in address filter sync path

2016-09-23 Thread Alexander Shishkin
If PMU callbacks are executed in hardirq context, the address filter sync code needs to disable interrupts when taking its spinlock to be consistent with the rest of its users. This may happen if the PMU is used in AUX sampling. Signed-off-by: Alexander Shishkin --- kernel/events/core.c | 5

[RFC PATCH 1/6] perf: Move mlock accounting to ring buffer allocation

2016-09-23 Thread Alexander Shishkin
it. This also serves the additional purpose of slightly cleaning up perf_mmap(). Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/core.c| 67 +++ kernel/events/internal.h| 5 +- kernel/events/ring_buffer.c

[RFC PATCH 4/6] perf: Add infrastructure for using AUX data in perf samples

2016-09-23 Thread Alexander Shishkin
that is being annotated with regards to filtering (exclude_{hv,idle,user,kernel}) and enabled state (disabled, enable_on_exec) to make sure that the sampler is not tracking any out of context activity. One sampler can be used for multiple events. Signed-off-by: Alexander Shishkin <alexander.sh

[RFC PATCH 1/6] perf: Move mlock accounting to ring buffer allocation

2016-09-23 Thread Alexander Shishkin
it. This also serves the additional purpose of slightly cleaning up perf_mmap(). Signed-off-by: Alexander Shishkin --- kernel/events/core.c| 67 +++ kernel/events/internal.h| 5 +- kernel/events/ring_buffer.c | 127 ++-- 3

[RFC PATCH 4/6] perf: Add infrastructure for using AUX data in perf samples

2016-09-23 Thread Alexander Shishkin
that is being annotated with regards to filtering (exclude_{hv,idle,user,kernel}) and enabled state (disabled, enable_on_exec) to make sure that the sampler is not tracking any out of context activity. One sampler can be used for multiple events. Signed-off-by: Alexander Shishkin --- include/linux

[RFC PATCH 2/6] perf: Add api to (de-)allocate AUX buffers for kernel counters

2016-09-23 Thread Alexander Shishkin
perf_event_disable to make sure that the counter is not active while it copies data out. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/events/internal.h| 19 +++ kernel/events/ring_buffer.c | 83 + 2

[RFC PATCH 2/6] perf: Add api to (de-)allocate AUX buffers for kernel counters

2016-09-23 Thread Alexander Shishkin
perf_event_disable to make sure that the counter is not active while it copies data out. Signed-off-by: Alexander Shishkin --- kernel/events/internal.h| 19 +++ kernel/events/ring_buffer.c | 83 + 2 files changed, 102 insertions(+) diff --git

[RFC PATCH 0/6] perf: Add AUX data sampling

2016-09-23 Thread Alexander Shishkin
to the architectures that deliver PMIs as IRQs. Mathieu? [1] https://git.kernel.org/cgit/linux/kernel/git/ash/linux.git/log/?h=perf-aux-sampling Alexander Shishkin (6): perf: Move mlock accounting to ring buffer allocation perf: Add api to (de-)allocate AUX buffers for kernel counters perf: Add

[RFC PATCH 0/6] perf: Add AUX data sampling

2016-09-23 Thread Alexander Shishkin
to the architectures that deliver PMIs as IRQs. Mathieu? [1] https://git.kernel.org/cgit/linux/kernel/git/ash/linux.git/log/?h=perf-aux-sampling Alexander Shishkin (6): perf: Move mlock accounting to ring buffer allocation perf: Add api to (de-)allocate AUX buffers for kernel counters perf: Add

[tip:perf/urgent] perf/core: Limit matching exclusive events to one PMU

2016-09-22 Thread tip-bot for Alexander Shishkin
Commit-ID: 3bf6215a1b30db7df6083c708caab3fe1a8e8abe Gitweb: http://git.kernel.org/tip/3bf6215a1b30db7df6083c708caab3fe1a8e8abe Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 20 Sep 2016 18:48:11 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/urgent] perf/core: Limit matching exclusive events to one PMU

2016-09-22 Thread tip-bot for Alexander Shishkin
Commit-ID: 3bf6215a1b30db7df6083c708caab3fe1a8e8abe Gitweb: http://git.kernel.org/tip/3bf6215a1b30db7df6083c708caab3fe1a8e8abe Author: Alexander Shishkin AuthorDate: Tue, 20 Sep 2016 18:48:11 +0300 Committer: Ingo Molnar CommitDate: Thu, 22 Sep 2016 14:56:09 +0200 perf/core: Limit

[tip:perf/urgent] perf/x86/intel/bts: Make it an exclusive PMU

2016-09-22 Thread tip-bot for Alexander Shishkin
Commit-ID: 08b90f0655258411a1b41d856331e20e7ec8d55c Gitweb: http://git.kernel.org/tip/08b90f0655258411a1b41d856331e20e7ec8d55c Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 20 Sep 2016 18:48:10 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/urgent] perf/x86/intel/bts: Make it an exclusive PMU

2016-09-22 Thread tip-bot for Alexander Shishkin
Commit-ID: 08b90f0655258411a1b41d856331e20e7ec8d55c Gitweb: http://git.kernel.org/tip/08b90f0655258411a1b41d856331e20e7ec8d55c Author: Alexander Shishkin AuthorDate: Tue, 20 Sep 2016 18:48:10 +0300 Committer: Ingo Molnar CommitDate: Thu, 22 Sep 2016 14:56:08 +0200 perf/x86/intel/bts

[PATCH 2/2] perf: Limit matching exclusive events to one PMU

2016-09-20 Thread Alexander Shishkin
s that may prevent this, but those would be hardware-specific). However, the exclusivity code is written so that only one event from any of the "exclusive" PMUs is allowed in a context. Fix this by making the exclusive event filter explicitly match two events' PMUs. Signed-off-by

[PATCH 0/2] perf, bts: Make BTS exclusive again

2016-09-20 Thread Alexander Shishkin
on systems that allow coexistance of PT and BTS it still works, see ccbebba4c6 for more context). Alexander Shishkin (2): perf/x86/intel/bts: Make it an exclusive PMU perf: Limit matching exclusive events to one PMU arch/x86/events/intel/bts.c | 3 ++- kernel/events/core.c| 2 +- 2 files

[PATCH 2/2] perf: Limit matching exclusive events to one PMU

2016-09-20 Thread Alexander Shishkin
s that may prevent this, but those would be hardware-specific). However, the exclusivity code is written so that only one event from any of the "exclusive" PMUs is allowed in a context. Fix this by making the exclusive event filter explicitly match two events' PMUs. Signed-off-by

[PATCH 0/2] perf, bts: Make BTS exclusive again

2016-09-20 Thread Alexander Shishkin
on systems that allow coexistance of PT and BTS it still works, see ccbebba4c6 for more context). Alexander Shishkin (2): perf/x86/intel/bts: Make it an exclusive PMU perf: Limit matching exclusive events to one PMU arch/x86/events/intel/bts.c | 3 ++- kernel/events/core.c| 2 +- 2 files

[PATCH 1/2] perf/x86/intel/bts: Make it an exclusive PMU

2016-09-20 Thread Alexander Shishkin
scheduled and receive the actual trace data. Fix this by making intel_bts an "exclusive" PMU. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/bts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/even

[PATCH 1/2] perf/x86/intel/bts: Make it an exclusive PMU

2016-09-20 Thread Alexander Shishkin
scheduled and receive the actual trace data. Fix this by making intel_bts an "exclusive" PMU. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/bts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/b

Re: [PATCH] perf/x86/intel/bts: don't dereference ds unconditionally

2016-09-20 Thread Alexander Shishkin
Alexander Shishkin <alexander.shish...@linux.intel.com> writes: > Sebastian Andrzej Siewior <sebast...@breakpoint.cc> writes: > >> From: Sebastian Andrzej Siewior <bige...@linutronix.de> >> >> Since commit 4d4c47412464 ("perf/x86/intel/bts: Fix

Re: [PATCH] perf/x86/intel/bts: don't dereference ds unconditionally

2016-09-20 Thread Alexander Shishkin
Alexander Shishkin writes: > Sebastian Andrzej Siewior writes: > >> From: Sebastian Andrzej Siewior >> >> Since commit 4d4c47412464 ("perf/x86/intel/bts: Fix BTS PMI detection") >> my box goes boom on boot: >> >> | node #0, CPUs:

Re: [PATCH] perf/x86/intel/bts: don't dereference ds unconditionally

2016-09-20 Thread Alexander Shishkin
Sebastian Andrzej Siewior writes: > From: Sebastian Andrzej Siewior > > Since commit 4d4c47412464 ("perf/x86/intel/bts: Fix BTS PMI detection") > my box goes boom on boot: > > | node #0, CPUs: #1 #2 #3 #4 #5 #6 #7 > | BUG: unable to

Re: [PATCH] perf/x86/intel/bts: don't dereference ds unconditionally

2016-09-20 Thread Alexander Shishkin
Sebastian Andrzej Siewior writes: > From: Sebastian Andrzej Siewior > > Since commit 4d4c47412464 ("perf/x86/intel/bts: Fix BTS PMI detection") > my box goes boom on boot: > > | node #0, CPUs: #1 #2 #3 #4 #5 #6 #7 > | BUG: unable to handle kernel NULL pointer dereference at

[tip:perf/core] perf/x86/intel/pt: Add support for PTWRITE and power event tracing

2016-09-19 Thread tip-bot for Alexander Shishkin
Commit-ID: 8ee83b2ab3d1987cbd80c9f2c6f2b12fed87b51e Gitweb: http://git.kernel.org/tip/8ee83b2ab3d1987cbd80c9f2c6f2b12fed87b51e Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Fri, 16 Sep 2016 16:48:19 +0300 Committer: Thomas Gleixner <t...@linu

[tip:perf/core] perf/x86/intel/pt: Add support for PTWRITE and power event tracing

2016-09-19 Thread tip-bot for Alexander Shishkin
Commit-ID: 8ee83b2ab3d1987cbd80c9f2c6f2b12fed87b51e Gitweb: http://git.kernel.org/tip/8ee83b2ab3d1987cbd80c9f2c6f2b12fed87b51e Author: Alexander Shishkin AuthorDate: Fri, 16 Sep 2016 16:48:19 +0300 Committer: Thomas Gleixner CommitDate: Tue, 20 Sep 2016 01:18:28 +0200 perf/x86/intel

[PATCH] perf/x86/intel/pt: Add enables for PTWRITE and power event tracing

2016-09-16 Thread Alexander Shishkin
: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/pt.c | 24 +++- arch/x86/events/intel/pt.h | 5 + 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/x86/

[PATCH] perf/x86/intel/pt: Add enables for PTWRITE and power event tracing

2016-09-16 Thread Alexander Shishkin
: Adrian Hunter Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 24 +++- arch/x86/events/intel/pt.h | 5 + 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index 861a7d9cb6..c5047b8f77

[tip:perf/urgent] perf/x86/intel/pt: Do validate the size of a kernel address filter

2016-09-16 Thread tip-bot for Alexander Shishkin
Commit-ID: 1155bafcb79208abc6ae234c6e135ac70607755c Gitweb: http://git.kernel.org/tip/1155bafcb79208abc6ae234c6e135ac70607755c Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Thu, 15 Sep 2016 18:13:52 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/urgent] perf/x86/intel/pt: Do validate the size of a kernel address filter

2016-09-16 Thread tip-bot for Alexander Shishkin
Commit-ID: 1155bafcb79208abc6ae234c6e135ac70607755c Gitweb: http://git.kernel.org/tip/1155bafcb79208abc6ae234c6e135ac70607755c Author: Alexander Shishkin AuthorDate: Thu, 15 Sep 2016 18:13:52 +0300 Committer: Ingo Molnar CommitDate: Fri, 16 Sep 2016 11:14:16 +0200 perf/x86/intel/pt

[tip:perf/urgent] perf/x86/intel/pt: Fix kernel address filter's offset validation

2016-09-16 Thread tip-bot for Alexander Shishkin
Commit-ID: ddfdad991e55b65c1cc4ee29502f6dceee04455a Gitweb: http://git.kernel.org/tip/ddfdad991e55b65c1cc4ee29502f6dceee04455a Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Thu, 15 Sep 2016 18:13:51 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/urgent] perf/x86/intel/pt: Fix kernel address filter's offset validation

2016-09-16 Thread tip-bot for Alexander Shishkin
Commit-ID: ddfdad991e55b65c1cc4ee29502f6dceee04455a Gitweb: http://git.kernel.org/tip/ddfdad991e55b65c1cc4ee29502f6dceee04455a Author: Alexander Shishkin AuthorDate: Thu, 15 Sep 2016 18:13:51 +0300 Committer: Ingo Molnar CommitDate: Fri, 16 Sep 2016 11:14:16 +0200 perf/x86/intel/pt

[tip:perf/urgent] perf/x86/intel/pt: Fix an off-by-one in address filter configuration

2016-09-16 Thread tip-bot for Alexander Shishkin
Commit-ID: 95f60084acbcee6c466256cf26eb52191fad9edc Gitweb: http://git.kernel.org/tip/95f60084acbcee6c466256cf26eb52191fad9edc Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Thu, 15 Sep 2016 18:13:50 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/urgent] perf/x86/intel/pt: Fix an off-by-one in address filter configuration

2016-09-16 Thread tip-bot for Alexander Shishkin
Commit-ID: 95f60084acbcee6c466256cf26eb52191fad9edc Gitweb: http://git.kernel.org/tip/95f60084acbcee6c466256cf26eb52191fad9edc Author: Alexander Shishkin AuthorDate: Thu, 15 Sep 2016 18:13:50 +0300 Committer: Ingo Molnar CommitDate: Fri, 16 Sep 2016 11:14:16 +0200 perf/x86/intel/pt

[PATCH v1 2/3] perf/x86/intel/pt: Fix kernel address filter's offset validation

2016-09-15 Thread Alexander Shishkin
(like 0xf00d) throws a #GP. This patch adds address validation for the user supplied kernel filters. Cc: sta...@vger.kernel.org # v4.7 Reported-by: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/

[PATCH v1 1/3] perf/x86/intel/pt: Fix an off-by-one in address filter configuration

2016-09-15 Thread Alexander Shishkin
filters don't pass the filter validation. Cc: sta...@vger.kernel.org # v4.7 Reported-by: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/pt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH v1 2/3] perf/x86/intel/pt: Fix kernel address filter's offset validation

2016-09-15 Thread Alexander Shishkin
(like 0xf00d) throws a #GP. This patch adds address validation for the user supplied kernel filters. Cc: sta...@vger.kernel.org # v4.7 Reported-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion

[PATCH v1 1/3] perf/x86/intel/pt: Fix an off-by-one in address filter configuration

2016-09-15 Thread Alexander Shishkin
filters don't pass the filter validation. Cc: sta...@vger.kernel.org # v4.7 Reported-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index

[PATCH v1 0/3] perf/x86/intel/pt: Address filtering fixes for perf/urgent

2016-09-15 Thread Alexander Shishkin
Hi again, Apologies for the botched recipient list in the previous one. So I moved the virt_addr_valid() inside pt.c as well to save cycles in the LBR code. These are 3 bugs that Adrian found; all 3 seem like good -stable candidates. Alexander Shishkin (3): perf/x86/intel/pt: Fix an off

[PATCH v1 0/3] perf/x86/intel/pt: Address filtering fixes for perf/urgent

2016-09-15 Thread Alexander Shishkin
Hi again, Apologies for the botched recipient list in the previous one. So I moved the virt_addr_valid() inside pt.c as well to save cycles in the LBR code. These are 3 bugs that Adrian found; all 3 seem like good -stable candidates. Alexander Shishkin (3): perf/x86/intel/pt: Fix an off

[PATCH v1 3/3] perf/x86/intel/pt: Do validate the size of a kernel address filter

2016-09-15 Thread Alexander Shishkin
of this calculation. Cc: sta...@vger.kernel.org # v4.7 Reported-by: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/pt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/event

[PATCH v1 3/3] perf/x86/intel/pt: Do validate the size of a kernel address filter

2016-09-15 Thread Alexander Shishkin
of this calculation. Cc: sta...@vger.kernel.org # v4.7 Reported-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index 1f94963a28..861a7d9cb6

[PATCH 2/3] perf/x86: Tighten up the kernel_ip() check

2016-09-15 Thread Alexander Shishkin
(like 0xf00d) throws a #GP. In the interest of improving everybody's kernel address checks, this patch adds address validation to kernel_ip(). Cc: sta...@vger.kernel.org # 4.7 Reported-by: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Alexander Shishkin <alexan

[PATCH 2/3] perf/x86: Tighten up the kernel_ip() check

2016-09-15 Thread Alexander Shishkin
(like 0xf00d) throws a #GP. In the interest of improving everybody's kernel address checks, this patch adds address validation to kernel_ip(). Cc: sta...@vger.kernel.org # 4.7 Reported-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- arch/x86/events/perf_event.h | 2 +- 1 file

[PATCH 3/3] perf/x86/intel/pt: Do validate the size of a kernel address filter

2016-09-15 Thread Alexander Shishkin
of this calculation. Cc: sta...@vger.kernel.org # 4.7 Reported-by: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/pt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/

[PATCH 3/3] perf/x86/intel/pt: Do validate the size of a kernel address filter

2016-09-15 Thread Alexander Shishkin
of this calculation. Cc: sta...@vger.kernel.org # 4.7 Reported-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index 5ec0100e3f..834ce06b00

[PATCH 1/3] perf/x86/intel/pt: Fix an off-by-one in address filter configuration

2016-09-15 Thread Alexander Shishkin
filters don't pass the filter validation. Cc: sta...@vger.kernel.org # 4.7 Reported-by: Adrian Hunter <adrian.hun...@intel.com> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/pt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 1/3] perf/x86/intel/pt: Fix an off-by-one in address filter configuration

2016-09-15 Thread Alexander Shishkin
filters don't pass the filter validation. Cc: sta...@vger.kernel.org # 4.7 Reported-by: Adrian Hunter Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/pt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c index

[PATCH 0/3] perf/x86/intel/pt: Address filtering fixes for perf/urgent

2016-09-15 Thread Alexander Shishkin
theoretically. Alexander Shishkin (3): perf/x86/intel/pt: Fix an off-by-one in address filter configuration perf/x86: Tighten up the kernel_ip() check perf/x86/intel/pt: Do validate the size of a kernel address filter arch/x86/events/intel/pt.c | 13 + arch/x86/events/perf_event.h | 2

[PATCH 0/3] perf/x86/intel/pt: Address filtering fixes for perf/urgent

2016-09-15 Thread Alexander Shishkin
theoretically. Alexander Shishkin (3): perf/x86/intel/pt: Fix an off-by-one in address filter configuration perf/x86: Tighten up the kernel_ip() check perf/x86/intel/pt: Do validate the size of a kernel address filter arch/x86/events/intel/pt.c | 13 + arch/x86/events/perf_event.h | 2

[tip:perf/urgent] perf/x86/intel: Don't disable "intel_bts" around "intel" event batching

2016-09-15 Thread tip-bot for Alexander Shishkin
Commit-ID: cecf62352aee2b4fe114aafd1b8c5f265a4243ce Gitweb: http://git.kernel.org/tip/cecf62352aee2b4fe114aafd1b8c5f265a4243ce Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Thu, 15 Sep 2016 11:22:33 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/urgent] perf/x86/intel: Don't disable "intel_bts" around "intel" event batching

2016-09-15 Thread tip-bot for Alexander Shishkin
Commit-ID: cecf62352aee2b4fe114aafd1b8c5f265a4243ce Gitweb: http://git.kernel.org/tip/cecf62352aee2b4fe114aafd1b8c5f265a4243ce Author: Alexander Shishkin AuthorDate: Thu, 15 Sep 2016 11:22:33 +0300 Committer: Ingo Molnar CommitDate: Thu, 15 Sep 2016 11:25:26 +0200 perf/x86/intel

[PATCH] perf/x86/intel: Don't disable "intel_bts" around "intel" event batching

2016-09-15 Thread Alexander Shishkin
. This patch moves intel_bts enabling/disabling directly to the PMI handler. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/core.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/x86/events/intel/core.c b/ar

[PATCH] perf/x86/intel: Don't disable "intel_bts" around "intel" event batching

2016-09-15 Thread Alexander Shishkin
. This patch moves intel_bts enabling/disabling directly to the PMI handler. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/core.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index

Re: perf: perf_fuzzer still triggers bts warning

2016-09-15 Thread Alexander Shishkin
Vince Weaver writes: > Hello > > I'm running 4.8-rc6 git from this morning (with the various perf fixes). > > Fuzzing on Skylake I still managed to trigger the following warning. I was sure that I'd sent the fix for this one in the earlier series, but somehow I missed

Re: perf: perf_fuzzer still triggers bts warning

2016-09-15 Thread Alexander Shishkin
Vince Weaver writes: > Hello > > I'm running 4.8-rc6 git from this morning (with the various perf fixes). > > Fuzzing on Skylake I still managed to trigger the following warning. I was sure that I'd sent the fix for this one in the earlier series, but somehow I missed it. Sending now. Thanks,

[tip:perf/core] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: a9a94401c2b5805c71e39427b1af1bf1b9f67cd0 Gitweb: http://git.kernel.org/tip/a9a94401c2b5805c71e39427b1af1bf1b9f67cd0 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 6 Sep 2016 16:23:51 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/core: Fix aux_mmap_count vs aux_refcount order

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: b79ccadd6bb10e72cf784a298ca6dc1398eb9a24 Gitweb: http://git.kernel.org/tip/b79ccadd6bb10e72cf784a298ca6dc1398eb9a24 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 6 Sep 2016 16:23:50 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: a9a94401c2b5805c71e39427b1af1bf1b9f67cd0 Gitweb: http://git.kernel.org/tip/a9a94401c2b5805c71e39427b1af1bf1b9f67cd0 Author: Alexander Shishkin AuthorDate: Tue, 6 Sep 2016 16:23:51 +0300 Committer: Ingo Molnar CommitDate: Sat, 10 Sep 2016 11:15:37 +0200 perf/x86/intel/bts

[tip:perf/core] perf/core: Fix aux_mmap_count vs aux_refcount order

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: b79ccadd6bb10e72cf784a298ca6dc1398eb9a24 Gitweb: http://git.kernel.org/tip/b79ccadd6bb10e72cf784a298ca6dc1398eb9a24 Author: Alexander Shishkin AuthorDate: Tue, 6 Sep 2016 16:23:50 +0300 Committer: Ingo Molnar CommitDate: Sat, 10 Sep 2016 11:15:36 +0200 perf/core: Fix

[tip:perf/core] perf/x86/intel/bts: Fix BTS PMI detection

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: 4d4c474124649198d9b0a065c06f9362cf18e14e Gitweb: http://git.kernel.org/tip/4d4c474124649198d9b0a065c06f9362cf18e14e Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 6 Sep 2016 16:23:52 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/core: Fix a race between mmap_close() and set_output() of AUX events

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: 767ae08678c2c796bcd7f582ee457aee20a28a1e Gitweb: http://git.kernel.org/tip/767ae08678c2c796bcd7f582ee457aee20a28a1e Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 6 Sep 2016 16:23:49 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/x86/intel/bts: Fix BTS PMI detection

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: 4d4c474124649198d9b0a065c06f9362cf18e14e Gitweb: http://git.kernel.org/tip/4d4c474124649198d9b0a065c06f9362cf18e14e Author: Alexander Shishkin AuthorDate: Tue, 6 Sep 2016 16:23:52 +0300 Committer: Ingo Molnar CommitDate: Sat, 10 Sep 2016 11:15:38 +0200 perf/x86/intel/bts

[tip:perf/core] perf/core: Fix a race between mmap_close() and set_output() of AUX events

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: 767ae08678c2c796bcd7f582ee457aee20a28a1e Gitweb: http://git.kernel.org/tip/767ae08678c2c796bcd7f582ee457aee20a28a1e Author: Alexander Shishkin AuthorDate: Tue, 6 Sep 2016 16:23:49 +0300 Committer: Ingo Molnar CommitDate: Sat, 10 Sep 2016 11:15:36 +0200 perf/core: Fix a race

[tip:perf/core] perf/x86/intel/bts: Kill a silly warning

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: ef9ef3befa0d76008e988a9ed9fe439e803351b9 Gitweb: http://git.kernel.org/tip/ef9ef3befa0d76008e988a9ed9fe439e803351b9 Author: Alexander Shishkin <alexander.shish...@linux.intel.com> AuthorDate: Tue, 6 Sep 2016 16:23:53 +0300 Committer: Ingo Molnar <mi...@kernel.org>

[tip:perf/core] perf/x86/intel/bts: Kill a silly warning

2016-09-10 Thread tip-bot for Alexander Shishkin
Commit-ID: ef9ef3befa0d76008e988a9ed9fe439e803351b9 Gitweb: http://git.kernel.org/tip/ef9ef3befa0d76008e988a9ed9fe439e803351b9 Author: Alexander Shishkin AuthorDate: Tue, 6 Sep 2016 16:23:53 +0300 Committer: Ingo Molnar CommitDate: Sat, 10 Sep 2016 11:15:38 +0200 perf/x86/intel/bts

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-08 Thread Alexander Shishkin
Vince Weaver writes: > On the skylake machine with the original 5 patches I got this after > continuing to fuzz. Sorry about the lack of frame pointer, next > compile will have it enabled. > > If it matters, prior to this I hit the unrelated > [25510.278199] WARNING:

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-08 Thread Alexander Shishkin
Vince Weaver writes: > On the skylake machine with the original 5 patches I got this after > continuing to fuzz. Sorry about the lack of frame pointer, next > compile will have it enabled. > > If it matters, prior to this I hit the unrelated > [25510.278199] WARNING: CPU: 1 PID: 25405 at

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-08 Thread Alexander Shishkin
Ingo Molnar <mi...@kernel.org> writes: > * Alexander Shishkin <alexander.shish...@linux.intel.com> wrote: > >> Ingo Molnar <mi...@kernel.org> writes: >> >> > * Alexander Shishkin <alexander.shish...@linux.intel.com> wrote: >> > &g

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-08 Thread Alexander Shishkin
Ingo Molnar writes: > * Alexander Shishkin wrote: > >> Ingo Molnar writes: >> >> > * Alexander Shishkin wrote: >> > >> >> Hi, >> >> >> >> There were more bugs since the previous version, plus the BTS barrier

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-07 Thread Alexander Shishkin
Vince Weaver <vi...@deater.net> writes: > On Wed, 7 Sep 2016, Alexander Shishkin wrote: > >> Sure. And yes, I did catch a warning, which calls for one more patch >> (below). Also one unrelated thing in PEBS that Peter fixed. > > Does that fix this which I just got

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-07 Thread Alexander Shishkin
Vince Weaver writes: > On Wed, 7 Sep 2016, Alexander Shishkin wrote: > >> Sure. And yes, I did catch a warning, which calls for one more patch >> (below). Also one unrelated thing in PEBS that Peter fixed. > > Does that fix this which I just got on my skylake machine (4.

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-07 Thread Alexander Shishkin
Ingo Molnar <mi...@kernel.org> writes: > * Alexander Shishkin <alexander.shish...@linux.intel.com> wrote: > >> Hi, >> >> There were more bugs since the previous version, plus the BTS barriers got >> fixed. With these patches, my testcase keeps running a

Re: [PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-07 Thread Alexander Shishkin
Ingo Molnar writes: > * Alexander Shishkin wrote: > >> Hi, >> >> There were more bugs since the previous version, plus the BTS barriers got >> fixed. With these patches, my testcase keeps running and no spurious NMI >> warnings pop up any more. >

[PATCH v2 5/5] perf/x86/intel/bts: Kill a silly warning

2016-09-06 Thread Alexander Shishkin
At the moment, intel_bts will WARN() out if there is more than one event writing to the same ring buffer, via SET_OUTPUT, and will only send data from one event to a buffer. There is no reason to have this warning in, so kill it. Signed-off-by: Alexander Shishkin <alexander.sh

[PATCH v2 5/5] perf/x86/intel/bts: Kill a silly warning

2016-09-06 Thread Alexander Shishkin
At the moment, intel_bts will WARN() out if there is more than one event writing to the same ring buffer, via SET_OUTPUT, and will only send data from one event to a buffer. There is no reason to have this warning in, so kill it. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel

[PATCH v2 4/5] perf/x86/intel/bts: Fix BTS PMI detection

2016-09-06 Thread Alexander Shishkin
the interrupt threshold. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- arch/x86/events/intel/bts.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index 61e1d713b1..9233

[PATCH v2 4/5] perf/x86/intel/bts: Fix BTS PMI detection

2016-09-06 Thread Alexander Shishkin
the interrupt threshold. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/bts.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index 61e1d713b1..9233edf993 100644 --- a/arch/x86/events/intel

[PATCH v2 2/5] perf: Fix aux_mmap_count vs aux_refcount order

2016-09-06 Thread Alexander Shishkin
; [] sys_sched_yield+0x61/0x70 > [] entry_SYSCALL_64_fastpath+0x18/0xa8 > ---[ end trace 6235f556f5ea83a9 ]--- This patch puts the checks in perf_aux_output_begin() in the same order as that of perf_mmap_close(). Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> --- kernel/ev

[PATCH v2 2/5] perf: Fix aux_mmap_count vs aux_refcount order

2016-09-06 Thread Alexander Shishkin
; [] sys_sched_yield+0x61/0x70 > [] entry_SYSCALL_64_fastpath+0x18/0xa8 > ---[ end trace 6235f556f5ea83a9 ]--- This patch puts the checks in perf_aux_output_begin() in the same order as that of perf_mmap_close(). Signed-off-by: Alexander Shishkin --- kernel/events/ring_buffer.c | 16 ++

[PATCH v2 3/5] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-09-06 Thread Alexander Shishkin
. The general ordering rule that is patch is enforcing is that this cpu-local variable be set only when the cpu-local AUX transaction is active; consequently, this variable is to be checked before the AUX related bits can be touched. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.

[PATCH v2 3/5] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-09-06 Thread Alexander Shishkin
. The general ordering rule that is patch is enforcing is that this cpu-local variable be set only when the cpu-local AUX transaction is active; consequently, this variable is to be checked before the AUX related bits can be touched. Signed-off-by: Alexander Shishkin --- arch/x86/events/intel/bts.c | 104

[PATCH v2 1/5] perf: Fix a race between mmap_close and set_output of AUX events

2016-09-06 Thread Alexander Shishkin
w ring buffer will be used. If another SET_OUTPUT comes and switches it back to the old ring buffer that's getting unmapped, it's also fine: this ring buffer's aux_mmap_count will be zero and AUX transactions won't start any more. Signed-off-by: Alexander Shishkin <alexander.shish...@linux.

[PATCH v2 1/5] perf: Fix a race between mmap_close and set_output of AUX events

2016-09-06 Thread Alexander Shishkin
w ring buffer will be used. If another SET_OUTPUT comes and switches it back to the old ring buffer that's getting unmapped, it's also fine: this ring buffer's aux_mmap_count will be zero and AUX transactions won't start any more. Signed-off-by: Alexander Shishkin --- kernel/events/core.

[PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-06 Thread Alexander Shishkin
. These are all good candidates for 4.7-stable and the BTS ones can be theoretically backported further. Alexander Shishkin (5): perf: Fix a race between mmap_close and set_output of AUX events perf: Fix aux_mmap_count vs aux_refcount order perf/x86/intel/bts: Fix confused ordering of PMU

[PATCH v2 0/5] perf, bts: Fallout from the fuzzer for perf/urgent

2016-09-06 Thread Alexander Shishkin
. These are all good candidates for 4.7-stable and the BTS ones can be theoretically backported further. Alexander Shishkin (5): perf: Fix a race between mmap_close and set_output of AUX events perf: Fix aux_mmap_count vs aux_refcount order perf/x86/intel/bts: Fix confused ordering of PMU

Re: [git pull] stm class/intel_th: Updates for char-misc-next

2016-08-31 Thread Alexander Shishkin
Greg KH writes: >> git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git >> tags/stm-for-greg-20160701 > > I'm already all caught up with stm patches, right? If not, can you > resend the pull requests? Yes, you are all caught up with stm/intel_th indeed.

Re: [git pull] stm class/intel_th: Updates for char-misc-next

2016-08-31 Thread Alexander Shishkin
Greg KH writes: >> git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git >> tags/stm-for-greg-20160701 > > I'm already all caught up with stm patches, right? If not, can you > resend the pull requests? Yes, you are all caught up with stm/intel_th indeed. Thank you for confirming though!

Re: [PATCH 1/3] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-08-29 Thread Alexander Shishkin
Peter Zijlstra <pet...@infradead.org> writes: > On Wed, Aug 24, 2016 at 05:15:54PM +0300, Alexander Shishkin wrote: >> @@ -221,10 +245,13 @@ static void __bts_event_start(struct perf_event *event) >> >> /* >> * local barrier to mak

Re: [PATCH 1/3] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-08-29 Thread Alexander Shishkin
Peter Zijlstra writes: > On Wed, Aug 24, 2016 at 05:15:54PM +0300, Alexander Shishkin wrote: >> @@ -221,10 +245,13 @@ static void __bts_event_start(struct perf_event *event) >> >> /* >> * local barrier to make sure that ds configuration made it >

Re: [PATCH 1/3] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-08-27 Thread Alexander Shishkin
Yes, Will's patch notwithstanding, these patches fix the warnings/oopses that you observed. On 26 August 2016 at 23:49, Vince Weaver <vi...@deater.net> wrote: > On Wed, 24 Aug 2016, Alexander Shishkin wrote: > >> Alexander Shishkin <alexander.shish...@linux.intel.com> w

Re: [PATCH 1/3] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-08-27 Thread Alexander Shishkin
Yes, Will's patch notwithstanding, these patches fix the warnings/oopses that you observed. On 26 August 2016 at 23:49, Vince Weaver wrote: > On Wed, 24 Aug 2016, Alexander Shishkin wrote: > >> Alexander Shishkin writes: >> >> > Alexander Shishkin writes: >>

Re: [PATCH 1/3] perf/x86/intel/bts: Fix confused ordering of PMU callbacks

2016-08-24 Thread Alexander Shishkin
Alexander Shishkin <alexander.shish...@linux.intel.com> writes: > Alexander Shishkin <alexander.shish...@linux.intel.com> writes: > >> Signed-off-by: Alexander Shishkin <alexander.shish...@linux.intel.com> > > Ok, this one is broken, please disregar

<    5   6   7   8   9   10   11   12   13   14   >