[PATCH] riscv: support KASAN instrumentation of bitops

Conor Dooley conor at kernel.org
Fri Aug 2 01:10:29 PDT 2024


On Fri, Aug 02, 2024 at 07:45:38AM +0200, Alexandre Ghiti wrote:
> Hi Qingfang,
> 
> On 02/08/2024 06:05, Qingfang Deng wrote:
> > From: Qingfang Deng <qingfang.deng at siflower.com.cn>
> > 
> > The arch-specific bitops are not being picked up by the KASAN test
> > suite.
> > 
> > Instrumentation is done via the bitops/instrumented-{atomic,lock}.h
> > headers. They require that arch-specific versions of bitop functions
> > are renamed to arch_*. Do this renaming.
> > 
> > As most comments are identical to the ones in the instrumented headers,
> > remove them.
> > 
> > Signed-off-by: Qingfang Deng <qingfang.deng at siflower.com.cn>

> Samuel has just posted a similar patch here https://lore.kernel.org/linux-riscv/20240801033725.28816-1-samuel.holland@sifive.com/T/#t

Additionally Samuel's patch has the advantage of compiling :)

This one errors with:
include/asm-generic/bitops/instrumented-lock.h:80:16: error: implicit declaration of function 'arch_xor_unlock_is_negative_byte'; did you mean 'xor_unlock_is_negative_byte'? [-Werror=implicit-function-declaration]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240802/3066af2f/attachment.sig>


More information about the linux-riscv mailing list