Received: by 10.192.165.156 with SMTP id m28csp507169imm; Fri, 13 Apr 2018 03:05:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+DVfUh528aLKBOsdYHr8WeUKUfas/MvSQ5Qlk4qnCptaK3yW/UPsaOdgWGobfpRdYHPmnS X-Received: by 2002:a17:902:3001:: with SMTP id u1-v6mr4666784plb.164.1523613922267; Fri, 13 Apr 2018 03:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523613922; cv=none; d=google.com; s=arc-20160816; b=XYuzz1rT1uRaH8YV+McLjHplMxK3kOkV1MMwHmkgQNVGj+SZzJsQRVHK0jQyhiao/l JKCGm/BE6Gu4W03kUXliCaGqtitNt2bGsOXS9utfMLqxf4REk2MZnBPrQT1nQrcYeNnf ow6so4VKHX5rvqEYzKamrQfT2kq9cbl1sQkH4kQOpL18nSLfJ0B5rV5bdrquZxMp399V Wlulg3fhT/cuRAo4C8EMrtnhWcNPBSLxb7LdacHZ36CsheRjqXIt/kGQhMP32mRC2AG6 H3KkMUKE07AHQHUh+pnjzv75Ntfi1QWi4zljc9YnUvePJaHts/uKNxfn2Wnkypu4CfXj eEZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=CIsGI+rlVl5sRLZBiS+W6p/ie6s6zzUZqPqYkDgzDHU=; b=aG8a0eQKwYGBvprUKcWMQNITR4Q3U9AsH1o609AM/hDVTnqqRQ5N/l/itqdDuqBEnF wKwy4VYTR/DuHGv90789WQWgxukXisHkIG2CsYvG4TmrXgwjuKFAkxLiTiFl/wYwuyXo y+zpuVhEwzugQ9gDdjvE29x09N4Qod/07nKEXaM27v2NmaR7u5w67A8H2IvBFa5VR/Hh wCqFlSmUTH+lGReuH9lgUWqDYaSEUrGsy7/Bv6/zFoZbjKZzHvKDXsHhz3LcDgQegY2s fQLknDwxwKqjDydQi/TpaUNsbk+DT+1a7Tuamut3ORdHhrwYhYBHEVCLNVfb36C7sv2e pBBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MmHt7lNU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2-v6si5176816plt.406.2018.04.13.03.05.07; Fri, 13 Apr 2018 03:05:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=MmHt7lNU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754062AbeDMKDw (ORCPT + 99 others); Fri, 13 Apr 2018 06:03:52 -0400 Received: from mail-pg0-f45.google.com ([74.125.83.45]:41418 "EHLO mail-pg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753238AbeDMKDs (ORCPT ); Fri, 13 Apr 2018 06:03:48 -0400 Received: by mail-pg0-f45.google.com with SMTP id e2so1720320pgv.8 for ; Fri, 13 Apr 2018 03:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CIsGI+rlVl5sRLZBiS+W6p/ie6s6zzUZqPqYkDgzDHU=; b=MmHt7lNU7tXRrVRJuZEmOedldtQKXy/Ns8IzicTzbKFin+Ypz8zAmiUkTfEJTM2AvV X+h7dJjX9tsEHHS4oUiIpgU0R46EoQJQ91ovcmzYT/Rw+o8w3sGNXRHf1h4euehGaRD/ HA6V3fV+djlz6NZ5qhvRfTA1kzcrKbATJzbrEywUQI/VGGzu023OmuMJVS8WB2fyytWM eMch2MALeVv5foypmzFdetfl7v42pDHiiCnSKvhImcIpv82BtIZOkuB0+Pe+I7rz80tU HEMYTrgqQoLp7jKd7eEwrdQmVTuB3qw8q0CQRDNoXKmxmSM4zRquD3xYHPtnlkyzhB8Q 4gzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CIsGI+rlVl5sRLZBiS+W6p/ie6s6zzUZqPqYkDgzDHU=; b=mvwA+zik+qTK3/0Q+GuZU2d9O9PnUu7XUv21CJK+W1kqSuouZt0S2U+CMpwvAJ0gBq wlmfx3HjAnMTYcoSC3os5EcLQN7M2d/nBJ0pzyCUS1fM+UHsr6/6BdwqQuD9XfjAzG3r IjkIP7Hdp1sMtABIeRwHGXl0W7J0/JQDCa3vYnOYMYWrIF2/ySLqJlxx7kqsKNV13HOB mLaJSwiEs4bu+SmTwal6fOBuQs6TFa0/WXnuNQEmxdDWzV1+pxUyjIXiMmwzPqd8tiBv M+rS1SGik5/wpLL8dqRzN+deY/V3DlTd4D2xT31y2tX1mKTHfDJILRMH0BHwG6CbJR6e ZZhQ== X-Gm-Message-State: ALQs6tDmywgo8M0J+XAxvdGx9eIp7AF9EdpTeBBpdMMkEAlKYDosd5be A+bNRSo8+Qr+05Lg+KAy18jX9WjeXD/DxOOoeta+5A== X-Received: by 10.101.101.207 with SMTP id y15mr3550036pgv.84.1523613827812; Fri, 13 Apr 2018 03:03:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.182.136 with HTTP; Fri, 13 Apr 2018 03:03:27 -0700 (PDT) In-Reply-To: <20180406161053.GF7500@magnolia> References: <20180403043854.GL1150@dastard> <20180405213844.GE23861@dastard> <20180406161053.GF7500@magnolia> From: Dmitry Vyukov Date: Fri, 13 Apr 2018 12:03:27 +0200 Message-ID: Subject: Re: WARNING: bad unlock balance in xfs_iunlock To: "Darrick J. Wong" Cc: Dave Chinner , syzbot , LKML , linux-xfs@vger.kernel.org, syzkaller-bugs , "Theodore Ts'o" , syzkaller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 6, 2018 at 6:10 PM, Darrick J. Wong wrote: > On Fri, Apr 06, 2018 at 07:38:44AM +1000, Dave Chinner wrote: >> On Thu, Apr 05, 2018 at 08:54:50PM +0200, Dmitry Vyukov wrote: >> > On Tue, Apr 3, 2018 at 6:38 AM, Dave Chinner wrote: >> > > On Mon, Apr 02, 2018 at 07:01:02PM -0700, syzbot wrote: >> > >> Hello, >> > >> >> > >> syzbot hit the following crash on upstream commit >> > >> 86bbbebac1933e6e95e8234c4f7d220c5ddd38bc (Mon Apr 2 18:47:07 2018 +0000) >> > >> Merge branch 'ras-core-for-linus' of >> > >> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip >> > >> syzbot dashboard link: >> > >> https://syzkaller.appspot.com/bug?extid=84a67953651a971809ba >> > >> >> > >> C reproducer: https://syzkaller.appspot.com/x/repro.c?id=5719304272084992 >> > >> syzkaller reproducer: >> > >> https://syzkaller.appspot.com/x/repro.syz?id=5767783983874048 >> > > >> > > What a mess. A hand built, hopelessly broken filesystem image made >> > > up of hex dumps, written into a mmap()d region of memory, then >> > > copied into a tmpfs file and mounted with the loop device. >> > > >> > > Engineers that can debug broken filesystems don't grow on trees. If >> > > we are to have any hope of understanding what the hell this test is >> > > doing, the bot needs to supply us with a copy of the built >> > > filesystem image the test uses. We need to be able to point forensic >> > > tools at the image to decode all the structures into human readable >> > > format - if we are forced to do that by hand or jump through hoops >> > > to create our own filesystem image than I'm certainly not going to >> > > waste time looking at these reports... >> > >> > Hi Dave, >> > >> > Here is the image: >> > https://drive.google.com/file/d/1jzhGGe5SBJcqfsjxCLHoh4Kazke1oTfC/view >> > (took me about a minute to extract from test by replacing memfd_create >> > with open and running the program). >> >> Says the expert who knows exactly how it's all put together. It took >> me a couple of hours just to understand WTF the syzbot reproducer >> was actually doing.... >> >> > Then do the following to trigger the bug: >> > losetup /dev/loop0 xfs.repro >> > mkdir xfs >> > mount -t xfs -o nouuid,prjquota,noikeep,quota /dev/loop0 xfs >> > >> > To answer your more general question: syzbot is not a system to test >> > solely file systems, it finds bugs in hundreds of kernel subsystems. >> > Generating image for file systems, media files for sound and >> > FaceDancer programs that crash host when FaceDancer device is plugged >> > into USB is not feasible. And in the end it's not even clear what >> >> I don't care how syzbot generates the filesystem image it uses. >> >> > kernel subsystem is at fault and even if it somehow figures out that >> > it's a filesystem, it's unclear that it's exactly an image that >> > provokes the bug. syzbot provides C reproducers which is a reasonable >> >> It doesn't matter *what subsystem breaks*. If syzbot is generating a >> filesystem image and then mounting it, it needs to provide that >> filesystem image to to people who end up having to debug the >> problem. It's a basic "corrupt filesystem" bug triage step. >> >> > Some bugs are so involved that only an >> > expert in a particular subsystem can figure out what happens there. >> >> And that's clearly the case here, whether you like it or not. >> >> You want us to do things that make syzbot more useful as a tool but >> you don't want to do things that make syzbot a useful tool for us. >> It's a two way street.... Hi Dave, Darrick, It's not that we don't want to make the system more useful, it's just that we don't see what reasonably can be done here. The system does not have notion of images, sound files, USB devices. It feeds data into system calls, and that's what it provides as reproducers. Also see the last paragraph. > ...here's my take on this whole situation: > > So far as I can tell, this syzbot daemon grew the ability to fuzz > filesystems and started emitting bug report after bug report, with > misleading commit ids that have nothing to do with the complaint. Please elaborate re commits. It's a basic rule of any good bug report -- communicate exact state of source code when the bug was hit, i.e. provide the commit hash. > Your > maintainers (Dave, Eric, and me) have spent a few hours trying to figure > out what's going on, to some frustration. The bug reports themselves > miss the public engagement detail of saying something like "Hey XFS > engineers, if you'd like to talk to the syzbot engineers they can be > reached at ." Instead it merely says "direct > questions to " like this is some press release and the only thing > on the other end of the line will be some disinterested bureaucracy. > Or some robot. This is quite subjective and we hear opinions all possible ways. I don't think there is one size fits all. E.g. +Ted argued in exactly the opposite direction: make reports more laconic, formal, table-formatted with dry information. There is also a tradeoff between describing each detail in proper, friendly English and being more laconic. If we increase everything 4x and post a wall of text with each report, lots of people won't read anything of it just because it's a wall of text. I am also not a native English speaker, so providing simple formal text is a safer option than writing something potentially clumsy. Having said that, I am collecting proposals for report format improvements. Here is fortunately slightly better wording for footer based on your idea: https://github.com/google/syzkaller/issues/565#issuecomment-380793620 > We're willing to take random user reports of corruption and misbehavior > and do all the work to turn that into regression tests and patches, but > that's not the situation here. You work for a well known engineering > company which (I assume) has decided that fuzz hardening the commons > aligns with its goals. Collective-you (i.e. your company) could realize > that goal sooner and with a lot less community friction by staffing up > engineers to join our community to help us triage and fix the things > reported by syzbot. It's much /less/ effective to dump a pile of work > on the people in the community. We each have our own work-piles and > most likely different priorities. > > Hardening XFS to the sorts of things fuzzers find is important to me > (and $employer) as well, but the difference here is that I read every > report that gets generated and start the work to figure out a regression > test and a code fix. That is what I send to the list for more public > participation and to signal that yes, there's a human behind all this > with some reasonable level of understanding of the problem. Well, I guess nobody has infinite engineering resources. If we would have them we would also fix all these bug ourselves and don't bother you at all. Just as any other company could invest in writing bug detection tools, fuzzers, deploy them and report bugs, which would relief us from this. We have limited resources and do what's possible within these resources. Unfortunately providing individual handling of each of the thousands of bugs is not possible within these resources. I know that what we are doing is useful for kernel overall because lots of hundreds of bugs get fixed due to this effort. If you, as xfs maintainers, think that these reports are net negative for xfs and xfs should not be tested, say so and we will figure out how to make it happen. Thanks