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
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
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
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/
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
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
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>
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
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
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
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
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
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
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
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
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:
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
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
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
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
: 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/
: 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
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>
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
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>
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
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>
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
(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/
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(-)
(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
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
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
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
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
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
(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
(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
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/
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
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(-)
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
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
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
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>
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
.
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
.
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
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
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,
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>
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>
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
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
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>
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>
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
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
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>
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
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:
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
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
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
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
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.
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
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.
>
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
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
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
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
; [] 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
; [] 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 ++
.
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.
.
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
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.
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.
.
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
.
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
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.
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!
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
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
>
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
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:
>>
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
901 - 1000 of 2775 matches
Mail list logo