Re: arm64: allmodconfig: BUG: KCSAN: data-race in p9_client_cb / p9_client_rpc

From: Naresh Kamboju
Date: Thu Dec 01 2022 - 02:43:48 EST


On Thu, 1 Dec 2022 at 01:35, Dominique Martinet <asmadeus@xxxxxxxxxxxxx> wrote:
>
> Naresh Kamboju wrote on Wed, Nov 30, 2022 at 09:34:45PM +0530:
> > > > [ 424.418214] write to 0xffff00000a753000 of 4 bytes by interrupt on cpu 0:
> > > > [ 424.422437] p9_client_cb+0x84/0x100
> > >
> > > Then we can look at git blame of the lines and see if it's new code.
> >
> > True.
> > Hope that tree and tag could help you get git details.
>
> Even with the git tag, if we don't build for the same arch with the same
> compiler version/options and the same .config we aren't likely to have
> identical binaries, so we cannot make sense of these offsets without
> much work.
>
> As much as I'd like to investigate a data race in 9p (and geez that code
> has been such a headache from syzbot already so I don't doubt there are
> more), having line numbers is really not optional if we want to scale at
> all.
> If you still have the vmlinux binary from that build (or if you can
> rebuild with the same options), running this text through addr2line
> should not take you too long.

Please find build artifacts in this link,
- config
- vmlinux
- System.map
https://people.linaro.org/~anders.roxell/next-20221130-allmodconfig-arm64-tuxmake-build/

And

# aarch64-linux-gnu-objdump -D vmlinux|less search for p9_client_cb

Attached objdump log and here is the link.
- http://ix.io/4hk1

> (You might need to build with at least CONFIG_DEBUG_INFO_REDUCED (or not
> reduced), but that is on by default for aarch64)

Thanks for the suggestions.
The Kconfig is enabled now.
CONFIG_DEBUG_INFO_REDUCED=y

> --
> Dominique


- Naresh
ffff80000a46cac0 <p9_client_cb>:
ffff80000a46cac0: d503201f nop
ffff80000a46cac4: d503201f nop
ffff80000a46cac8: d503233f paciasp
ffff80000a46cacc: a9bc7bfd stp x29, x30, [sp, #-64]!
ffff80000a46cad0: 910003fd mov x29, sp
ffff80000a46cad4: a90153f3 stp x19, x20, [sp, #16]
ffff80000a46cad8: aa0103f3 mov x19, x1
ffff80000a46cadc: aa1e03f4 mov x20, x30
ffff80000a46cae0: a9025bf5 stp x21, x22, [sp, #32]
ffff80000a46cae4: 2a0203f6 mov w22, w2
ffff80000a46cae8: aa0003f5 mov x21, x0
ffff80000a46caec: f9001bf7 str x23, [sp, #48]
ffff80000a46caf0: aa1403fe mov x30, x20
ffff80000a46caf4: d50320ff xpaclri
ffff80000a46caf8: 9101ba77 add x23, x19, #0x6e
ffff80000a46cafc: aa1e03e0 mov x0, x30
ffff80000a46cb00: 97834b20 bl ffff80000853f780 <__tsan_func_entry>
ffff80000a46cb04: f0003614 adrp x20, ffff80000ab2f000 <event_type_size+0x8>
ffff80000a46cb08: aa1703e0 mov x0, x23
ffff80000a46cb0c: 97835cad bl ffff800008543dc0 <__tsan_read2>
ffff80000a46cb10: 7940de63 ldrh w3, [x19, #110]
ffff80000a46cb14: 911c8294 add x20, x20, #0x720
ffff80000a46cb18: 91384294 add x20, x20, #0xe10
ffff80000a46cb1c: 52800400 mov w0, #0x20 // #32
ffff80000a46cb20: aa1403e1 mov x1, x20
ffff80000a46cb24: b0006a22 adrp x2, ffff80000b1b1000 <kallsyms_token_index+0x20f070>
ffff80000a46cb28: 910a8042 add x2, x2, #0x2a0
ffff80000a46cb2c: 97fff345 bl ffff80000a469840 <_p9_debug>
ffff80000a46cb30: 52800080 mov w0, #0x4 // #4
ffff80000a46cb34: 97834de3 bl ffff8000085402c0 <__tsan_atomic_signal_fence>
ffff80000a46cb38: d5033abf dmb ishst
ffff80000a46cb3c: aa1303e0 mov x0, x19
ffff80000a46cb40: 97835ac0 bl ffff800008543640 <__tsan_unaligned_write4>
ffff80000a46cb44: aa1303e0 mov x0, x19
ffff80000a46cb48: d2800003 mov x3, #0x0 // #0
ffff80000a46cb4c: 52800022 mov w2, #0x1 // #1
ffff80000a46cb50: 52800061 mov w1, #0x3 // #3