lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 9 Sep 2016 19:43:36 +0800
From:   Chunyan Zhang <zhang.chunyan@...aro.org>
To:     Will Deacon <will.deacon@....com>
Cc:     Steven Rostedt <rostedt@...dmis.org>, mingo@...hat.com,
        Mark Yang <mark.yang@...eadtrum.com>,
        Lyra Zhang <zhang.lyra@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        Takahiro Akashi <takahiro.akashi@...aro.org>,
        Catalin Marinas <catalin.marinas@....com>
Subject: Re: [PATCH] arm64: use preempt_disable_notrace in _percpu_read/write

On 9 September 2016 at 18:07, Will Deacon <will.deacon@....com> wrote:
> On Thu, Sep 08, 2016 at 08:46:42PM +0800, Chunyan Zhang wrote:
>> When debug preempt or preempt tracer is enabled, preempt_count_add/sub()
>> can be traced by function and function graph tracing, and
>> preempt_disable/enable() would call preempt_count_add/sub(), so in Ftrace
>> subsystem we should use preempt_disable/enable_notrace instead.
>>
>> In the commit 345ddcc882d8 ("ftrace: Have set_ftrace_pid use the bitmap
>> like events do") the function this_cpu_read() was added to
>> trace_graph_entry(), and if this_cpu_read() calls preempt_disable(), graph
>> tracer will go into a recursive loop, even if the tracing_on is
>> disabled.
>>
>> So this patch change to use preempt_enable/disable_notrace instead in
>> this_cpu_read().
>>
>> Since Yonghui Yang helped a lot to find the root cause of this problem,
>> so also add his SOB.
>>
>> Signed-off-by: Yonghui Yang <mark.yang@...eadtrum.com>
>> Signed-off-by: Chunyan Zhang <zhang.chunyan@...aro.org>
>> ---
>>  arch/arm64/include/asm/percpu.h | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> Looks good to me:
>
> Acked-by: Will Deacon <will.deacon@....com>
>
> However, don't you need to make a similar change to asm-generic/percpu.h
> for other architectures (e.g. arch/arm/)?

Yes, I will send out another patch to fix that.

Thanks,
Chunyan

>
> Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ