From nobody Tue Sep 10 14:06:05 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X358Y6Kxnz5Vs8g for ; Tue, 10 Sep 2024 14:06:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X358Y5FHFz4PfK for ; Tue, 10 Sep 2024 14:06:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725977165; a=rsa-sha256; cv=none; b=ETZuLXqXUDAsFicsqTdbm+w42kN0RIjJdW/+nw7YiIz4+3Ok2tb4x7+0a/ZqX1GlCb8eue qPzPeFgXd3YDbW06VvGrF7y5A5xLPD7laqzyVk9lCfRK0IyCR65SqCpFDO8ME+RIv7vwAc HFLBwXZjP1Rgo9DgxxvY1z2mwsfegcLSH+5tLQXHvXy+p0lwKlc5RfkbSuop1CK92u+mDb uPLbZiuULXq0L+RSwSESzoTKqO87SgT/fwQZFxWo/T5wG2QnPCKjEuCau9AzxpLTGJntKC XrOKwmLEzuu21JY7eGl4lgAsx5Fjiwsjtmx6X3acjmVsTw9jzZYUycygkZUdpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725977165; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=77QMTDLXLgwGlKwB2ZyiodZmi3IYNcoU2h0gwxPQF3Q=; b=ZyNotlVt5a8eymnc9w5AnLq2eH4oM9z4hvhIGyhk3e4K4rWf99e4JWneGdb6La+0XL5R2x q9kNXr/WyVV6DBc663hDAvmxM8WzUI/O8xGD8yn3ySq2eoNtoMGhyFw0F+d/y2JYpakLi8 t1ryXDdlkcE2Ecu++DQieeffA9kvPOYOOb5dQ4s7KdRgvUjHYp522qEr5o2yxvUSZeXt9n /ZhbHAvSgwKJndXFdXSojgrCjzJLbOMLbUW8dvcMcI7GOJOzOEs7POI4aZmhAXBwPwVioA rfYjtVbaWTnmQF33Krb6TpLT2Ufuzgwor2DDmFy5aMSHe3K1mNCnmx4vaqunbw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X358Y4rnCzqpj for ; Tue, 10 Sep 2024 14:06:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 48AE65iH033910 for ; Tue, 10 Sep 2024 14:06:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 48AE65DO033909 for bugs@FreeBSD.org; Tue, 10 Sep 2024 14:06:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 281402] zfs: kmsan reports Uninitialized UMA memory from zio_data_buf_alloc Date: Tue, 10 Sep 2024 14:06:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281402 Mark Johnston changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --- Comment #2 from Mark Johnston --- (In reply to Alan Somers from comment #1) So, I'm not too familiar with zio_t. Reading vdev_file_io_strategy(), I suspect we want a kmsan_check_abd(), akin to kmsan_check_bio() etc.. (Note that when KMSAN is configured, we try to disable unmapped I/O everywhere, including ZFS. KMSAN does not shadow the direct map. This is not ideal.) That is, something like void kmsan_check_abd(abd_t abd, const char *descr) { KASSERT(abd_is_linear(abd)); kmsan_shadow_check(abd_to_buf(abd), abd->abd_size, descr); } Or a kmsan_check_zio(), which applies the above to zio->io_abd when the typ= e is ZIO_TYPE_WRITE. Then, various stages of the ZIO pipeline should check the abd/zio when writ= ing. I guess __zio_execute() should perform that check. That said, I'm not cer= tain it's true that the ZIO buffer is initialized at all stages in the pipeline = (I'm just not that familiar with the I/O path), so we might get false positives. This way, we can at least narrow it down to a particular stage, or prove th= at the data was uninitialized before entering the pipeline at all. I guess putting a check in zio_write() would be a good idea too. --=20 You are receiving this mail because: You are the assignee for the bug.=