Skip to content

Commit 9c3a2c9

Browse files
author
Kent Overstreet
committed
bcachefs: Disable asm memcpys when kmsan enabled
kmsan doesn't know about inline assembly, obviously; this will close a ton of syzbot bugs. Signed-off-by: Kent Overstreet <[email protected]>
1 parent 9623224 commit 9c3a2c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/bcachefs/util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ static inline void memcpy_u64s_small(void *dst, const void *src,
431431
static inline void __memcpy_u64s(void *dst, const void *src,
432432
unsigned u64s)
433433
{
434-
#ifdef CONFIG_X86_64
434+
#if defined(CONFIG_X86_64) && !defined(CONFIG_KMSAN)
435435
long d0, d1, d2;
436436

437437
asm volatile("rep ; movsq"
@@ -508,7 +508,7 @@ static inline void __memmove_u64s_up(void *_dst, const void *_src,
508508
u64 *dst = (u64 *) _dst + u64s - 1;
509509
u64 *src = (u64 *) _src + u64s - 1;
510510

511-
#ifdef CONFIG_X86_64
511+
#if defined(CONFIG_X86_64) && !defined(CONFIG_KMSAN)
512512
long d0, d1, d2;
513513

514514
asm volatile("std ;\n"

0 commit comments

Comments
 (0)