Arnaldo Carvalho de Melo
68289cbd83
tools include: Drop ARRAY_SIZE() definition from linux/hashtable.h
...
As tools/include/linux/kernel.h has it now, with the goodies present in
the kernel.h counterpart, i.e. checking that the parameter is an array
at build time.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-v0b41ivu6z6dyugbq9ffa9ez@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:45 -03:00
Arnaldo Carvalho de Melo
0061459744
objtool: Drop ARRAY_SIZE() definition, tools/include/linux/kernel.h has it now
...
And with the goodies present in the kernel.h counterpart, i.e. checking
that the parameter is an array at build time.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-roiwxwgwgld4kygn65if60wa@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:44 -03:00
Arnaldo Carvalho de Melo
877a7a1105
perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used
...
To pave the way for further cleanups where linux/kernel.h may stop being
included in some header.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-qqxan6tfsl6qx3l0v3nwgjvk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:44 -03:00
Arnaldo Carvalho de Melo
8607c1ee73
tools include: Move ARRAY_SIZE() to linux/kernel.h
...
To match the kernel, then look for places redefining it to make it use
this version, which checks that its parameter is an array at build time.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-txlcf1im83bcbj6kh0wxmyy8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:43 -03:00
Arnaldo Carvalho de Melo
f6441aff89
tools include: Adopt __same_type() and __must_be_array() from the kernel
...
Will be used to adopt the more stringent version of ARRAY_SIZE(), the
one in the kernel sources.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-d85dpvay1hoqscpezlntyd8x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:42 -03:00
Arnaldo Carvalho de Melo
379d61b1c7
tools include: Introduce linux/bug.h, from the kernel sources
...
With just what we will need in the upcoming changesets, the
BUILD_BUG_ON_ZERO() definition.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-lw8zg7x6ttwcvqhp90mwe3vo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:42 -03:00
Arnaldo Carvalho de Melo
7909675daf
perf tools: Remove FLEX_ARRAY definition
...
We rely on symbol->name[0] since the beginning of tools/perf/, never
having received any complaint about it, also all the containers build
perf just fine, so remove this git codebase remnant.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/n/tip-jsjpgojut8e22o2gtz83augk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:41 -03:00
Arnaldo Carvalho de Melo
4c38c8f5d2
perf unwind arm64: Add missing errno.h header
...
Since it uses EINVAL unconditionally, it needs to also unconditionally
include errno.h.
Detected when recent changes made errno.h not be included by chance when
tools/perf/arch/arm64/util/unwind-libunwind.c gets included by
tools/perf/util/libunwind/arm64.c.
Putting this changeset just before that change so that we don't lose
bisectability on arm64.
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: David Ahern <dsahern@gmail.com >
Cc: Jean Pihet <jean.pihet@linaro.org >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Namhyung Kim <namhyung@kernel.org >
Cc: Wang Nan <wangnan0@huawei.com >
Fixes: 8ab596afb9 ("perf tools ARM64: Wire up perf_regs and unwind support")
Link: http://lkml.kernel.org/n/tip-60zjev2o1locp5ivod38epa2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-19 13:01:41 -03:00
Ingo Molnar
e720c19e0d
Merge tag 'perf-core-for-mingo-4.12-20170413' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
...
Pull perf/core improvements and fixes Arnaldo Carvalho de Melo:
User visible changes:
- Fix 'perf stat' bug in handling events in error state (Stephane Eranian)
Documentation changes:
- Add usage of --no-syscalls in 'perf trace' man page (Ravi Bangoria)
Infrastructure changes:
- Pass PYTHON config to feature detection (David Carrillo-Cisneros)
- Disable JVMTI if no ELF support available (David Carrillo-Cisneros)
- Fix feature detection redefinion of build flags (David Carrillo-Cisneros)
- Hint missing file when tool tips fail to load (David Carrillo-Cisneros)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-17 10:11:09 +02:00
Kan Liang
fd583ad156
perf/x86: Fix spurious NMI with PEBS Load Latency event
...
Spurious NMIs will be observed with the following command:
while :; do
perf record -bae "cpu/umask=0x01,event=0xcd,ldlat=0x80/pp"
-e "cpu/umask=0x03,event=0x0/"
-e "cpu/umask=0x02,event=0x0/"
-e cycles,branches,cache-misses
-e cache-references -- sleep 10
done
The bug was introduced by commit:
8077eca079 ("perf/x86/pebs: Add workaround for broken OVFL status on HSW+")
That commit clears the status bits for the counters used for PEBS
events, by masking the whole 64 bits pebs_enabled. However, only the
low 32 bits of both status and pebs_enabled are reserved for PEBS-able
counters.
For status bits 32-34 are fixed counter overflow bits. For
pebs_enabled bits 32-34 are for PEBS Load Latency.
In the test case, the PEBS Load Latency event and fixed counter event
could overflow at the same time. The fixed counter overflow bit will
be cleared by mistake. Once it is cleared, the fixed counter overflow
never be processed, which finally trigger spurious NMI.
Correct the PEBS enabled mask by ignoring the non-PEBS bits.
Signed-off-by: Kan Liang <kan.liang@intel.com >
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Arnaldo Carvalho de Melo <acme@redhat.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Vince Weaver <vincent.weaver@maine.edu >
Fixes: 8077eca079 ("perf/x86/pebs: Add workaround for broken OVFL status on HSW+")
Link: http://lkml.kernel.org/r/1491333246-3965-1-git-send-email-kan.liang@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-14 10:31:39 +02:00
Ingo Molnar
18c5c7c618
Merge branch 'perf/urgent' into perf/core, to pick up fixes
...
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-14 10:30:28 +02:00
Peter Zijlstra
f2200ac311
perf/x86: Avoid exposing wrong/stale data in intel_pmu_lbr_read_32()
...
When the perf_branch_entry::{in_tx,abort,cycles} fields were added,
intel_pmu_lbr_read_32() wasn't updated to initialize them.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: linux-kernel@vger.kernel.org
Cc: <stable@vger.kernel.org >
Fixes: 135c5612c4 ("perf/x86/intel: Support Haswell/v4 LBR format")
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-14 10:18:00 +02:00
David Carrillo-Cisneros
16eb81365b
Revert "perf tools: Fix include of linux/mman.h"
...
In https://lkml.org/lkml/2017/2/2/16 I reported a build error that I
believed was caused by wrong uapi includes. The synthom was fixed by
Arnaldo in:
commit 2f7db55579 ("perf tools: Fix include of linux/mman.h")
but I was wrong attributing the problem to the uapi include.
The root cause was that I was using ARCH=x86_64, hence using the wrong
uapi include path. This explains why no one else ran into this build
problem.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com >
Acked-by: Jiri Olsa <jolsa@kernel.org >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: He Kuang <hekuang@huawei.com >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Paul Turner <pjt@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Simon Que <sque@chromium.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/20170412064919.92449-8-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-13 11:54:46 -03:00
David Carrillo-Cisneros
570eda0321
perf util: Hint missing file when tool tips fail to load
...
Besides memory allocation failure, tips.txt may fail to load because the
file is not found (a more likely cause).
Communicate that to the user in tips failure warning.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com >
Acked-by: Jiri Olsa <jolsa@kernel.org >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: He Kuang <hekuang@huawei.com >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Paul Turner <pjt@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Simon Que <sque@chromium.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/20170412064919.92449-5-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-13 11:52:51 -03:00
David Carrillo-Cisneros
9961aa665b
tools build: Fix feature detection redefinion of build flags
...
This change is a follow up of https://lkml.org/lkml/2017/2/2/16
The patch above avoided redefining CC, CXX and PKG_CONFIG in feature
detection. The patch was not merged due to a unsolved concern with the
-MD flag.
Later, commit c8c188679c ("tools build: Use the same CC for feature
detection and actual build") did the change for CC and CXX but not
PKG_CONFIG.
This patch makes PKG_CONFIG consistent with CC and CXX and moves the -MD
to CFLAGS, as suggested by Jiri in the thread above.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: He Kuang <hekuang@huawei.com >
Cc: Jiri Olsa <jolsa@kernel.org >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Paul Turner <pjt@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Simon Que <sque@chromium.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/20170412064919.92449-3-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-13 11:48:48 -03:00
David Carrillo-Cisneros
e5e992a7c1
perf tools: Disable JVMTI if no ELF support available
...
The build of JVMTI depends on LIBELF (-lelf). Make Makefile.conf
check this dependendancy and notify user when not present.
v2: Comma nitpicking.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com >
Tested-by: Kim Phillips <kim.phillips@arm.com >
Acked-by: Jiri Olsa <jolsa@kernel.org >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: He Kuang <hekuang@huawei.com >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Paul Turner <pjt@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Simon Que <sque@chromium.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/20170412170745.26620-1-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-13 11:47:43 -03:00
Ravi Bangoria
739cf30551
perf trace: Add usage of --no-syscalls in man page
...
perf trace supports --no-syscalls option but it's not listed in the man
page. (Though, I see an example using --no-syscalls in EXAMPLES
section.)
Committer note:
The --no-syscalls option tells 'perf trace' not to automagically ask for
raw_syscalls:sys_{enter,exit} to then format it in a strace like way.
This become more used as 'perf trace' got support for arbitrary events,
such as tracepoints, so more and more we use:
# perf trace --no-syscalls -e nmi:*
0.000 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 36649 handled: 1)
0.019 nmi:nmi_handler:nmi_cpu_backtrace_handler() delta_ns: 2907 handled: 0)
0.676 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 9401 handled: 1)
0.680 nmi:nmi_handler:nmi_cpu_backtrace_handler() delta_ns: 288 handled: 0)
0.701 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 4977 handled: 1)
0.703 nmi:nmi_handler:nmi_cpu_backtrace_handler() delta_ns: 67 handled: 0)
0.736 nmi:nmi_handler:perf_event_nmi_handler() delta_ns: 8549 handled: 1)
^C#
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Alexis Berlemont <alexis.berlemont@gmail.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Link: http://lkml.kernel.org/r/1492063332-5745-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-13 10:54:04 -03:00
Stephane Eranian
db49a71798
perf stat: Fix bug in handling events in error state
...
(This is a patch has been sitting in the Intel CQM/CMT driver series for
a while, despite not depend on it. Sending it now independently since
the series is being discarded.)
When an event is in error state, read() returns 0 instead of sizeof()
buffer. In certain modes, such as interval printing, ignoring the 0
return value may cause bogus count deltas to be computed and thus
invalid results printed.
This patch fixes this problem by modifying read_counters() to mark the
event as not scaled (scaled = -1) to force the printout routine to show
<NOT COUNTED>.
Signed-off-by: Stephane Eranian <eranian@google.com >
Reviewed-by: David Carrillo-Cisneros <davidcc@google.com >
Acked-by: Jiri Olsa <jolsa@redhat.com >
Cc: Adrian Hunter <adrian.hunter@intel.com >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: Mathieu Poirier <mathieu.poirier@linaro.org >
Cc: Paul Turner <pjt@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/20170412182301.44406-1-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-13 10:40:36 -03:00
David Carrillo-Cisneros
7be6b3166e
perf tools: Pass PYTHON config to feature detection
...
( This is a rebased version of https://lkml.org/lkml/2017/2/7/662 )
Python's CC and link Makefile variables were not passed to feature
detection, causing feature detection to use system's Python rather than
PYTHON_CONFIG's one. This created a mismatch between the detected Python
support and the one actually used by perf when PYTHON_CONFIG is
specified.
Fix it by moving Python's variable initialization to before feature
detection and pass FLAGS_PYTHON_EMBED to Python's feature detection's
build target.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com >
Acked-by: Jiri Olsa <jolsa@kernel.org >
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com >
Cc: Andi Kleen <ak@linux.intel.com >
Cc: He Kuang <hekuang@huawei.com >
Cc: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Paul Turner <pjt@google.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Simon Que <sque@chromium.org >
Cc: Stephane Eranian <eranian@google.com >
Cc: Wang Nan <wangnan0@huawei.com >
Link: http://lkml.kernel.org/r/20170412064919.92449-2-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2017-04-12 10:45:21 -03:00
Masami Hiramatsu
a8d11cd071
kprobes/x86: Consolidate insn decoder users for copying code
...
Consolidate x86 instruction decoder users on the path of
copying original code for kprobes.
Kprobes decodes the same instruction a maximum of 3 times when
preparing the instruction buffer:
- The first time for getting the length of the instruction,
- the 2nd for adjusting displacement,
- and the 3rd for checking whether the instruction is boostable or not.
For each time, the actual decoding target address is slightly
different (1st is original address or recovered instruction buffer,
2nd and 3rd are pointing to the copied buffer), but all have
the same instruction.
Thus, this patch also changes the target address to the copied
buffer at first and reuses the decoded "insn" for displacement
adjusting and checking boostability.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com >
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com >
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: David S . Miller <davem@davemloft.net >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ye Xiaolong <xiaolong.ye@intel.com >
Link: http://lkml.kernel.org/r/149076389643.22469.13151892839998777373.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-12 09:23:47 +02:00
Masami Hiramatsu
ea1e34fc36
kprobes/x86: Use probe_kernel_read() instead of memcpy()
...
Use probe_kernel_read() for avoiding unexpected faults while
copying kernel text in __recover_probed_insn(),
__recover_optprobed_insn() and __copy_instruction().
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com >
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com >
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: David S . Miller <davem@davemloft.net >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ye Xiaolong <xiaolong.ye@intel.com >
Link: http://lkml.kernel.org/r/149076382624.22469.10091613887942958518.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-12 09:23:47 +02:00
Masami Hiramatsu
d0381c81c2
kprobes/x86: Set kprobes pages read-only
...
Set the pages which is used for kprobes' singlestep buffer
and optprobe's trampoline instruction buffer to readonly.
This can prevent unexpected (or unintended) instruction
modification.
This also passes rodata_test as below.
Without this patch, rodata_test shows a warning:
WARNING: CPU: 0 PID: 1 at arch/x86/mm/dump_pagetables.c:235 note_page+0x7a9/0xa20
x86/mm: Found insecure W+X mapping at address ffffffffa0000000/0xffffffffa0000000
With this fix, no W+X pages are found:
x86/mm: Checked W+X mappings: passed, no W+X pages found.
rodata_test: all tests were successful
Reported-by: Andrey Ryabinin <aryabinin@virtuozzo.com >
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com >
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: David S . Miller <davem@davemloft.net >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ye Xiaolong <xiaolong.ye@intel.com >
Link: http://lkml.kernel.org/r/149076375592.22469.14174394514338612247.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-12 09:23:46 +02:00
Masami Hiramatsu
490154bc68
kprobes/x86: Make boostable flag boolean
...
Make arch_specific_insn.boostable to boolean, since it has
only 2 states, boostable or not. So it is better to use
boolean from the viewpoint of code readability.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com >
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com >
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: David S . Miller <davem@davemloft.net >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ye Xiaolong <xiaolong.ye@intel.com >
Link: http://lkml.kernel.org/r/149076368566.22469.6322906866458231844.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-12 09:23:46 +02:00
Masami Hiramatsu
804dec5bda
kprobes/x86: Do not modify singlestep buffer while resuming
...
Do not modify singlestep execution buffer (kprobe.ainsn.insn)
while resuming from single-stepping, instead, modifies
the buffer to add a jump back instruction at preparing
buffer.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com >
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com >
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: David S . Miller <davem@davemloft.net >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ye Xiaolong <xiaolong.ye@intel.com >
Link: http://lkml.kernel.org/r/149076361560.22469.1610155860343077495.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-12 09:23:45 +02:00
Masami Hiramatsu
17880e4d57
kprobes/x86: Use instruction decoder for booster
...
Use x86 instruction decoder for checking whether the probed
instruction is able to boost or not, instead of hand-written
code.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com >
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com >
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: David S . Miller <davem@davemloft.net >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Josh Poimboeuf <jpoimboe@redhat.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Ye Xiaolong <xiaolong.ye@intel.com >
Link: http://lkml.kernel.org/r/149076354563.22469.13379472209338986858.stgit@devbox
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2017-04-12 09:23:45 +02:00