From nobody Wed Apr 26 18:07:23 2023 X-Original-To: dev-commits-src-all@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 4Q66KB47wHz475Hv; Wed, 26 Apr 2023 18:07:26 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q66KB3jN5z41dT; Wed, 26 Apr 2023 18:07:26 +0000 (UTC) (envelope-from mavbsd@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-b8f32969ab0so13244972276.2; Wed, 26 Apr 2023 11:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682532445; x=1685124445; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=Cacbz0WwusrUDlSYkM3czxOnB1JDew56lTRZITQ+HL0=; b=AlELOMvbDfa5ACFQLXKvExIw7DhwaRdYnSZBhZt6dzH9QcgQbv/YIBxUPKbPqtjisq 7wQxcvom21uCeUmAukfE/hbuEBPVRshUVjqrNLWf+XriEYY/NnMWBLDOa7+DmvH95QNC AguthPdtywOffSoE112fAa1197nfpW7l+2soVEVQLmP1WleaWqSFhDMBva/oP+bVjgjI ivfKQI3RuH7+e3EslkdXSt4deHI13WwRumxfEohht0vlhoWtnKAs7GRHp3dkDo6IzXtE 7RXIiYipt4SQcrrUBw7RtuzGgmLSlAzVPs9uF4UfeFmr6SkD3+eld6g2VFQXaC8GDFZU WS8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682532445; x=1685124445; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Cacbz0WwusrUDlSYkM3czxOnB1JDew56lTRZITQ+HL0=; b=RsuA/GP0P1ziapeuUQm3Y7JJMztK9l+R5agtIsZoR8tI+T6pz9a/GyjITGqDC99atL KdTzBK+P0hNb1Yq2SnFr89eCCh/B1+ngxSHMApBhnhM96HaVZ1T0buE1hIWqmtDCl0vr C/bKLIraNV2SBQ3F1K3TezqvVegmbG/AH8aekojwGX+H0PT/8o4OJxbiwC6IQHEHjp2k lF1qrhqq1cB5fwQQ1Udy3lFfrc9gQD2h6NdFSKiGoVlHgf1nFNeE5mIgTlgDfec9NKAm Wpx4kcmlo+qJ1RZXlM0e7ww7hZN0LC36rnefCF4dJqbfEsoIFfLVHzDq1W/mjiPJgPGX t8wQ== X-Gm-Message-State: AAQBX9fvzOLNc4SqNRqJKILaAozWf8zsGnOuTMsaQRPEiM6fHqrxdqci 7HDnyVbrDibZK9IJLrZYmAtxeSpViA8= X-Google-Smtp-Source: AKy350aAh8z9zWRbiEpJrApqGuENEG/4fd8M3CyfCvftFjIfMQcjRgURm+W21TRIpaV8S8RhpNL72g== X-Received: by 2002:a25:3627:0:b0:b96:29d0:dc35 with SMTP id d39-20020a253627000000b00b9629d0dc35mr16869703yba.50.1682532445404; Wed, 26 Apr 2023 11:07:25 -0700 (PDT) Received: from [10.230.45.5] ([38.32.73.2]) by smtp.gmail.com with ESMTPSA id 82-20020a251855000000b00b7d2204cd4bsm4119341yby.21.2023.04.26.11.07.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Apr 2023 11:07:24 -0700 (PDT) Message-ID: Date: Wed, 26 Apr 2023 14:07:23 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: git: d09a955a605d - main - zfs: Fix positive ABD size assertion in abd_verify(). Content-Language: en-US To: Mateusz Guzik , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202304261801.33QI1W4S063849@gitrepo.freebsd.org> From: Alexander Motin In-Reply-To: <202304261801.33QI1W4S063849@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Q66KB3jN5z41dT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N I found it as part of some new development and never saw it triggered otherwise, so AFAIK it didn't require any urgency. On 26.04.2023 14:01, Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=d09a955a605d03471c5ab7bd17b8a6186fdc148c > > commit d09a955a605d03471c5ab7bd17b8a6186fdc148c > Author: Mateusz Guzik > AuthorDate: 2023-04-26 17:59:24 +0000 > Commit: Mateusz Guzik > CommitDate: 2023-04-26 18:00:36 +0000 > > zfs: Fix positive ABD size assertion in abd_verify(). > > This cherry-picks upstream: > commit bba7cbf0a481ab16f9a9a4874b7dbd5682e4d3a4 > Author: Alexander Motin > Date: Wed Apr 26 12:20:43 2023 -0400 > > Fix positive ABD size assertion in abd_verify(). > > Gang ABDs without childred are legal, and they do have zero size. > For other ABD types zero size doesn't have much sense and likely > not working correctly now. > > Reviewed-by: Igor Kozhukhov > Reviewed-by: Brian Behlendorf > Signed-off-by: Alexander Motin > Sponsored by: iXsystems, Inc. > Closes #14795 > > Sponsored by: Rubicon Communications, LLC ("Netgate") > --- > sys/contrib/openzfs/module/zfs/abd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sys/contrib/openzfs/module/zfs/abd.c b/sys/contrib/openzfs/module/zfs/abd.c > index d4921d0ba7db..26222d2efe3f 100644 > --- a/sys/contrib/openzfs/module/zfs/abd.c > +++ b/sys/contrib/openzfs/module/zfs/abd.c > @@ -109,7 +109,6 @@ void > abd_verify(abd_t *abd) > { > #ifdef ZFS_DEBUG > - ASSERT3U(abd->abd_size, >, 0); > ASSERT3U(abd->abd_size, <=, SPA_MAXBLOCKSIZE); > ASSERT3U(abd->abd_flags, ==, abd->abd_flags & (ABD_FLAG_LINEAR | > ABD_FLAG_OWNER | ABD_FLAG_META | ABD_FLAG_MULTI_ZONE | > @@ -118,6 +117,7 @@ abd_verify(abd_t *abd) > IMPLY(abd->abd_parent != NULL, !(abd->abd_flags & ABD_FLAG_OWNER)); > IMPLY(abd->abd_flags & ABD_FLAG_META, abd->abd_flags & ABD_FLAG_OWNER); > if (abd_is_linear(abd)) { > + ASSERT3U(abd->abd_size, >, 0); > ASSERT3P(ABD_LINEAR_BUF(abd), !=, NULL); > } else if (abd_is_gang(abd)) { > uint_t child_sizes = 0; > @@ -130,6 +130,7 @@ abd_verify(abd_t *abd) > } > ASSERT3U(abd->abd_size, ==, child_sizes); > } else { > + ASSERT3U(abd->abd_size, >, 0); > abd_verify_scatter(abd); > } > #endif -- Alexander Motin