2019-12-02 15:56:59

by Randy Dunlap

[permalink] [raw]
Subject: Re: linux-next: Tree for Dec 2 (drivers/crypto/hisilicon/sec2/sec_crypto.o +kcsan??)

On 12/1/19 6:59 PM, Stephen Rothwell wrote:
> Hi all,
>
> Please do not add any material for v5.6 to your linux-next included
> trees until after v5.5-rc1 has been released.
>
> Changes since 20191129:
>

on x86_64:

ld: drivers/crypto/hisilicon/sec2/sec_crypto.o: in function `sec_bd_send':
sec_crypto.c:(.text+0xae9): undefined reference to `__tsan_atomic64_fetch_add'
ld: drivers/crypto/hisilicon/sec2/sec_crypto.o: in function `sec_req_cb':
sec_crypto.c:(.text+0xbf3): undefined reference to `__tsan_atomic64_fetch_add'
ld: drivers/crypto/hisilicon/sec2/sec_crypto.o: in function `sec_skcipher_callback':
sec_crypto.c:(.text+0x12d3): undefined reference to `__tsan_atomic32_compare_exchange_strong'


Full randconfig file is attached.

--
~Randy
Reported-by: Randy Dunlap <[email protected]>


Attachments:
config-r8533 (120.63 kB)

2019-12-02 16:22:42

by Marco Elver

[permalink] [raw]
Subject: Re: linux-next: Tree for Dec 2 (drivers/crypto/hisilicon/sec2/sec_crypto.o +kcsan??)

On Mon, 2 Dec 2019 at 16:56, Randy Dunlap <[email protected]> wrote:
>
> On 12/1/19 6:59 PM, Stephen Rothwell wrote:
> > Hi all,
> >
> > Please do not add any material for v5.6 to your linux-next included
> > trees until after v5.5-rc1 has been released.
> >
> > Changes since 20191129:
> >
>
> on x86_64:
>
> ld: drivers/crypto/hisilicon/sec2/sec_crypto.o: in function `sec_bd_send':
> sec_crypto.c:(.text+0xae9): undefined reference to `__tsan_atomic64_fetch_add'
> ld: drivers/crypto/hisilicon/sec2/sec_crypto.o: in function `sec_req_cb':
> sec_crypto.c:(.text+0xbf3): undefined reference to `__tsan_atomic64_fetch_add'
> ld: drivers/crypto/hisilicon/sec2/sec_crypto.o: in function `sec_skcipher_callback':
> sec_crypto.c:(.text+0x12d3): undefined reference to `__tsan_atomic32_compare_exchange_strong'
>
>
> Full randconfig file is attached.

Thanks, Randy.

I think uses of __sync compiler builtins are banned in the kernel, so
here compiling with KCSAN is actually acting as a linter showing us
places where they are used in new code. The hisilicon/sec2 code in
question was only recently added.

hisilicon/sec2 maintainers: please use atomic64_t and atomic64_inc()
for send_cnt and recv_cnt.

Thanks,
-- Marco