Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6985134rdb; Fri, 15 Dec 2023 14:08:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtTpfF+//03gGE7zteNBA6kRkfqyloESK6Qgl7CQrAuFSrE5ZMm6XUZXmi34J16cwR4M2A X-Received: by 2002:a05:622a:45:b0:425:19a2:c7ea with SMTP id y5-20020a05622a004500b0042519a2c7eamr11112913qtw.57.1702678088130; Fri, 15 Dec 2023 14:08:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702678088; cv=none; d=google.com; s=arc-20160816; b=Vi06x61PdbzW8xA3g9BiZdiZ9LhYAzsX5BbgCdSGjkqVjp25o95VKhpztXAEJul5sW Ru+vZutz5fwYqBww95YGsLkN36Qxp5AImZOI+HyoJBuZWbtA5nMJv/vlz38Mx+aiKmUF sfHhwKmVVibRCXr5lgF8n8HKvrXIqcsFmkPBGHddUKAlVVCyFbkti2slGUqblzK4Xuds ImTWZundd7IkCerbEeiYqtc6rc5+La7bTZ8unyjT3MxCZbyqSnj8EnGPSO+dI6yTrjsa ZdM3Yp5EgMqDXFxBZnfhPoD0NJl6N6s2/Bs8qZn1mFcKvJMpoKZeiCxj90Q+I8GW90Wt EIEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RPlOtOHOIsAyV9crgoI7qizDCGbIF4qWA//nbOzHpq8=; fh=QCGU/kVoCtvme9Vzxv/MO1rMwj08ZvKz1pQb3yr3CKE=; b=l6IFG1TYk0GWorn2/VDu7MIfOkT7THCdVSXBk9yVZKQ1wdmYSkD4hqvZUe0mEoDuPF yN4MWupd4M9lu0n5yo43RJhloki5fgxyn+zpZr3uJctFE52z2MRRIBEPC4qbZ0lO5Ozv rArAdpFJXgX+WerNHK2+pn8rMoEhwCyLoLKdj7t1BUW7s+4EVAf4sTnjx/e/WVIVrHm8 iJryEPxjgqpGElCpGlaijjdOCXr+b+BraFrN56FHoIM3KiAjvhhqsL3uojy0/mReMpYA 9YY5AC/qwTf2H00xEAsdKmEe6ZaFs/aJ431KCpZUMr+PbFlkrfqZ5piCXtAjsgLM7x8g t7Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=QRhC6pog; spf=pass (google.com: domain of linux-kernel+bounces-1725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id cj5-20020a05622a258500b004254b972e36si19909229qtb.389.2023.12.15.14.08.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 14:08:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@fromorbit-com.20230601.gappssmtp.com header.s=20230601 header.b=QRhC6pog; spf=pass (google.com: domain of linux-kernel+bounces-1725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=fromorbit.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CF3F61C22E65 for ; Fri, 15 Dec 2023 22:08:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3565E18EB9; Fri, 15 Dec 2023 21:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fromorbit-com.20230601.gappssmtp.com header.i=@fromorbit-com.20230601.gappssmtp.com header.b="QRhC6pog" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C218018EB0 for ; Fri, 15 Dec 2023 21:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=fromorbit.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fromorbit.com Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1d347b4d676so10182225ad.2 for ; Fri, 15 Dec 2023 13:59:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20230601.gappssmtp.com; s=20230601; t=1702677591; x=1703282391; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=RPlOtOHOIsAyV9crgoI7qizDCGbIF4qWA//nbOzHpq8=; b=QRhC6pogtg3G0ycZ+WEuE3jEF2UgEhfoc7IVozM15gvJl1c9lepHBJmHyp+G755ACu 5dl/m/BrDjTVyjSvUM1JTQENC3uWow3th5QYY/u09H9ULVlc03GB8ipSjSdyCQU89FkS f05NMPc9HsAvUpyULYiYRA0awEPXNaZDFDk7hQeEb4yUZNBI3vMwx2uKF0n9lx5K6BhL OOHODsMnWZmjxidydGBkqF586JwoYkRcL5TXeS1UJ9EgOvKNvQRXs2iIjKDKpRGb5J9q ueri1uCJrM4SMcN8ypHq/XrQimzj6gRTJlcLT6ozlrUzjO0SXv6WnFHP/rh21XDJeq8u VG1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702677591; x=1703282391; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RPlOtOHOIsAyV9crgoI7qizDCGbIF4qWA//nbOzHpq8=; b=gaLdVU2dfSej3agMLGq8r6MnA7w7Hdt2ZyPlWesByqk7WOMCDLhp1M15L3vlzarZXe A1ZXSZ6ldJzK2XtYJqSks6h5Ok/JlAGW6URbeAiPo8Qwl86H7CG57pJV7H01v92RHeo/ QQMM2ZVrz2C76OmmlfklxFHUh4SjHDsmSAq47TbEsqKgttFfQ2rDYJApUHGS43eYrKlH pGGAFs11PWEAXxZhH9HSl7pE39g7YoEsuwE38IoATdCAqS4+jHYzxcgeeZFBnE6hkXnA uCgk0M03DtM2pTChLQDi7wm8oj4Sb/tZfLgSa27lRQL2Qqa+FyRzKRkREt6sj6b1uIkI iewA== X-Gm-Message-State: AOJu0YwonPwxbyLHZk5pCOajiW6Mz7pr7Pq4F9UkhKlMBS0rUTGSLMsc qW83+nDEJcA+gN+aTinP4V2+fA== X-Received: by 2002:a17:902:7ec1:b0:1d0:7d0b:555c with SMTP id p1-20020a1709027ec100b001d07d0b555cmr10670613plb.10.1702677591078; Fri, 15 Dec 2023 13:59:51 -0800 (PST) Received: from dread.disaster.area (pa49-180-125-5.pa.nsw.optusnet.com.au. [49.180.125.5]) by smtp.gmail.com with ESMTPSA id c10-20020a170903234a00b001d043588122sm14703619plh.142.2023.12.15.13.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 13:59:50 -0800 (PST) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1rEGDj-008p3r-2R; Sat, 16 Dec 2023 08:59:47 +1100 Date: Sat, 16 Dec 2023 08:59:47 +1100 From: Dave Chinner To: Alexander Potapenko Cc: Dave Chinner , syzbot+a6d6b8fffa294705dbd8@syzkaller.appspotmail.com, hch@lst.de, davem@davemloft.net, herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, linux-xfs@vger.kernel.org Subject: Re: [syzbot] [crypto?] KMSAN: uninit-value in __crc32c_le_base (3) Message-ID: References: <000000000000f66a3005fa578223@google.com> <20231213104950.1587730-1-glider@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Dec 15, 2023 at 03:41:49PM +0100, Alexander Potapenko wrote: > On Thu, Dec 14, 2023 at 10:39 PM 'Dave Chinner' via syzkaller-bugs > wrote: > > > > On Thu, Dec 14, 2023 at 03:55:00PM +0100, Alexander Potapenko wrote: > > > On Wed, Dec 13, 2023 at 10:58 PM 'Dave Chinner' via syzkaller-bugs > > > wrote: > > > > > > > > On Thu, Dec 14, 2023 at 08:16:07AM +1100, Dave Chinner wrote: > > > > > [cc linux-xfs@vger.kernel.org because that's where all questions > > > > > about XFS stuff should be directed, not to random individual > > > > > developers. ] > > > > > > > > > > On Wed, Dec 13, 2023 at 11:49:50AM +0100, Alexander Potapenko wrote: > > > > > > Hi Christoph, Dave, > > > > > > > > > > > > The repro provided by Xingwei indeed works. > > > > > > > > Can you please test the patch below? > > > > > > It fixed the problem for me, feel free to add: > > > > > > Tested-by: Alexander Potapenko > > > > Thanks. > > > > > As for the time needed to detect the bug, note that kmemcheck was > > > never used together with syzkaller, so it couldn't have the chance to > > > find it. > > > > > > KMSAN found this bug in April > > > (https://syzkaller.appspot.com/bug?extid=a6d6b8fffa294705dbd8), > > > > KMSAN has been used for quite a long time with syzbot, however, > > and it's supposed to find these problems, too. Yet it's only been > > finding this for 6 months? > > > > > only > > > half a year after we started mounting XFS images on syzbot. > > > > Really? Where did you get that from? syzbot has been exercising XFS > > filesystems since 2017 - the bug reports to the XFS list go back at > > least that far. > > You are right, syzbot used to mount XFS way before 2022. > On the other hand, last fall there were some major changes to the way > syz_mount_image() works, so I am attributing the newly detected bugs > to those changes. Oh, so that's when syzbot first turned on XFS V5 format testing? Or was that done in April, when this issue was first reported? > Unfortunately we don't have much insight into reasons behind syzkaller > being able to trigger one bug or another: once a bug is found for the > first time, the likelihood to trigger it again increases, but finding > it initially might be tricky. > > I don't understand much how trivial is the repro at > https://gist.github.com/xrivendell7/c7bb6ddde87a892818ed1ce206a429c4, I just looked at it - all it does is create a new file. It's effectively "mount; touch", which is exactly what I said earlier in the thread should reproduce this issue every single time. > but overall we are not drilling deep enough into XFS. > https://storage.googleapis.com/syzbot-assets/8547e3dd1cca/ci-upstream-kmsan-gce-c7402612.html > (ouch, 230Mb!) shows very limited coverage. *sigh* Did you think to look at the coverage results to check why the numbers for XFS, ext4 and btrfs are all at 1%? Why didn't the low number make you dig a bit deeper to see if the number was real or whether there was a test execution problem during measurement? I just spent a minute doing exactly that, and the answer is pretty obvious. Both ext4 and XFS had a mount attempts rejected at mount option parsing, and btrfs rejected a device scan ioctl. That's it. Nothing else was exercised in those three filesystems. Put simply: the filesystems *weren't tested during coverage measurement*. If you are going to do coverage testing, please measure coverage over *thousands* of different tests performed on a single filesystem type. It needs to be thousands, because syzbot tests are so shallow and narrow that actually covering any significant amount of filesystem code is quite difficult.... -Dave. -- Dave Chinner david@fromorbit.com