Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1329397 > unrolled thread

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

Started byYang Shi <yang.shi@linaro.org>
First post2016-02-08 18:40 +0100
Last post2016-02-09 18:40 +0100
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame Yang Shi <yang.shi@linaro.org> - 2016-02-08 18:40 +0100
    Re: [PATCH v2] arm64: disable kasan when accessing frame->fp in  unwind_frame Will Deacon <will.deacon@arm.com> - 2016-02-09 14:30 +0100
    Re: [PATCH v2] arm64: disable kasan when accessing frame->fp in  unwind_frame Andrey Ryabinin <aryabinin@virtuozzo.com> - 2016-02-09 14:50 +0100
    Re: [PATCH v2] arm64: disable kasan when accessing frame->fp in  unwind_frame Will Deacon <will.deacon@arm.com> - 2016-02-09 18:00 +0100
      Re: [PATCH v2] arm64: disable kasan when accessing frame->fp in  unwind_frame "Shi, Yang" <yang.shi@linaro.org> - 2016-02-09 18:20 +0100
        Re: [PATCH v2] arm64: disable kasan when accessing frame->fp in  unwind_frame Will Deacon <will.deacon@arm.com> - 2016-02-09 18:30 +0100
          Re: [PATCH v2] arm64: disable kasan when accessing frame->fp in  unwind_frame "Shi, Yang" <yang.shi@linaro.org> - 2016-02-09 18:40 +0100

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

FromYang Shi <yang.shi@linaro.org>
Date2016-02-08 18:40 +0100
Subject[PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame
Message-ID<qZXX4-8qz-25@gated-at.bofh.it>
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 ffffffc064d57ba0
Read of size 8 by task pidof/499
page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x0()
page dumped because: kasan: bad access detected
CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
Hardware name: Freescale Layerscape 2085a RDB Board (DT)
Call trace:
[<ffffffc00008d078>] dump_backtrace+0x0/0x290
[<ffffffc00008d32c>] show_stack+0x24/0x30
[<ffffffc0006a981c>] dump_stack+0x8c/0xd8
[<ffffffc0002e4400>] kasan_report_error+0x558/0x588
[<ffffffc0002e4958>] kasan_report+0x60/0x70
[<ffffffc0002e3188>] __asan_load8+0x60/0x78
[<ffffffc00008c92c>] unwind_frame+0xec/0x260
[<ffffffc000087e60>] get_wchan+0x110/0x160
[<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
[<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
[<ffffffc0003ac840>] proc_single_show+0x88/0xd8
[<ffffffc000345be8>] seq_read+0x370/0x770
[<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
[<ffffffc00030c0ec>] vfs_read+0x94/0x168
[<ffffffc00030d458>] SyS_read+0xb8/0x128
[<ffffffc000086530>] el0_svc_naked+0x24/0x28
Memory state around the buggy address:
 ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
 ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                  ^
 ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffc064d57c80: 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.shi@linaro.org>
---
v1 --> v2:
 * Replace kasan_disable{enable}_current to READ_ONCE_NOCHECK.
 * Cover the following statement too.

 arch/arm64/kernel/stacktrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
index 4fad978..12a18cb 100644
--- a/arch/arm64/kernel/stacktrace.c
+++ b/arch/arm64/kernel/stacktrace.c
@@ -64,8 +64,8 @@ int notrace unwind_frame(struct task_struct *tsk, struct stackframe *frame)
 		return -EINVAL;
 
 	frame->sp = fp + 0x10;
-	frame->fp = *(unsigned long *)(fp);
-	frame->pc = *(unsigned long *)(fp + 8);
+	frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp));
+	frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 8));
 
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
 	if (tsk && tsk->ret_stack &&
-- 
2.0.2

[toc] | [next] | [standalone]


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

FromWill Deacon <will.deacon@arm.com>
Date2016-02-09 14:30 +0100
SubjectRe: [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame
Message-ID<r0gwG-4Ai-17@gated-at.bofh.it>
In reply to#1329397
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 ffffffc064d57ba0
> Read of size 8 by task pidof/499
> page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
> flags: 0x0()
> page dumped because: kasan: bad access detected
> CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
> Hardware name: Freescale Layerscape 2085a RDB Board (DT)
> Call trace:
> [<ffffffc00008d078>] dump_backtrace+0x0/0x290
> [<ffffffc00008d32c>] show_stack+0x24/0x30
> [<ffffffc0006a981c>] dump_stack+0x8c/0xd8
> [<ffffffc0002e4400>] kasan_report_error+0x558/0x588
> [<ffffffc0002e4958>] kasan_report+0x60/0x70
> [<ffffffc0002e3188>] __asan_load8+0x60/0x78
> [<ffffffc00008c92c>] unwind_frame+0xec/0x260
> [<ffffffc000087e60>] get_wchan+0x110/0x160
> [<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
> [<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
> [<ffffffc0003ac840>] proc_single_show+0x88/0xd8
> [<ffffffc000345be8>] seq_read+0x370/0x770
> [<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
> [<ffffffc00030c0ec>] vfs_read+0x94/0x168
> [<ffffffc00030d458>] SyS_read+0xb8/0x128
> [<ffffffc000086530>] el0_svc_naked+0x24/0x28
> Memory state around the buggy address:
>  ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
>  ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>                                   ^
>  ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  ffffffc064d57c80: 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.shi@linaro.org>

Acked-by: Will Deacon <will.deacon@arm.com>

Will

[toc] | [prev] | [next] | [standalone]


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

FromAndrey Ryabinin <aryabinin@virtuozzo.com>
Date2016-02-09 14:50 +0100
SubjectRe: [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame
Message-ID<r0gQ2-4IO-19@gated-at.bofh.it>
In reply to#1329397
On 02/08/2016 08:13 PM, 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 ffffffc064d57ba0
> Read of size 8 by task pidof/499
> page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
> flags: 0x0()
> page dumped because: kasan: bad access detected
> CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
> Hardware name: Freescale Layerscape 2085a RDB Board (DT)
> Call trace:
> [<ffffffc00008d078>] dump_backtrace+0x0/0x290
> [<ffffffc00008d32c>] show_stack+0x24/0x30
> [<ffffffc0006a981c>] dump_stack+0x8c/0xd8
> [<ffffffc0002e4400>] kasan_report_error+0x558/0x588
> [<ffffffc0002e4958>] kasan_report+0x60/0x70
> [<ffffffc0002e3188>] __asan_load8+0x60/0x78
> [<ffffffc00008c92c>] unwind_frame+0xec/0x260
> [<ffffffc000087e60>] get_wchan+0x110/0x160
> [<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
> [<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
> [<ffffffc0003ac840>] proc_single_show+0x88/0xd8
> [<ffffffc000345be8>] seq_read+0x370/0x770
> [<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
> [<ffffffc00030c0ec>] vfs_read+0x94/0x168
> [<ffffffc00030d458>] SyS_read+0xb8/0x128
> [<ffffffc000086530>] el0_svc_naked+0x24/0x28
> Memory state around the buggy address:
>  ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
>  ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>                                   ^
>  ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  ffffffc064d57c80: 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.shi@linaro.org>

Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>

[toc] | [prev] | [next] | [standalone]


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

FromWill Deacon <will.deacon@arm.com>
Date2016-02-09 18:00 +0100
SubjectRe: [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame
Message-ID<r0jNT-6Mt-1@gated-at.bofh.it>
In reply to#1329397
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 ffffffc064d57ba0
> Read of size 8 by task pidof/499
> page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
> flags: 0x0()
> page dumped because: kasan: bad access detected
> CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
> Hardware name: Freescale Layerscape 2085a RDB Board (DT)
> Call trace:
> [<ffffffc00008d078>] dump_backtrace+0x0/0x290
> [<ffffffc00008d32c>] show_stack+0x24/0x30
> [<ffffffc0006a981c>] dump_stack+0x8c/0xd8
> [<ffffffc0002e4400>] kasan_report_error+0x558/0x588
> [<ffffffc0002e4958>] kasan_report+0x60/0x70
> [<ffffffc0002e3188>] __asan_load8+0x60/0x78
> [<ffffffc00008c92c>] unwind_frame+0xec/0x260
> [<ffffffc000087e60>] get_wchan+0x110/0x160
> [<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
> [<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
> [<ffffffc0003ac840>] proc_single_show+0x88/0xd8
> [<ffffffc000345be8>] seq_read+0x370/0x770
> [<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
> [<ffffffc00030c0ec>] vfs_read+0x94/0x168
> [<ffffffc00030d458>] SyS_read+0xb8/0x128
> [<ffffffc000086530>] el0_svc_naked+0x24/0x28
> Memory state around the buggy address:
>  ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
>  ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>                                   ^
>  ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>  ffffffc064d57c80: 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.

Curious, but how did you trigger this? I'm just trying to confirm that
mainline is affected, but my machine boots happily with KASAN and STACKTRACE
selected and I can cat /proc/self/{stack,stat} quite happily.

What am I missing?

Will

[toc] | [prev] | [next] | [standalone]


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

From"Shi, Yang" <yang.shi@linaro.org>
Date2016-02-09 18:20 +0100
SubjectRe: [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame
Message-ID<r0k7g-7b0-27@gated-at.bofh.it>
In reply to#1330461
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 ffffffc064d57ba0
>> Read of size 8 by task pidof/499
>> page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
>> flags: 0x0()
>> page dumped because: kasan: bad access detected
>> CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
>> Hardware name: Freescale Layerscape 2085a RDB Board (DT)
>> Call trace:
>> [<ffffffc00008d078>] dump_backtrace+0x0/0x290
>> [<ffffffc00008d32c>] show_stack+0x24/0x30
>> [<ffffffc0006a981c>] dump_stack+0x8c/0xd8
>> [<ffffffc0002e4400>] kasan_report_error+0x558/0x588
>> [<ffffffc0002e4958>] kasan_report+0x60/0x70
>> [<ffffffc0002e3188>] __asan_load8+0x60/0x78
>> [<ffffffc00008c92c>] unwind_frame+0xec/0x260
>> [<ffffffc000087e60>] get_wchan+0x110/0x160
>> [<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
>> [<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
>> [<ffffffc0003ac840>] proc_single_show+0x88/0xd8
>> [<ffffffc000345be8>] seq_read+0x370/0x770
>> [<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
>> [<ffffffc00030c0ec>] vfs_read+0x94/0x168
>> [<ffffffc00030d458>] SyS_read+0xb8/0x128
>> [<ffffffc000086530>] el0_svc_naked+0x24/0x28
>> Memory state around the buggy address:
>>   ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
>>   ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>> ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>                                    ^
>>   ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>   ffffffc064d57c80: 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.
>
> Curious, but how did you trigger this? I'm just trying to confirm that
> mainline is affected, but my machine boots happily with KASAN and STACKTRACE
> selected and I can cat /proc/self/{stack,stat} quite happily.
>
> What am I missing?

I'm using mainline 4.5-rc1 kernel with gcc 5.2. And, my rootfs is NFS 
mounted.

Not sure if other kernel configs, i.e tracing stuff will have impact on 
the trigger since I'm not using the defconfig.

Thanks,
Yang

>
> Will
>

[toc] | [prev] | [next] | [standalone]


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

FromWill Deacon <will.deacon@arm.com>
Date2016-02-09 18:30 +0100
SubjectRe: [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame
Message-ID<r0kgW-7eu-25@gated-at.bofh.it>
In reply to#1330500
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: out-of-bounds in unwind_frame+0xec/0x260 at addr ffffffc064d57ba0
> >>Read of size 8 by task pidof/499
> >>page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null) index:0x0
> >>flags: 0x0()
> >>page dumped because: kasan: bad access detected
> >>CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
> >>Hardware name: Freescale Layerscape 2085a RDB Board (DT)
> >>Call trace:
> >>[<ffffffc00008d078>] dump_backtrace+0x0/0x290
> >>[<ffffffc00008d32c>] show_stack+0x24/0x30
> >>[<ffffffc0006a981c>] dump_stack+0x8c/0xd8
> >>[<ffffffc0002e4400>] kasan_report_error+0x558/0x588
> >>[<ffffffc0002e4958>] kasan_report+0x60/0x70
> >>[<ffffffc0002e3188>] __asan_load8+0x60/0x78
> >>[<ffffffc00008c92c>] unwind_frame+0xec/0x260
> >>[<ffffffc000087e60>] get_wchan+0x110/0x160
> >>[<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
> >>[<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
> >>[<ffffffc0003ac840>] proc_single_show+0x88/0xd8
> >>[<ffffffc000345be8>] seq_read+0x370/0x770
> >>[<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
> >>[<ffffffc00030c0ec>] vfs_read+0x94/0x168
> >>[<ffffffc00030d458>] SyS_read+0xb8/0x128
> >>[<ffffffc000086530>] el0_svc_naked+0x24/0x28
> >>Memory state around the buggy address:
> >>  ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
> >>  ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >>>ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >>                                   ^
> >>  ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> >>  ffffffc064d57c80: 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.
> >
> >Curious, but how did you trigger this? I'm just trying to confirm that
> >mainline is affected, but my machine boots happily with KASAN and STACKTRACE
> >selected and I can cat /proc/self/{stack,stat} quite happily.
> >
> >What am I missing?
> 
> I'm using mainline 4.5-rc1 kernel with gcc 5.2. And, my rootfs is NFS
> mounted.
> 
> Not sure if other kernel configs, i.e tracing stuff will have impact on the
> trigger since I'm not using the defconfig.

If you could put your .config somewhere, that would be helpful, please.

Will

[toc] | [prev] | [next] | [standalone]


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

From"Shi, Yang" <yang.shi@linaro.org>
Date2016-02-09 18:40 +0100
SubjectRe: [PATCH v2] arm64: disable kasan when accessing frame->fp in unwind_frame
Message-ID<r0kqD-7hS-37@gated-at.bofh.it>
In reply to#1330509
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 error is
>>>>> reported by
>>>>> kasan:
>>>>>
>>>>> BUG: KASAN: out-of-bounds in unwind_frame+0xec/0x260 at addr
>>>>> ffffffc064d57ba0
>>>>> Read of size 8 by task pidof/499
>>>>> page:ffffffbdc39355c0 count:0 mapcount:0 mapping:          (null)
>>>>> index:0x0
>>>>> flags: 0x0()
>>>>> page dumped because: kasan: bad access detected
>>>>> CPU: 2 PID: 499 Comm: pidof Not tainted 4.5.0-rc1 #119
>>>>> Hardware name: Freescale Layerscape 2085a RDB Board (DT)
>>>>> Call trace:
>>>>> [<ffffffc00008d078>] dump_backtrace+0x0/0x290
>>>>> [<ffffffc00008d32c>] show_stack+0x24/0x30
>>>>> [<ffffffc0006a981c>] dump_stack+0x8c/0xd8
>>>>> [<ffffffc0002e4400>] kasan_report_error+0x558/0x588
>>>>> [<ffffffc0002e4958>] kasan_report+0x60/0x70
>>>>> [<ffffffc0002e3188>] __asan_load8+0x60/0x78
>>>>> [<ffffffc00008c92c>] unwind_frame+0xec/0x260
>>>>> [<ffffffc000087e60>] get_wchan+0x110/0x160
>>>>> [<ffffffc0003b647c>] do_task_stat+0xb44/0xb68
>>>>> [<ffffffc0003b7730>] proc_tgid_stat+0x40/0x50
>>>>> [<ffffffc0003ac840>] proc_single_show+0x88/0xd8
>>>>> [<ffffffc000345be8>] seq_read+0x370/0x770
>>>>> [<ffffffc00030aba0>] __vfs_read+0xc8/0x1d8
>>>>> [<ffffffc00030c0ec>] vfs_read+0x94/0x168
>>>>> [<ffffffc00030d458>] SyS_read+0xb8/0x128
>>>>> [<ffffffc000086530>] el0_svc_naked+0x24/0x28
>>>>> Memory state around the buggy address:
>>>>>   ffffffc064d57a80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f4 f4
>>>>>   ffffffc064d57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>>>>> ffffffc064d57b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>>>>                                    ^
>>>>>   ffffffc064d57c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>>>>>   ffffffc064d57c80: 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.
>>>>
>>>> Curious, but how did you trigger this? I'm just trying to confirm that
>>>> mainline is affected, but my machine boots happily with KASAN and
>>>> STACKTRACE
>>>> selected and I can cat /proc/self/{stack,stat} quite happily.
>>>>
>>>> What am I missing?
>>>
>>> I'm using mainline 4.5-rc1 kernel with gcc 5.2. And, my rootfs is NFS
>>> mounted.
>>>
>>> Not sure if other kernel configs, i.e tracing stuff will have impact
>>> on the
>>> trigger since I'm not using the defconfig.
>>
>> If you could put your .config somewhere, that would be helpful, please.
>
> Attached it. BTW, I run the test on LS2085a RDB board which has 8 A57
> cores. Not sure if it could be reproduced on other boards easily.

This config has GCOV enabled, my test is run with it disabled. So, you 
may need disable it to replicate the trigger.

Regards,
Yang

>
> Yang
>
>>
>> Will
>>
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web