From: syzbot <syzbot+549710bad9c798e25b15@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] Re: KMSAN: uninit-value in __crc32c_le_base
Date: Fri, 15 Nov 2024 07:21:40 -0800 [thread overview]
Message-ID: <67376704.050a0220.3bcb1c.0000.GAE@google.com> (raw)
In-Reply-To: <000000000000736bd406151001d7@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: KMSAN: uninit-value in __crc32c_le_base
Author: dmantipov@yandex.ru
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cfaaa7d010d1fc58f9717fcc8591201e741d2d49
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b11bfe68dd65..e0b515aa1c63 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -18,6 +18,9 @@
#include <linux/crc32c.h>
#include <linux/sched/mm.h>
#include <linux/unaligned.h>
+#ifdef CONFIG_KMSAN
+#include <linux/kmsan-checks.h>
+#endif
#include <crypto/hash.h>
#include "ctree.h"
#include "disk-io.h"
@@ -93,6 +96,10 @@ static void csum_tree_block(struct extent_buffer *buf, u8 *result)
num_pages = num_extent_pages(buf);
}
+#ifdef CONFIG_KMSAN
+ kmsan_unpoison_memory(kaddr + BTRFS_CSUM_SIZE,
+ first_page_part - BTRFS_CSUM_SIZE);
+#endif
crypto_shash_update(shash, kaddr + BTRFS_CSUM_SIZE,
first_page_part - BTRFS_CSUM_SIZE);
@@ -104,6 +111,9 @@ static void csum_tree_block(struct extent_buffer *buf, u8 *result)
*/
for (i = 1; i < num_pages && INLINE_EXTENT_BUFFER_PAGES > 1; i++) {
kaddr = folio_address(buf->folios[i]);
+#ifdef CONFIG_KMSAN
+ kmsan_unpoison_memory(kaddr, PAGE_SIZE);
+#endif
crypto_shash_update(shash, kaddr, PAGE_SIZE);
}
memset(result, 0, BTRFS_CSUM_SIZE);
next prev parent reply other threads:[~2024-11-15 15:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 21:52 [syzbot] [crypto?] KMSAN: uninit-value in __crc32c_le_base (4) syzbot
2024-04-03 9:39 ` Herbert Xu
2024-05-09 7:22 ` [syzbot] [btrfs] " syzbot
2024-11-15 15:21 ` syzbot [this message]
2025-04-23 15:32 ` [syzbot] Re: [syzbot] [crypto?] " syzbot
2025-04-23 16:37 ` [PATCH] bcachefs: Fix unit-value within btree_bounce_alloc() I Hsin Cheng
2025-04-23 16:45 ` Kent Overstreet
2025-04-25 16:53 ` I Hsin Cheng
2025-04-26 15:03 ` Kent Overstreet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67376704.050a0220.3bcb1c.0000.GAE@google.com \
--to=syzbot+549710bad9c798e25b15@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.