[PATCH] bpf: sample: define aarch64 specific registers

2015-10-26 Thread Yang Shi
Define aarch64 specific registers for building bpf samples correctly. Signed-off-by: Yang Shi <yang@linaro.org> --- samples/bpf/bpf_helpers.h | 12 1 file changed, 12 insertions(+) diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h index 3a44d3a..af44e56

[PATCH 2/2] arm64: bpf: add BPF XADD instruction

2015-11-10 Thread Yang Shi
aarch64 doesn't have native support for XADD instruction, implement it by the below instruction sequence: Load (dst + off) to a register Add src to it Store it back to (dst + off) Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi

[PATCH 0/2] arm64: bpf: add BPF_ST and BPF_XADD instructions support

2015-11-10 Thread Yang Shi
are applied after my BPF JIT stack fix [1]. [1] https://patches.linaro.org/56268/ Yang Shi (2): arm64: bpf: add 'store immediate' instruction arm64: bpf: add BPF XADD instruction arch/arm64/net/bpf_jit_comp.c | 39 ++- 1 file changed, 34 insertions(+), 5

[PATCH 1/2] arm64: bpf: add 'store immediate' instruction

2015-11-10 Thread Yang Shi
aarch64 doesn't have native store immediate instruction, such operation has to be implemented by the below instruction sequence: Load immediate to register Store register Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail

[PATCH V2 0/2] arm64: cleanup FRAME_POINTER kconfig option and force to select it

2015-11-09 Thread Yang Shi
According to the discussion on the mailing list, this version adds a new patch to force select FRAME_POINTER for ARM64. Change v2 --> v1: 1. Adds a new patch to force select FRAME_POINTER 2. Notes that this change adds a dependency on DEBUG_KERNEL for building with frame pointers Yang Shi

[PATCH 2/2] arm64: force to select FRAME_POINTER

2015-11-09 Thread Yang Shi
ARM64 depends on frame pointer to get correct stack backtrace and need FRAME_POINTER kconfig option enabled all the time. However, currect implementation makes it could be disabled, so force it to be selected by ARM64. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/Kconfig |

[PATCH 1/2] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-09 Thread Yang Shi
FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine it in arch/arm64/Kconfig.debug. Actually, the one defined in arm64 directory is never used. This adds a dependency on DEBUG_KERNEL for building with frame pointers. Signed-off-by: Yang Shi <yang@linaro.org> ---

[V3 PATCH] arm64: remove redundant FRAME_POINTER kconfig option and force to select it

2015-11-09 Thread Yang Shi
backtrace and need FRAME_POINTER kconfig option enabled all the time. However, currect implementation makes it could be disabled, so force it to be selected by ARM64. Signed-off-by: Yang Shi <yang@linaro.org> --- change v3 --> v2: squash two patches into one. arch/arm64/Kconfig |

[PATCH 3/4] avr32: select ARCH_WANT_FRAME_POINTERS and set DEBUG_KERNEL in defconfigs

2015-11-09 Thread Yang Shi
FRAME_POINTER is set by default if ARCH_WANT_FRAME_POINTERS and DEBUG_KERNEL are selcted, this is the standard way to include FRAME_POINTER used by all of other architectures. And, set DEBUG_KERNEL=y in defconfigs otherwise FRAME_POINTER won't be enabled at all. Signed-off-by: Yang Shi <y

[PATCH 1/4] m32r: remove redundant FRAME_POINTER kconfig option

2015-11-09 Thread Yang Shi
FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine it in arch/m32r/Kconfig.debug. Actually, the one defined in arch directory is never used. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/m32r/Kconfig.debug | 8 1 file changed, 8 deletions(-)

[PATCH 0/4] cleanup FRAME_POINTER kconfig option use

2015-11-09 Thread Yang Shi
When I cleanup FRME_POINTER use for arm64 arch, I found some other architectures need the similar cleanup. So, I came up with the patch series for them. Yang Shi (4): m32r: remove redundant FRAME_POINTER kconfig option hexagon: select ARCH_WANT_FRAME_POINTERS instead of defining

[PATCH 2/4] hexagon: select ARCH_WANT_FRAME_POINTERS instead of defining FRAME_POINTER

2015-11-09 Thread Yang Shi
FRAME_POINTER is set by default if ARCH_WANT_FRAME_POINTERS is selcted, this is the standard way to include FRAME_POINTER used by all of other architectures. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/hexagon/Kconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)

[PATCH 4/4] h8300: set DEBUG_KERNEL in defconfigs

2015-11-09 Thread Yang Shi
h8300 has FRAME_POINTER selected by default, but it depends on DEBUG_KERNEL, so set DEBUG_KERNEL in defconfigs. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/h8300/configs/edosk2674_defconfig | 1 + arch/h8300/configs/h8300h-sim_defconfig | 1 + arch/h8300/configs/h8s-sim_def

[PATCH V2 0/2] arm64: bpf: correct JIT stack setup and make it align with ARM64 AAPCS

2015-11-12 Thread Yang Shi
Changelog in V2: Split to two patches according to the suggestion from Zi Shen Lim Show A64_FP in stack layout diagram Correct "+64" to "-64" Yang Shi (2): arm64: bpf: fix JIT frame pointer setup arm64: bpf: make BPF prologue and epilogue align with ARM64 AA

[PATCH 1/2] arm64: bpf: fix JIT frame pointer setup

2015-11-12 Thread Yang Shi
BPF fp should point to the top of the BPF prog stack. The original implementation made it point to the bottom incorrectly. Move A64_SP to fp before reserve BPF prog stack space. CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail.com> Signed-off-by: Yang Shi <yang

[PATCH 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-12 Thread Yang Shi
all stack | | +-+ low CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail.com> Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/net/bpf_jit_comp.c | 34 +- 1 file changed, 29 insertions(+), 5 deletions(

[PATCH] bpf: samples: exclude asm/sysreg.h for arm64

2015-11-12 Thread Yang Shi
e sysreg.h is useless for BPF samples, just exclude it from Makefile via defining __ASM_SYSREG_H. Signed-off-by: Yang Shi <yang@linaro.org> --- samples/bpf/Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index

[PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-13 Thread Yang Shi
|| m_dirty <= dirty_freerun_ceiling(m_thresh, m_bg_thresh) If mdtc is null, dirty_freerun_ceiling will not be called at all, so the initialization will not change any behavior other than just ceasing the compile warning. Signed-off-by: Yang Shi <yang@linaro.org> --- mm/page-writeback.c | 2 +-

[PATCH V3 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-13 Thread Yang Shi
n call stack | | +-+ low CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail.com> Signed-off-by: Yang Shi <yang@linaro.org> --- V3 --> V2: * Make FP point to FP' * Fix a

[PATCH V4 2/2] arm64: bpf: make BPF prologue and epilogue align with ARM64 AAPCS

2015-11-16 Thread Yang Shi
n call stack | | +-+ low CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail.com> Signed-off-by: Yang Shi <yang@linaro.org> --- V4 --> V3: * Save/restore x25 and x26 V3 --> V2: * Make FP point to FP' * Fix a compile warning

[PATCH] bpf: convert hashtab lock to raw lock

2015-10-30 Thread Yang Shi
8083 7560: 008751e0 8000 0001 124e2d1d 00107b77 Convert hashtab lock to raw lock to avoid such warning. Signed-off-by: Yang Shi <yang@linaro.org> --- This patch is applicable to mainline kernel too. kernel/bpf/hashtab.

[PATCH] bpf: add mod default A and X test cases

2015-11-04 Thread Yang Shi
When running "mod X" operation, if X is 0 the filter has to be halt. Add new test cases to cover A = A mod X if X is 0, and A = A mod 1. CC: Xi Wang <xi.w...@gmail.com> CC: Zi Shen Lim <zlim@gmail.com> Signed-off-by: Yang Shi <yang@linaro.org&

[PATCH] arm64: bpf: fix JIT stack setup

2015-11-06 Thread Yang Shi
A64_SP => +-+ | | | ... | Function call stack | | +-+ low Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wa

[PATCH] arm64: bpf: fix JIT stack setup

2015-11-06 Thread Yang Shi
A64_SP => +-+ | | | ... | Function call stack | | +-+ low Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wa

[PATCH] bpf: doc: correct arch list for supported eBPF JIT

2015-11-06 Thread Yang Shi
aarch64 and s390x support eBPF JIT too, correct document to reflect this and avoid any confusion. Signed-off-by: Yang Shi <yang@linaro.org> --- Documentation/networking/filter.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/filter.

[PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-04 Thread Yang Shi
FRAME_POINTER is defined in lib/Kconfig.debug, it is unnecessary to redefine it in arch/arm64/Kconfig.debug. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/Kconfig.debug | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug

[PATCH] rcu: remove CONFIG_RCU_USER_QS from rcutorture selftest doc

2015-10-15 Thread Yang Shi
commit d1ec4c34c7a9f328e43ea87522119258194f28f8 ("rcu: Drop RCU_USER_QS in favor of NO_HZ_FULL") has removed RCU_USER_QS from Kconfig file, so remove it from some documents to avoid any confusion. Signed-off-by: Yang Shi <yang@linaro.org> --- tools/testing/selftest

[PATCH] rt: trace: add rcuidle version macro for preemptirqsoff_hist and hrtimer_interrupt

2015-10-19 Thread Yang Shi
and PREEMPT_OFF_HIST is selected, otherwise just trace_preemptirqsoff_hist is defined as a preprocessor macro. Added rcuidle version macro when the condition is false, and added rcuidle version macro for trace_hrtimer_interrupt_rcuidle even though it is not called by anyone. Signed-off-by: Yang Shi

[PATCH] rcu: remove rcu_user_hooks_switch

2015-10-19 Thread Yang Shi
It is not invoked by anyone now, just remove it. Signed-off-by: Yang Shi <yang@linaro.org> --- include/linux/rcupdate.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 581abf8..56355bc 100644 --- a/include/linux/rcupdate.h

[v2 PATCH] arm64: convert patch_lock to raw lock

2015-10-06 Thread Yang Shi
/0xc8 Convert patch_lock to raw lock to avoid this issue. Although the problem is found on rt kernel, the fix should be applicable to mainline kernel too. Signed-off-by: Yang Shi <yang@linaro.org> Acked-by: Steven Rostedt <rost...@goodmis.org> --- v1 -> v2: Add Steven's Acked-

[PATCH] arm64: restore bogomips information in /proc/cpuinfo

2015-11-18 Thread Yang Shi
don't bother reporting bogomips in /proc/cpuinfo"), but with some tweak due to context change. [1] https://lkml.org/lkml/2015/1/4/132 Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/cpuinfo.c | 5 + arch/arm64/kernel/smp.c | 7 ++- 2 files changed, 11

[V2 PATCH] arm64: restore bogomips information in /proc/cpuinfo

2015-11-18 Thread Yang Shi
don't bother reporting bogomips in /proc/cpuinfo"), but with some tweak due to context change. [1] https://lkml.org/lkml/2015/1/4/132 Acked-by: Will Deacon <will.dea...@arm.com> Cc: <sta...@vger.kernel.org> #3.12+ Signed-off-by: Yang Shi <yang@linaro.org> --- V2 --&g

[PATCH] perf: change samples type to unsigned long long

2015-09-29 Thread Yang Shi
ch64, arm, mips, ppc and ppc64. Signed-off-by: Yang Shi <yang@linaro.org> --- tools/perf/builtin-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 142eeb3..e54aa4c 100644 --- a/tools/perf/builtin-record.

[PATCH] arm64: convert patch_lock to raw lock

2015-09-30 Thread Yang Shi
/0xc8 Convert patch_lock to raw loc kto avoid this issue. Although the problem is found on rt kernel, the fix should be applicable to mainline kernel too. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/insn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-09-30 Thread Yang Shi
Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/debug-monitors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index cebf786..eb520d0 100644 --- a/arch/arm64/kernel/debug-moni

[v2 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-01 Thread Yang Shi
u lock and replace relevant list operations to rcu version. Signed-off-by: Yang Shi <yang@linaro.org> --- v1-> v2 Replace list operations to rcu version. arch/arm64/kernel/debug-monitors.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/kernel/debu

[v3 PATCH] arm64: replace read_lock to rcu lock in call_break_hook

2015-10-05 Thread Yang Shi
eplace relevant list operations to rcu version and call synchronize_rcu() in unregister_break_hook(). And, replace write lock to spinlock in {un}register_break_hook. Signed-off-by: Yang Shi <yang@linaro.org> --- v2 -> v3 Add synchronize_rcu() in ungister_break_hook() Replace write l

[RFC V3] Add gup trace points support

2015-12-08 Thread Yang Shi
all variants will call it finally to do real work. Although __get_user_pages_fast doesn't call handle_mm_fault, it might be useful to have it to distinguish between slow and fast version. Yang Shi (7): trace/events: Add gup trace events mm/gup: add gup trace points x86: mm/gup: add

[PATCH v3 3/7] x86: mm/gup: add gup trace points

2015-12-08 Thread Yang Shi
Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@redhat.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/x86/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v3 1/7] trace/events: Add gup trace events

2015-12-08 Thread Yang Shi
page-faults events record the invoke to handle_mm_fault, but the invoke may come from do_page_fault or gup. In some use cases, the finer event count mey be needed, so add trace events support for: __get_user_pages __get_user_pages_fast fixup_user_fault Signed-off-by: Yang Shi <y

[PATCH v3 6/7] sh: mm/gup: add gup trace points

2015-12-08 Thread Yang Shi
Cc: linux...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sh/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..d4c9a6e 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c @@ -14,6 +14,9 @@ #i

[PATCH v3 7/7] sparc64: mm/gup: add gup trace points

2015-12-08 Thread Yang Shi
Cc: "David S. Miller" <da...@davemloft.net> Cc: sparcli...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sparc/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c index 2e5c4fc..d364cc6 1006

[PATCH v3 4/7] mips: mm/gup: add gup trace points

2015-12-08 Thread Yang Shi
Cc: linux-m...@linux-mips.org Acked-by: Ralf Baechle <r...@linux-mips.org> Signed-off-by: Yang Shi <yang@linaro.org> --- arch/mips/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 349995d..2107499 100644 --- a/arch/m

[PATCH v3 2/7] mm/gup: add gup trace points

2015-12-08 Thread Yang Shi
For slow version, just add trace point for raw __get_user_pages since all slow variants call it to do the real work finally. Signed-off-by: Yang Shi <yang@linaro.org> --- mm/gup.c | 8 1 file changed, 8 insertions(+) diff --git a/mm/gup.c b/mm/gup.c index deafa2c..44f05c9

[PATCH v3 5/7] s390: mm/gup: add gup trace points

2015-12-08 Thread Yang Shi
Cc: Martin Schwidefsky <schwidef...@de.ibm.com> Cc: Heiko Carstens <heiko.carst...@de.ibm.com> Cc: linux-s...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/s390/mm/gup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/s390/mm/gup.c b/

[PATCH 1/7] trace/events: Add gup trace events

2015-12-01 Thread Yang Shi
page-faults events record the invoke to handle_mm_fault, but the invoke may come from do_page_fault or gup. In some use cases, the finer event count mey be needed, so add trace events support for: __get_user_pages __get_user_pages_fast fixup_user_fault Signed-off-by: Yang Shi <y

[RFC] Add gup trace points support

2015-12-01 Thread Yang Shi
and fast version. Yang Shi (7): trace/events: Add gup trace events mm/gup: add gup trace points x86: mm/gup: add gup trace points mips: mm/gup: add gup trace points s390: mm/gup: add gup trace points sh: mm/gup: add gup trace points sparc64: mm/gup: add

[PATCH 3/7] x86: mm/gup: add gup trace points

2015-12-01 Thread Yang Shi
Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@redhat.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/x86/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 2/7] mm/gup: add gup trace points

2015-12-01 Thread Yang Shi
For slow version, just add trace point for raw __get_user_pages since all slow variants call it to do the real work finally. Signed-off-by: Yang Shi <yang@linaro.org> --- mm/gup.c | 8 1 file changed, 8 insertions(+) diff --git a/mm/gup.c b/mm/gup.c index deafa2c..72de7af

[PATCH 5/7] s390: mm/gup: add gup trace points

2015-12-01 Thread Yang Shi
Cc: Martin Schwidefsky <schwidef...@de.ibm.com> Cc: Heiko Carstens <heiko.carst...@de.ibm.com> Cc: linux-s...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/s390/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/s390/mm/gup.c b/

[PATCH 6/7] sh: mm/gup: add gup trace points

2015-12-01 Thread Yang Shi
Cc: linux...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sh/mm/gup.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..6df3e97 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c @@ -12,6 +12,10 @@ #i

[PATCH 7/7] sparc64: mm/gup: add gup trace points

2015-12-01 Thread Yang Shi
Cc: "David S. Miller" <da...@davemloft.net> Cc: sparcli...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- The context depends on the below patch: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1028752.html arch/sparc/mm/gup.c | 8 +

[PATCH 4/7] mips: mm/gup: add gup trace points

2015-12-01 Thread Yang Shi
Cc: Ralf Baechle <r...@linux-mips.org> Cc: linux-m...@linux-mips.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/mips/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 349995d..3c5b8c8 100644 --- a/arch/mips/mm

[PATCH v4 3/7] x86: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@redhat.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/x86/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v4 5/7] s390: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: Martin Schwidefsky <schwidef...@de.ibm.com> Cc: Heiko Carstens <heiko.carst...@de.ibm.com> Cc: linux-s...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/s390/mm/gup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/s390/mm/gup.c b/

[PATCH v4 4/7] mips: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: linux-m...@linux-mips.org Acked-by: Ralf Baechle <r...@linux-mips.org> Signed-off-by: Yang Shi <yang@linaro.org> --- arch/mips/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 349995d..e0d8838 100644 --- a/arch/m

[PATCH v4 7/7] sparc64: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: "David S. Miller" <da...@davemloft.net> Cc: sparcli...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sparc/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c index 2e5c4fc..d9f573c 1006

[PATCH V2 2/7] mm/gup: add gup trace points

2015-12-02 Thread Yang Shi
For slow version, just add trace point for raw __get_user_pages since all slow variants call it to do the real work finally. Signed-off-by: Yang Shi <yang@linaro.org> --- mm/gup.c | 8 1 file changed, 8 insertions(+) diff --git a/mm/gup.c b/mm/gup.c index deafa2c..10245a4

[PATCH V2 1/7] trace/events: Add gup trace events

2015-12-02 Thread Yang Shi
page-faults events record the invoke to handle_mm_fault, but the invoke may come from do_page_fault or gup. In some use cases, the finer event count mey be needed, so add trace events support for: __get_user_pages __get_user_pages_fast fixup_user_fault Signed-off-by: Yang Shi <y

[RFC V2] Add gup trace points support

2015-12-02 Thread Yang Shi
might be useful to have it to distinguish between slow and fast version. Yang Shi (7): trace/events: Add gup trace events mm/gup: add gup trace points x86: mm/gup: add gup trace points mips: mm/gup: add gup trace points s390: mm/gup: add gup trace points sh: mm/gup: a

[PATCH V2 6/7] sh: mm/gup: add gup trace points

2015-12-02 Thread Yang Shi
Cc: linux...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sh/mm/gup.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..6df3e97 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c @@ -12,6 +12,10 @@ #i

[PATCH V2 5/7] s390: mm/gup: add gup trace points

2015-12-02 Thread Yang Shi
Cc: Martin Schwidefsky <schwidef...@de.ibm.com> Cc: Heiko Carstens <heiko.carst...@de.ibm.com> Cc: linux-s...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/s390/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/s390/mm/gup.c b/

[PATCH V2 7/7] sparc64: mm/gup: add gup trace points

2015-12-02 Thread Yang Shi
Cc: "David S. Miller" <da...@davemloft.net> Cc: sparcli...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- The context depends on the below patch: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1028752.html arch/sparc/mm/gup.c | 8 +

[PATCH V2 3/7] x86: mm/gup: add gup trace points

2015-12-02 Thread Yang Shi
Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@redhat.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/x86/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH V2 4/7] mips: mm/gup: add gup trace points

2015-12-02 Thread Yang Shi
Cc: linux-m...@linux-mips.org Acked-by: Ralf Baechle <r...@linux-mips.org> Signed-off-by: Yang Shi <yang@linaro.org> --- arch/mips/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 349995d..3c5b8c8 100644 --- a/arch/m

[PATCH v5 7/7] sparc64: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: "David S. Miller" <da...@davemloft.net> Cc: sparcli...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sparc/mm/gup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/sparc/mm/gup.c b/arch/sparc/mm/gup.c index 2e5c4fc..5a06c34 1006

[PATCH v5 4/7] mips: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: linux-m...@linux-mips.org Acked-by: Ralf Baechle <r...@linux-mips.org> Signed-off-by: Yang Shi <yang@linaro.org> --- arch/mips/mm/gup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 349995d..7d90883 100644 --- a/arch/m

[RFC V5] Add gup trace points support

2015-12-09 Thread Yang Shi
v5: * Fixed a typo introduced by v4 rebase * Removed redundant "#define CREATE_TRACE_POINTS" from architecture specifc gup.c v4: * Adopted Steven's suggestion to use "unsigned int" for nr_pages to save space in ring buffer since it is unlikely to have more than 0x pages are touched

[PATCH v5 5/7] s390: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: Martin Schwidefsky <schwidef...@de.ibm.com> Cc: Heiko Carstens <heiko.carst...@de.ibm.com> Cc: linux-s...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/s390/mm/gup.c | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/s390/mm/gup.c b/arch/s

[PATCH v5 6/7] sh: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: linux...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sh/mm/gup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..dc80480 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c @@ -14,6 +14,8 @@ #i

[PATCH v5 2/7] mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
For slow version, just add trace point for raw __get_user_pages since all slow variants call it to do the real work finally. Signed-off-by: Yang Shi <yang@linaro.org> --- mm/gup.c | 8 1 file changed, 8 insertions(+) diff --git a/mm/gup.c b/mm/gup.c index deafa2c..00a3cff

[PATCH v5 1/7] trace/events: Add gup trace events

2015-12-09 Thread Yang Shi
page-faults events record the invoke to handle_mm_fault, but the invoke may come from do_page_fault or gup. In some use cases, the finer event count mey be needed, so add trace events support for: __get_user_pages __get_user_pages_fast fixup_user_fault Signed-off-by: Yang Shi <y

[PATCH v5 3/7] x86: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@redhat.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/x86/mm/gup.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arc

[PATCH] ppc64: select HAVE_CONTEXT_TRACKING by default

2015-12-09 Thread Yang Shi
PPC64 machines. Signed-off-by: Yang Shi <yang@linaro.org> --- Following the instruction in Documentation/timers/NO_HZ.txt, I tested full nohz on my FSL T2080 target, the below trace log shows it works well. user_loop-574 [001] d..1 137.044892: tick_stop: success=y

[PATCH] rt: x86: extend signal send delay to 32 bit

2015-12-10 Thread Yang Shi
[] do_force_sig_info+0x2a/0xc0 [] force_sig_info+0xd/0x10 [] send_sigtrap+0x6f/0x80 [] do_debug+0x161/0x1a0 [] debug_stack_correct+0x2e/0x35 Signal send delay is just available for x86-64, x86-32 needs it too. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/x86/include/asm/si

[PATCH v2] rt: x86: enable preemption in IST exception for x86-32

2015-12-14 Thread Yang Shi
nter which disables preemption uncondiontionally for both x86-64 and x86-32. However, x86-32 does not have an IST and the stack still belongs to the current task and there is no problem in scheduling out the task. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/x86/kernel/traps.c | 8

[PATCH] arm64: reenable interrupt when handling ptrace breakpoint

2015-12-15 Thread Yang Shi
The kernel just send out a SIGTRAP signal when handling ptrace breakpoint in debug exception, so it sounds safe to have interrupt enabled if it is not disabled by the parent process. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/debug-monitors.c | 10 ++

[RFC V4] Add gup trace points support

2015-12-09 Thread Yang Shi
o distinguish between slow and fast version. Yang Shi (7): trace/events: Add gup trace events mm/gup: add gup trace points x86: mm/gup: add gup trace points mips: mm/gup: add gup trace points s390: mm/gup: add gup trace points sh: mm/gup: add gup trace points sp

[PATCH v4 6/7] sh: mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
Cc: linux...@vger.kernel.org Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sh/mm/gup.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/sh/mm/gup.c b/arch/sh/mm/gup.c index e7af6a6..fa72aac 100644 --- a/arch/sh/mm/gup.c +++ b/arch/sh/mm/gup.c @@ -14,6 +14,9 @@ #i

[PATCH v4 1/7] trace/events: Add gup trace events

2015-12-09 Thread Yang Shi
page-faults events record the invoke to handle_mm_fault, but the invoke may come from do_page_fault or gup. In some use cases, the finer event count mey be needed, so add trace events support for: __get_user_pages __get_user_pages_fast fixup_user_fault Signed-off-by: Yang Shi <y

[PATCH v4 2/7] mm/gup: add gup trace points

2015-12-09 Thread Yang Shi
For slow version, just add trace point for raw __get_user_pages since all slow variants call it to do the real work finally. Signed-off-by: Yang Shi <yang@linaro.org> --- mm/gup.c | 8 1 file changed, 8 insertions(+) diff --git a/mm/gup.c b/mm/gup.c index deafa2c..00a3cff

[V2 PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Yang Shi
Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to slow path. Signed-off-by: Yang Shi <yang@linaro.org> --- Just found slow_irqon label is not defin

[PATCH] sparc64/gup: check address scope legitimacy

2015-11-25 Thread Yang Shi
Check if user address is accessible in atomic version __get_user_pages_fast() before walking the page table. And, check if end > start in get_user_pages_fast(), otherwise fallback to slow path. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/sparc/mm/gup.c | 5 + 1 file c

[RESEND PATCH] arm64: bpf: add 'store immediate' instruction

2015-11-30 Thread Yang Shi
aarch64 doesn't have native store immediate instruction, such operation has to be implemented by the below instruction sequence: Load immediate to register Store register Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmai

[v3 PATCH] arm64: kasan: instrument user memory access API

2016-06-08 Thread Yang Shi
e assembly implementation to __arch_copy_to/from_user. Tested by test_kasan module. Acked-by: Andrey Ryabinin <aryabi...@virtuozzo.com> Reviewed-by: Mark Rutland <mark.rutl...@arm.com> Tested-by: Mark Rutland <mark.rutl...@arm.com> Signed-off-by: Yang Shi <yang@linaro.

[PATCH] mm: use early_pfn_to_nid in page_ext_init

2016-05-25 Thread Yang Shi
h a better approach. [1] http://lkml.kernel.org/r/caamzw4oumypwqjvd7qufc6w1aic__tyauh80mlrznmxky0-...@mail.gmail.com CC: Joonsoo Kim <iamjoonsoo@lge.com> Signed-off-by: Yang Shi <yang@linaro.org> --- init/main.c | 3 +-- mm/page_ext.c | 4 +++- 2 files changed, 4 insertions(+)

[PATCH] mm: use early_pfn_to_nid in register_page_bootmem_info_node

2016-05-25 Thread Yang Shi
() by early_pfn_to_nid(). Signed-off-by: Yang Shi <yang@linaro.org> --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index caf2a14..b8ee080 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -300,7 +300,7 @

[PATCH] arm64: kasan: instrument user memory access API

2016-05-26 Thread Yang Shi
The upstream commit 1771c6e1a567ea0ba20a4ffe68a1419fd8ef ("x86/kasan: instrument user memory access API") added KASAN instrument to x86 user memory access API, so added such instrument to ARM64 too. Tested by test_kasan module. Signed-off-by: Yang Shi <yang@linaro.org>

[v2 PATCH] arm64: kasan: instrument user memory access API

2016-05-27 Thread Yang Shi
e assembly implementation to __arch_copy_to/from_user. Tested by test_kasan module. Signed-off-by: Yang Shi <yang@linaro.org> --- v2: Adopted the comment from Andrey and Mark to add kasan_check_read/write into __copy_to/from_user. arch/arm64/include/asm/uaccess.h | 25 +++

[PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame

2016-02-08 Thread Yang Shi
00 00 00 00 00 00 00 00 ffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Since the shadow byte pointed by the report is 0, so it may mean it is just hit oob in non-current task. So, disable the instrumentation to silence these warnings. Signed-off-by: Yang Shi <yang@lina

[PATCH] trace, kasan: silence Kasan warning in check_stack

2016-02-08 Thread Yang Shi
ck trace. It may touch the stack red zones to cause the warning. So, just disable the instrumentation to silence the warning. Signed-off-by: Yang Shi <yang@linaro.org> --- kernel/trace/trace_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_

[PATCH] arm64: disable kasan when accessing frame->fp in unwind_frame

2016-02-05 Thread Yang Shi
00 00 00 00 00 00 00 00 ffc064d57c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Since the shadow byte pointed by the report is 0, so it may mean it is just hit oob in non-current task. So, disable the instrumentation here. Signed-off-by: Yang Shi <yang@linaro.org> --- a

[PATCH] lib/Kconfig: make PREEMPT_COUNT depend on PREEMPT in DEBUG_ATOMIC_SLEEP

2016-02-12 Thread Yang Shi
When building non-preempt kernel (PREEMPT_NONE), PREEMPT_COUNT is still enabled if DEBUG_ATOMIC_SLEEP is enabled. But, it sounds not make sense to have PREEMPT_COUNT set in non-preempt kernel. So, make PREEMPT_COUNT depend on PREEMPT here. Signed-off-by: Yang Shi <yang@linaro.org> --

[PATCH] arm64: remove redundant preempt.h

2016-02-12 Thread Yang Shi
preempt.h has been included by sched.h, so it is not necessary to include both, just keep sched.h. Signed-off-by: Yang Shi <yang@linaro.org> --- Happened to find this when checking preempt.h include for another patch review. Build test is passed with and without CONFIG_PREEMPT enabled.

[PATCH] scsi: fdomain: add missing CONFIG_ to PCMCIA

2016-02-09 Thread Yang Shi
There are some "#ifdef PCMCIA" in the driver code, but all of them missed CONFIG_ prefix. Correct PCMCIA to CONFIG_PCMCIA. Signed-off-by: Yang Shi <yang@linaro.org> --- I happened to find this problem when I was tracking down another problem, however this driver looks ve

[PATCH] arm64: use raw_smp_processor_id in stack backtrace dump

2016-02-09 Thread Yang Shi
[] show_stack+0x24/0x30 [] sched_show_task+0x16c/0x280 [] watchdog+0x560/0x708 [] kthread+0x1b0/0x1d0 [] ret_from_fork+0x10/0x40 Replace it to raw version to prevent from the race condition. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/traps.c | 2 +- 1 file chan

[PATCH] arm64: make irq_stack_ptr more robust

2016-02-11 Thread Yang Shi
Switching between stacks is only valid if we are tracing ourselves while on the irq_stack, so it is only valid when in current and non-preemptible context, otherwise is is just zeroed off. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/stacktrace.c | 13 ++---

[PATCH] ubsan: cosmetic fix to Kconfig text

2016-02-05 Thread Yang Shi
When enabling UBSAN_SANITIZE_ALL, the kernel image size gets increased significantly (~3x). So, it sounds better to have some note in Kconfig. And, fixed a typo. Signed-off-by: Yang Shi <yang@linaro.org> --- lib/Kconfig.ubsan | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[PATCH] arm64: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL

2016-02-05 Thread Yang Shi
To enable UBSAN on arm64, ARCH_HAS_UBSAN_SANITIZE_ALL need to be selected. Basic kernel bootup test is passed on arm64 with CONFIG_UBSAN_SANITIZE_ALL enabled. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH] arm64: replace read_lock to rcu lock in call_step_hook

2016-02-08 Thread Yang Shi
gdbts boot test silent hang issue on 4.4 -rt kernel. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/debug-monitors.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-

  1   2   3   4   5   6   >