RE: [Patch 0/1]drm_irq: Introducing the irq_thread support

2012-09-05 Thread Shi, Yang A
[mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter Sent: Wednesday, September 05, 2012 9:27 PM To: Liu, Chuansheng Cc: 'linux-kernel@vger.kernel.org' (linux-kernel@vger.kernel.org); dri-de...@lists.freedesktop.org; alexander.deuc...@amd.com; airl...@redhat.com; Shi, Yang A Subject: Re

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

2015-11-10 Thread Shi, Yang
. Yang 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> Patch applied

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-10 Thread Shi, Yang
On 11/9/2015 12:00 PM, Z Lim wrote: On Mon, Nov 9, 2015 at 10:08 AM, Shi, Yang <yang@linaro.org> wrote: I added it to stay align with ARMv8 AAPCS to maintain the correct FP during function call. It makes us get correct stack backtrace. I think we'd better to keep compliant with ARMv8

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

2015-11-10 Thread Shi, Yang
On 11/10/2015 4:08 PM, Eric Dumazet wrote: On Tue, 2015-11-10 at 14:41 -0800, Yang Shi wrote: 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) Not really what is

Re: [PATCH] arm64: bpf: fix JIT stack setup

2015-11-09 Thread Shi, Yang
tion call stack | | +-+ low Signed-off-by: Yang Shi <yang@linaro.org> CC: Zi Shen Lim <zlim@gmail.com> CC: Xi Wang <xi.w...@gmail.com> Thanks for tracking it down. That looks like fundamental bug in arm64

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

2015-11-09 Thread Shi, Yang
On 11/9/2015 10:14 AM, Catalin Marinas wrote: On Mon, Nov 09, 2015 at 09:43:55AM -0800, Yang Shi wrote: 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.

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

2015-11-12 Thread Shi, Yang
On 11/11/2015 4:39 AM, Will Deacon wrote: On Wed, Nov 11, 2015 at 12:12:56PM +, Will Deacon wrote: On Tue, Nov 10, 2015 at 06:45:39PM -0800, Z Lim wrote: On Tue, Nov 10, 2015 at 2:41 PM, Yang Shi <yang@linaro.org> wrote: aarch64 doesn't have native store immediate instr

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

2015-11-13 Thread Shi, Yang
On 11/12/2015 7:28 PM, Z Lim wrote: On Thu, Nov 12, 2015 at 1:57 PM, Yang Shi <yang@linaro.org> wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JIT used FP (x29) as eBPF fp regist

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

2015-11-16 Thread Shi, Yang
On 11/13/2015 6:39 PM, Z Lim wrote: Yang, I noticed another thing... On Fri, Nov 13, 2015 at 10:09 AM, Yang Shi <yang@linaro.org> wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct stack backtrace. However, ARM64 JI

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

2015-11-16 Thread Shi, Yang
On 11/16/2015 8:41 PM, Alexei Starovoitov wrote: On Mon, Nov 16, 2015 at 08:37:11PM -0800, Z Lim wrote: On Mon, Nov 16, 2015 at 2:35 PM, Yang Shi <yang@linaro.org> wrote: Save and restore FP/LR in BPF prog prologue and epilogue, save SP to FP in prologue in order to get the correct

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 10/31/2015 11:37 AM, Daniel Borkmann wrote: On 10/31/2015 02:47 PM, Steven Rostedt wrote: On Fri, 30 Oct 2015 17:03:58 -0700 Alexei Starovoitov wrote: On Fri, Oct 30, 2015 at 03:16:26PM -0700, Yang Shi wrote: When running bpf samples on rt kernel, it reports

Re: [PATCH] arm64: bpf: fix JIT stack setup

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

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
On 11/4/2015 10:25 AM, Z Lim wrote: On Wed, Nov 4, 2015 at 10:21 AM, Shi, Yang <yang@linaro.org> wrote: On 11/3/2015 11:04 PM, Xi Wang wrote: On Tue, Nov 3, 2015 at 10:56 PM, Zi Shen Lim <zlim@gmail.com> wrote: case BPF_ALU | BPF_DIV | BPF_X: ca

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
t JIT/interpreter sets A and X to 0."). Reported-by: Shi, Yang <yang@linaro.org> Thanks for coming up with the fix promptly. s/Shi, Yang/Yang Shi Tested with the latest 4.3 kernel. Tested-by: Yang Shi <yang@linaro.org> Yang CC: Xi Wang <xi.w...@gmail.com> CC: Alexei St

Re: [PATCH] arm64: bpf: fix div-by-zero case

2015-11-04 Thread Shi, Yang
On 11/3/2015 11:04 PM, Xi Wang wrote: On Tue, Nov 3, 2015 at 10:56 PM, Zi Shen Lim wrote: case BPF_ALU | BPF_DIV | BPF_X: case BPF_ALU64 | BPF_DIV | BPF_X: + { + const u8 r0 = bpf2a64[BPF_REG_0]; + + /* if (src == 0)

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 11/2/2015 12:59 AM, Thomas Gleixner wrote: On Sun, 1 Nov 2015, Alexei Starovoitov wrote: On Sat, Oct 31, 2015 at 09:47:36AM -0400, Steven Rostedt wrote: On Fri, 30 Oct 2015 17:03:58 -0700 Alexei Starovoitov wrote: On Fri, Oct 30, 2015 at 03:16:26PM -0700,

Re: [PATCH] bpf: convert hashtab lock to raw lock

2015-11-02 Thread Shi, Yang
On 11/2/2015 9:24 AM, Steven Rostedt wrote: On Mon, 02 Nov 2015 09:12:29 -0800 "Shi, Yang" <yang@linaro.org> wrote: Yes, it is common practice for converting sleepable spin lock to raw spin lock in -rt to avoid scheduling in atomic context bug. Note, in a lot of cas

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 8:25 AM, Will Deacon wrote: On Fri, Nov 06, 2015 at 04:21:09PM +, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 12:50:02PM +, Mark Rutland wrote: On Fri, Nov 06, 2015 at 12:30:09PM +, Will Deacon wrote: On Wed, Nov 04, 2015 at 09:37:51AM -0800, Yang Shi wrote:

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 9:35 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:23:38AM -0800, Shi, Yang wrote: On 11/6/2015 8:25 AM, Will Deacon wrote: However, the patch would allow one to disable FRAME_POINTERS (not sure it has any effect on the aarch64 gcc though). No, it doesn't. Actually

Re: [PATCH] arm64: remove redundant FRAME_POINTER kconfig option

2015-11-06 Thread Shi, Yang
On 11/6/2015 9:51 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:39:07AM -0800, Shi, Yang wrote: On 11/6/2015 9:35 AM, Catalin Marinas wrote: On Fri, Nov 06, 2015 at 09:23:38AM -0800, Shi, Yang wrote: On 11/6/2015 8:25 AM, Will Deacon wrote: However, the patch would allow one

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

2015-10-05 Thread Shi, Yang
On 10/1/2015 3:15 PM, Shi, Yang wrote: On 10/1/2015 2:27 PM, Paul E. McKenney wrote: On Thu, Oct 01, 2015 at 01:53:51PM -0700, Shi, Yang wrote: On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi <yang@linaro.org> wrote: BUG: sleeping function

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 1:53 AM, Arnd Bergmann wrote: On Tuesday 17 November 2015 15:38:55 Andrew Morton wrote: On Fri, 13 Nov 2015 10:26:41 -0800 Yang Shi <yang@linaro.org> wrote: When building kernel with gcc 5.2, the below warning is raised: mm/page-writeback.c: In fu

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:11 AM, Tejun Heo wrote: Hello, On Tue, Nov 17, 2015 at 03:38:55PM -0800, Andrew Morton wrote: --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1542,7 +1542,7 @@ static void balance_dirty_pages(struct address_space *mapping, for (;;) { unsigned

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

2015-11-18 Thread Shi, Yang
I won't re-tread that path this time around. I do, however, have some comments on the patch. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/cpuinfo.c | 5 + arch/arm64/kernel/smp.c | 7 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/a

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was structured the way it is. If cgroup writeback is not enabled, any derefs of mdtc variables should trigger warnings. Ugh... I don't know. Compiler

Re: [PATCH] writeback: initialize m_dirty to avoid compile warning

2015-11-18 Thread Shi, Yang
On 11/18/2015 10:55 AM, Andrew Morton wrote: On Wed, 18 Nov 2015 10:39:23 -0800 "Shi, Yang" <yang@linaro.org> wrote: On 11/18/2015 10:33 AM, Tejun Heo wrote: Hello, On Wed, Nov 18, 2015 at 10:27:32AM -0800, Shi, Yang wrote: This was the main reason the code was st

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

2015-10-01 Thread Shi, Yang
On 10/1/2015 8:07 AM, Catalin Marinas wrote: On Wed, Sep 30, 2015 at 03:59:04PM -0700, Yang Shi wrote: 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-monitors.c +++

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

2015-10-01 Thread Shi, Yang
On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi <yang@linaro.org> wrote: BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917 in_atomic(): 0, irqs_disabled(): 128, pid: 342, name: perf 1 lock held by perf/342

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

2015-10-01 Thread Shi, Yang
On 10/1/2015 2:27 PM, Paul E. McKenney wrote: On Thu, Oct 01, 2015 at 01:53:51PM -0700, Shi, Yang wrote: On 10/1/2015 10:08 AM, Steven Rostedt wrote: On Thu, 1 Oct 2015 09:37:37 -0700 Yang Shi <yang@linaro.org> wrote: BUG: sleeping function called from invalid context at kernel/l

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

2015-10-02 Thread Shi, Yang
On 10/2/2015 12:10 PM, Arnaldo Carvalho de Melo wrote: Em Fri, Oct 02, 2015 at 04:08:38PM -0300, Arnaldo Carvalho de Melo escreveu: Em Tue, Sep 29, 2015 at 02:49:43PM -0700, Yang Shi escreveu: When run "perf record -e", the number of samples showed up is wrong on some 32 bit systems, i.e.

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

2015-12-08 Thread Shi, Yang
On 12/8/2015 12:25 PM, Steven Rostedt wrote: On Tue, 8 Dec 2015 11:39:50 -0800 Yang Shi <yang@linaro.org> wrote: 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@l

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

2015-12-01 Thread Shi, Yang
On 11/30/2015 2:24 PM, Yang Shi wrote: 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@

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

2015-12-01 Thread Shi, Yang
On 12/1/2015 3:56 PM, Steven Rostedt wrote: On Tue, 1 Dec 2015 15:06:11 -0800 Yang Shi <yang@linaro.org> wrote: 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

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

2015-12-01 Thread Shi, Yang
On 12/1/2015 4:18 PM, Steven Rostedt wrote: On Tue, 01 Dec 2015 16:07:44 -0800 "Shi, Yang" <yang@linaro.org> wrote: On 12/1/2015 3:56 PM, Steven Rostedt wrote: On Tue, 1 Dec 2015 15:06:11 -0800 Yang Shi <yang@linaro.org> wrote: page-faults ev

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

2015-12-02 Thread Shi, Yang
On 12/2/2015 4:11 PM, Shi, Yang wrote: On 12/2/2015 3:36 PM, Dave Hansen wrote: On 12/02/2015 02:53 PM, Yang Shi wrote: diff --git a/mm/gup.c b/mm/gup.c index deafa2c..10245a4 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -13,6 +13,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include

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

2015-12-03 Thread Shi, Yang
On 12/3/2015 11:06 AM, Steven Rostedt wrote: On Thu, 03 Dec 2015 10:36:18 -0800 "Shi, Yang" <yang@linaro.org> wrote: called directly that calls these functions internally and the tracepoint can trap the return value. This will incur more changes in other subsystems (futex

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

2015-12-03 Thread Shi, Yang
ack to slow path. Two different but related things in one patch is often a bad thing. It would have been better to split it up. Signed-off-by: Yang Shi <yang@linaro.org> --- Just found slow_irqon label is not defined, added it to avoid compile error. arch/sparc/mm/gup.c | 7 ++-

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

2015-12-02 Thread Shi, Yang
On 12/2/2015 3:36 PM, Dave Hansen wrote: On 12/02/2015 02:53 PM, Yang Shi wrote: diff --git a/mm/gup.c b/mm/gup.c index deafa2c..10245a4 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -13,6 +13,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + #include #include This needs

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

2015-12-03 Thread Shi, Yang
On 12/2/2015 8:13 PM, Steven Rostedt wrote: On Wed, 2 Dec 2015 15:36:50 -0800 Dave Hansen wrote: On 12/02/2015 02:53 PM, Yang Shi wrote: diff --git a/mm/gup.c b/mm/gup.c index deafa2c..10245a4 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -13,6 +13,9 @@ #include

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

2015-12-03 Thread Shi, Yang
On 12/2/2015 8:07 PM, Steven Rostedt wrote: On Wed, 2 Dec 2015 14:53:27 -0800 Yang Shi <yang@linaro.org> wrote: 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

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

2015-12-09 Thread Shi, Yang
On 12/9/2015 1:07 PM, Steven Rostedt wrote: On Wed, 9 Dec 2015 09:29:20 -0800 Yang Shi <yang@linaro.org> wrote: Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@redhat.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel

Re: [PATCH] arm64: reenable interrupt when handling ptrace breakpoint

2015-12-16 Thread Shi, Yang
. However, it just happens at brk_handler in my test. But, I saw single_step has the same code path, so I expanded it to single step too. Since this is rt related, cc to rt mailing list too. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/debug-monitors.c | 10

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

2015-12-11 Thread Shi, Yang
On 12/11/2015 10:05 AM, Sebastian Andrzej Siewior wrote: * Yang Shi | 2015-12-10 10:58:51 [-0800]: When running some ptrace single step tests on x86-32 machine, the below problem is triggered: BUG: sleeping function called from invalid context at linux-rt/kernel/locking/rtmutex.c:917

Re: [PATCH] arm64: add HAVE_LATENCYTOP_SUPPORT config

2015-12-14 Thread Shi, Yang
Hi folks, I tried to enable latencytop for arm64 and came across this discussion, so any plan about when this will get merged into mainline? 4.5 merge window? Thanks, Yang On 11/10/2015 3:34 AM, Heiko Carstens wrote: From: Will Deacon Date: Tue, 10 Nov 2015 11:10:04

Re: [PATCH] ppc64: select HAVE_CONTEXT_TRACKING by default

2016-01-04 Thread Shi, Yang
it in PPC64 generic Kconfig. NO_HZ_FULL depends on it, with this change NO_HZ_FULL could be enabled for all 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

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

2015-12-22 Thread Shi, Yang
On 12/22/2015 4:06 AM, Sebastian Andrzej Siewior wrote: * Yang Shi | 2015-12-14 15:06:44 [-0800]: Mainline kernel commit 959274753857efe9c5f1ba35fe727f51e9aa128d ("x86, traps: Track entry into and exit from IST context"), introduced ist_enter which disables preemption uncondiontionally for

Re: [PATCH] arm64: reenable interrupt when handling ptrace breakpoint

2015-12-21 Thread Shi, Yang
On 12/21/2015 9:00 AM, Will Deacon wrote: On Mon, Dec 21, 2015 at 05:51:22PM +0100, Thomas Gleixner wrote: On Mon, 21 Dec 2015, Will Deacon wrote: +static void send_user_sigtrap(int si_code) +{ + struct pt_regs *regs = current_pt_regs(); + siginfo_t info = { +

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

2015-11-25 Thread Shi, Yang
On 11/25/2015 7:16 AM, Nicolas Pitre wrote: On Wed, 25 Nov 2015, Jon Masters wrote: On 11/18/15, 1:15 PM, Yang Shi wrote: As what Pavel Machek reported [1], some userspace applications depend on bogomips showed by /proc/cpuinfo. Although there is much less legacy impact on aarch64 than arm,

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

2015-11-23 Thread Shi, Yang
: On Thu, Nov 12, 2015 at 11:33 AM, Shi, Yang <yang@linaro.org> wrote: On 11/11/2015 4:39 AM, Will Deacon wrote: Wait a second, we're both talking rubbish here :) The STR (immediate) form is referring to the addressing mode, whereas this patch wants to store an immediate value to memory,

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

2015-11-25 Thread Shi, Yang
On 11/25/2015 4:26 PM, kbuild test robot wrote: Hi Yang, [auto build test ERROR on v4.4-rc2] [also build test ERROR on next-20151124] url: https://github.com/0day-ci/linux/commits/Yang-Shi/sparc64-gup-check-address-scope-legitimacy/20151126-065342 config: sparc64-allnoconfig (attached as

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

2015-11-19 Thread Shi, Yang
com> Cc: <sta...@vger.kernel.org> #3.12+ Signed-off-by: Yang Shi <yang@linaro.org> Patch applied as a fix for stable, basically returning back to the pre-3.12 behaviour. If there is a need for some more useful information here, it can be done as an additional patch, though without cc: sta

Re: [PATCH] arm64: bpf: fix buffer pointer

2015-11-18 Thread Shi, Yang
On 11/18/2015 1:41 PM, Z Lim wrote: On Wed, Nov 18, 2015 at 1:07 PM, Shi, Yang <yang@linaro.org> wrote: On 11/18/2015 12:56 AM, Zi Shen Lim wrote: emit_a64_mov_i64(r3, size, ctx); - emit(A64_ADD_I(1, r4, fp, MAX_BPF_STACK), ctx); +

Re: [PATCH] arm64: bpf: fix buffer pointer

2015-11-18 Thread Shi, Yang
On 11/18/2015 12:56 AM, Zi Shen Lim wrote: During code review, I noticed we were passing a bad buffer pointer to bpf_load_pointer helper function called by jitted code. Point to the buffer allocated by JIT, so we don't silently corrupt other parts of the stack. Signed-off-by: Zi Shen Lim

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-02 Thread Shi, Yang
On 6/1/2016 10:00 PM, Minchan Kim wrote: On Wed, Jun 01, 2016 at 01:40:48PM -0700, Shi, Yang wrote: On 5/29/2016 11:11 PM, Minchan Kim wrote: On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: If we goes this way, how to guarantee this race? Thanks for pointing out

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

2016-06-06 Thread Shi, Yang
uch instrument to ARM64 too. Define __copy_to/from_user in C in order to add kasan_check_read/write call, rename 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

Re: [PATCH] mm: use early_pfn_to_nid in register_page_bootmem_info_node

2016-05-25 Thread Shi, Yang
On 5/25/2016 3:23 PM, Andrew Morton wrote: On Wed, 25 May 2016 14:00:07 -0700 Yang Shi <yang@linaro.org> wrote: register_page_bootmem_info_node() is invoked in mem_init(), so it will be called before page_alloc_init_late() if CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled. But, pfn_

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

2016-05-27 Thread Shi, Yang
ARM64 too. Tested by test_kasan module. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/include/asm/uaccess.h | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) Please, cover __copy_from_user() and __copy_to_user() too. Unlike x86, your patch doesn't inst

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

2016-05-27 Thread Shi, Yang
On 5/27/2016 10:46 AM, Mark Rutland wrote: On Fri, May 27, 2016 at 09:34:03AM -0700, Shi, Yang wrote: On 5/27/2016 4:02 AM, Andrey Ryabinin wrote: On 05/26/2016 09:43 PM, Yang Shi wrote: The upstream commit 1771c6e1a567ea0ba20a4ffe68a1419fd8ef ("x86/kasan: instrument user memory a

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Shi, Yang
On 5/27/2016 1:11 AM, Minchan Kim wrote: On Fri, May 27, 2016 at 03:08:39PM +0900, Joonsoo Kim wrote: On Fri, May 27, 2016 at 02:14:32PM +0900, Minchan Kim wrote: On Thu, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: On 5/25/2016 5:37 PM, Minchan Kim wrote: On Tue, May 24, 2016 at 11:58

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-27 Thread Shi, Yang
On 5/27/2016 1:02 PM, Andrew Morton wrote: On Thu, 26 May 2016 16:15:28 -0700 "Shi, Yang" <yang@linaro.org> wrote: I hope we consider this direction, too. Yang, Could you think about this? Thanks a lot for the suggestion. Sorry for the late reply, I was busy on prepari

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-05-26 Thread Shi, Yang
NULL in some cases, although it is unlikely, i.e. memory hotplug. Tested with ltp with "page_owner=0". [1] http://lkml.kernel.org/r/20160519002809.GA10245@js1304-P5Q-DELUXE Signed-off-by: Yang Shi <yang@linaro.org> I didn't read code code in detail to see how page_ext memory

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Shi, Yang
On 5/29/2016 11:11 PM, Minchan Kim wrote: On Fri, May 27, 2016 at 11:16:41AM -0700, Shi, Yang wrote: If we goes this way, how to guarantee this race? Thanks for pointing out this. It sounds reasonable. However, this should be only possible to happen on 32 bit since just 32 bit version

Re: [PATCH] mm: check the return value of lookup_page_ext for all call sites

2016-06-01 Thread Shi, Yang
, May 26, 2016 at 04:15:28PM -0700, Shi, Yang wrote: On 5/25/2016 5:37 PM, Minchan Kim wrote: On Tue, May 24, 2016 at 11:58:11AM +0900, Minchan Kim wrote: On Mon, May 23, 2016 at 10:16:08AM -0700, Yang Shi wrote: Per the discussion with Joonsoo Kim [1], we need check the return value

Re: [PATCH] arm64: use raw_smp_processor_id in stack backtrace dump

2016-02-10 Thread Shi, Yang
On 2/10/2016 4:10 AM, Will Deacon wrote: On Wed, Feb 10, 2016 at 11:52:31AM +, James Morse wrote: On 10/02/16 10:29, Will Deacon wrote: On Tue, Feb 09, 2016 at 01:26:22PM -0800, Yang Shi wrote: dump_backtrace may be called in kthread context, which is not bound to a single cpu, i.e.

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

2016-02-08 Thread Shi, Yang
On 2/8/2016 12:51 AM, Andrey Ryabinin wrote: On 02/06/2016 02:04 AM, Yang Shi wrote: #include #include @@ -64,7 +65,9 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame) return -EINVAL; frame->sp = fp + 0x10; +

Re: [PATCH] arm64: ubsan: select ARCH_HAS_UBSAN_SANITIZE_ALL

2016-02-08 Thread Shi, Yang
On 2/8/2016 3:46 AM, Mark Rutland wrote: Hi, On Fri, Feb 05, 2016 at 03:50:18PM -0800, Yang Shi wrote: 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 <y

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

2016-02-09 Thread Shi, Yang
On 2/9/2016 8:54 AM, Will Deacon wrote: On Mon, Feb 08, 2016 at 09:13:09AM -0800, Yang Shi wrote: When boot arm64 kernel with KASAN enabled, the below error is reported by kasan: BUG: KASAN: out-of-bounds in unwind_frame+0xec/0x260 at addr ffc064d57ba0 Read of size 8 by task pidof/499

Re: [PATCH] PCI: layerscape: add ls2085a compatible

2016-02-04 Thread Shi, Yang
On 2/4/2016 2:37 PM, Bjorn Helgaas wrote: On Wed, Jan 27, 2016 at 10:05:40AM -0800, Shi, Yang wrote: Correct FSL folks email address to nxp.com, sorry for the inconvenience. Do we need some MAINTAINERS updates in addition to the ack for this patch? I see a bunch of @freescale.com addresses

Re: [PATCH] arm64: reenable interrupt when handling ptrace breakpoint

2016-02-05 Thread Shi, Yang
On 1/13/2016 10:10 AM, Shi, Yang wrote: On 1/13/2016 9:23 AM, Will Deacon wrote: On Wed, Jan 13, 2016 at 09:17:46AM -0800, Shi, Yang wrote: On 1/13/2016 2:26 AM, Will Deacon wrote: On Tue, Jan 12, 2016 at 11:59:54AM -0800, Shi, Yang wrote: This might be buried in email storm during

Re: [PATCH] PCI: layerscape: add ls2085a compatible

2016-02-05 Thread Shi, Yang
ls2085a compatible is included by the dts. Signed-off-by: Yang Shi <yang@linaro.org> --- drivers/pci/host/pci-layerscape.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index 3923bed..c40d8b2 100644 --- a/drive

Re: [PATCH] arm64: make irq_stack_ptr more robust

2016-02-12 Thread Shi, Yang
with CONFIG_DEBUG_PREEMPT: Fixes: 132cd887b5c5 ("arm64: Modify stack trace and dump for use with irq_stack") Wii add in v2. Signed-off-by: Yang Shi <yang@linaro.org> --- arch/arm64/kernel/stacktrace.c | 13 ++--- arch/arm64/kernel/traps.c | 11 +

Re: [PATCH] arm64: make irq_stack_ptr more robust

2016-02-12 Thread Shi, Yang
On 2/12/2016 9:38 AM, Shi, Yang wrote: On 2/12/2016 5:47 AM, James Morse wrote: Hi! On 11/02/16 21:53, Yang Shi wrote: 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

Re: [PATCH] arm64: make irq_stack_ptr more robust

2016-02-12 Thread Shi, Yang
On 2/12/2016 9:41 AM, Will Deacon wrote: On Fri, Feb 12, 2016 at 09:38:51AM -0800, Shi, Yang wrote: On 2/12/2016 5:47 AM, James Morse wrote: On 11/02/16 21:53, Yang Shi wrote: Switching between stacks is only valid if we are tracing ourselves while on the irq_stack, so it is only valid when

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

2016-02-12 Thread Shi, Yang
0 00 00 00 00 ffc0689ebb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 The stacker tracer traverses the whole kernel stack when saving the max stack trace. It may touch the stack red zones to cause the warning. So, just disable the instrumentation to silence the warning. Signed-off-by: Y

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

2016-02-12 Thread Shi, Yang
On 2/12/2016 11:35 AM, Steven Rostedt wrote: On Mon, 8 Feb 2016 10:39:42 -0800 Yang Shi <yang@linaro.org> wrote: 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/t

Very low responsiveness for pstore ftrace

2016-02-09 Thread Shi, Yang
Hi folks, I'm newbie to pstore. I just did a quick try for pstore ftrace. But, I experience very serious responsiveness problem. When running "echo 1 > /sys/kernel/debug/pstore/record_ftrace", it took a couple of minutes to return (here return means to get prompt back) on my arm64 machine (8

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

2016-02-09 Thread Shi, Yang
On 2/9/2016 3:25 PM, One Thousand Gnomes wrote: On Tue, 9 Feb 2016 14:16:49 -0800 Yang Shi <yang@linaro.org> wrote: 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 <

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

2016-02-09 Thread Shi, Yang
On 2/9/2016 9:23 AM, Will Deacon wrote: On Tue, Feb 09, 2016 at 09:17:12AM -0800, Shi, Yang wrote: On 2/9/2016 8:54 AM, Will Deacon wrote: On Mon, Feb 08, 2016 at 09:13:09AM -0800, Yang Shi wrote: When boot arm64 kernel with KASAN enabled, the below error is reported by kasan: BUG: KASAN

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

2016-02-09 Thread Shi, Yang
On 2/9/2016 9:31 AM, Shi, Yang wrote: On 2/9/2016 9:23 AM, Will Deacon wrote: On Tue, Feb 09, 2016 at 09:17:12AM -0800, Shi, Yang wrote: On 2/9/2016 8:54 AM, Will Deacon wrote: On Mon, Feb 08, 2016 at 09:13:09AM -0800, Yang Shi wrote: When boot arm64 kernel with KASAN enabled, the below

Re: [RFC V5] Add gup trace points support

2016-02-08 Thread Shi, Yang
. -- Steve On Wed, 13 Jan 2016 10:14:24 -0800 "Shi, Yang" <yang@linaro.org> wrote: On 1/12/2016 12:10 PM, Steven Rostedt wrote: On Tue, 12 Jan 2016 12:00:54 -0800 "Shi, Yang" <yang@linaro.org> wrote: Hi Steven, Any more comments on this series? How should I

Re: [PATCH] PCI: layerscape: add ls2085a compatible

2016-01-27 Thread Shi, Yang
though ls2085a compatible is included by the dts. Signed-off-by: Yang Shi <yang@linaro.org> --- drivers/pci/host/pci-layerscape.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index 3923bed..c40d8b2

Re: [RFC PATCH] kernfs: create raw version kernfs_path_len and kernfs_path

2016-02-26 Thread Shi, Yang
On 2/26/2016 12:15 PM, Steven Rostedt wrote: On Fri, 26 Feb 2016 11:59:40 -0800 "Shi, Yang" <yang@linaro.org> wrote: BTW, it sounds this is not the only point where kernfs_node could be updated, __kernfs_remove should need synchronize_sched too. Question is, can the ke

Re: [RFC PATCH] kernfs: create raw version kernfs_path_len and kernfs_path

2016-02-26 Thread Shi, Yang
On 2/26/2016 11:37 AM, Shi, Yang wrote: On 2/26/2016 10:56 AM, Steven Rostedt wrote: On Fri, 26 Feb 2016 10:15:05 -0800 Yang Shi <yang@linaro.org> wrote: commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback tracepoints to report cgroup") made write

Re: [RFC PATCH] kernfs: create raw version kernfs_path_len and kernfs_path

2016-02-26 Thread Shi, Yang
On 2/26/2016 11:59 AM, Shi, Yang wrote: On 2/26/2016 11:37 AM, Shi, Yang wrote: On 2/26/2016 10:56 AM, Steven Rostedt wrote: On Fri, 26 Feb 2016 10:15:05 -0800 Yang Shi <yang@linaro.org> wrote: commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback

Re: [PATCH] writeback: call writeback tracepoints withoud holding list_lock in wb_writeback()

2016-02-25 Thread Shi, Yang
On 2/24/2016 6:40 PM, Steven Rostedt wrote: On Wed, 24 Feb 2016 14:47:23 -0800 Yang Shi <yang@linaro.org> wrote: commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback tracepoints to report cgroup") made writeback tracepoints report cgroup write

Re: [PATCH] writeback: call writeback tracepoints withoud holding list_lock in wb_writeback()

2016-02-25 Thread Shi, Yang
On 2/25/2016 3:31 PM, Steven Rostedt wrote: On Thu, 25 Feb 2016 15:16:54 -0800 "Shi, Yang" <yang@linaro.org> wrote: Actually, regardless whether this is the right fix for the splat, it makes me be wondering if the spin lock which protects the whole for loop is really nece

Re: [PATCH] writeback: call writeback tracepoints withoud holding list_lock in wb_writeback()

2016-02-25 Thread Shi, Yang
On 2/25/2016 3:47 PM, Shi, Yang wrote: On 2/25/2016 3:31 PM, Steven Rostedt wrote: On Thu, 25 Feb 2016 15:16:54 -0800 "Shi, Yang" <yang@linaro.org> wrote: Actually, regardless whether this is the right fix for the splat, it makes me be wondering if the spin lock which pr

Re: [PATCH] writeback: call writeback tracepoints withoud holding list_lock in wb_writeback()

2016-02-25 Thread Shi, Yang
On 2/25/2016 11:54 AM, Steven Rostedt wrote: On Thu, 25 Feb 2016 11:38:48 -0800 "Shi, Yang" <yang@linaro.org> wrote: On 2/24/2016 6:40 PM, Steven Rostedt wrote: On Wed, 24 Feb 2016 14:47:23 -0800 Yang Shi <yang@linaro.org> wrote: commit 5634cc2aa9aebc77bc

Re: [RFC PATCH] writeback: move list_lock down into the for loop

2016-02-29 Thread Shi, Yang
k may reach a little better performance, i.e. more likely for preempt, lower latency. Thanks, Yang Signed-off-by: Yang Shi <yang@linaro.org> --- Tested with ltp on 8 cores Cortex-A57 machine. fs/fs-writeback.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff -

Re: [RFC V2 PATCH] kernfs: create raw version kernfs_path_len and kernfs_path

2016-02-29 Thread Shi, Yang
On 2/27/2016 3:51 AM, Tejun Heo wrote: Hello, On Sat, Feb 27, 2016 at 6:45 AM, Thomas Gleixner wrote: It can be, but we can print out the ino and userland can match that up with path if necessary. Wouldn't be cgroup id the better choice? AFAIK we aren't exposing cgroup

Re: [RFC V2 PATCH] kernfs: create raw version kernfs_path_len and kernfs_path

2016-02-26 Thread Shi, Yang
hich don't acquire lock and are used by tracepoints only. Signed-off-by: Yang Shi <yang@linaro.org> --- It should be applicable to both mainline and -rt kernel. The change survives ftrace stress test in ltp. v2: * Adopted Steven's suggestion to call synchronize_sched in kernfs_rename_

Re: [RFC PATCH] kernfs: create raw version kernfs_path_len and kernfs_path

2016-02-26 Thread Shi, Yang
On 2/26/2016 10:56 AM, Steven Rostedt wrote: On Fri, 26 Feb 2016 10:15:05 -0800 Yang Shi <yang@linaro.org> wrote: commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback tracepoints to report cgroup") made writeback tracepoints report cgroup write

Re: [PATCH] arm64: remove redundant preempt.h

2016-02-19 Thread Shi, Yang
Hi Will & Catalin, Any comment on this one? Thanks, Yang On 2/12/2016 9:56 AM, Yang Shi wrote: 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

Re: [PATCH] arm64: reenable interrupt when handling ptrace breakpoint

2016-02-11 Thread Shi, Yang
On 2/11/2016 5:54 AM, Will Deacon wrote: On Fri, Feb 05, 2016 at 01:25:47PM -0800, Shi, Yang wrote: On 1/13/2016 10:10 AM, Shi, Yang wrote: On 1/13/2016 9:23 AM, Will Deacon wrote: On Wed, Jan 13, 2016 at 09:17:46AM -0800, Shi, Yang wrote: On 1/13/2016 2:26 AM, Will Deacon wrote: On Tue

Re: [PATCH] arm64: use raw_smp_processor_id in stack backtrace dump

2016-02-11 Thread Shi, Yang
On 2/11/2016 2:41 AM, James Morse wrote: Hi! On 10/02/16 18:12, Shi, Yang wrote: On 2/10/2016 4:10 AM, Will Deacon wrote: On Wed, Feb 10, 2016 at 11:52:31AM +, James Morse wrote: On 10/02/16 10:29, Will Deacon wrote: On Tue, Feb 09, 2016 at 01:26:22PM -0800, Yang Shi wrote

Re: [RFC V4 PATCH] trace: writeback: replace cgroup path to cgroup ino

2016-03-06 Thread Shi, Yang
Hi Steven, Any comment on this one? I'm supposed it will be taken by your tracing tree? Thanks, Yang On 3/4/2016 4:52 AM, Tejun Heo wrote: On Thu, Mar 03, 2016 at 01:08:57AM -0800, Yang Shi wrote: commit 5634cc2aa9aebc77bc862992e7805469dcf83dac ("writeback: update writeback tracepoints to

Re: [linux-next PATCH] sched: cgroup: enable interrupt before calling threadgroup_change_begin

2016-04-25 Thread Shi, Yang
On 4/25/2016 10:35 AM, Shi, Yang wrote: On 4/23/2016 2:14 AM, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 08:56:28PM -0700, Yang Shi wrote: When kernel oops happens in some kernel thread, i.e. kcompactd in the test, the below bug might be triggered by the oops handler: What are you trying

Re: [linux-next PATCH] sched: cgroup: enable interrupt before calling threadgroup_change_begin

2016-04-25 Thread Shi, Yang
On 4/23/2016 2:14 AM, Peter Zijlstra wrote: On Fri, Apr 22, 2016 at 08:56:28PM -0700, Yang Shi wrote: When kernel oops happens in some kernel thread, i.e. kcompactd in the test, the below bug might be triggered by the oops handler: What are you trying to fix? You already oopsed the thing is

Warning triggered by lockdep checks for sock_owned_by_user on linux-next-20160420

2016-04-22 Thread Shi, Yang
Hi David, When I ran some test on a nfs mounted rootfs, I got the below warning with LOCKDEP enabled on linux-next-20160420: WARNING: CPU: 9 PID: 0 at include/net/sock.h:1408 udp_queue_rcv_skb+0x3d0/0x660 Modules linked in: CPU: 9 PID: 0 Comm: swapper/9 Tainted: G D

Re: Warning triggered by lockdep checks for sock_owned_by_user on linux-next-20160420

2016-04-25 Thread Shi, Yang
On 4/22/2016 9:50 PM, Eric Dumazet wrote: On Fri, 2016-04-22 at 21:02 -0700, Shi, Yang wrote: Hi David, When I ran some test on a nfs mounted rootfs, I got the below warning with LOCKDEP enabled on linux-next-20160420: WARNING: CPU: 9 PID: 0 at include/net/sock.h:1408 udp_queue_rcv_skb+0x3d0

  1   2   3   >