Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7180401imu; Thu, 27 Dec 2018 14:05:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN71mvDQ6p/sPgVK28SD4lKbFjs/VURaqWydNV15oHbmg+a+LCzvlXVN3KQFpG2T7/ZY/hOK X-Received: by 2002:a65:624c:: with SMTP id q12mr24245163pgv.379.1545948358989; Thu, 27 Dec 2018 14:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545948358; cv=none; d=google.com; s=arc-20160816; b=XyRKkPA8DyFfSGx2i4uKdAax4JFkHiw7Byt4134Beg1FhI1HE3YHYRrBzfc2tgu1VW K1MQ2TJJ5VcUxyg8C37YjU8/ItuuN/yIC8nfV2txjydPi3WZSK3otvqTbCzCFLeFAkLT T3WxCzrJxazAoVAzXTyNFUkeD42jluSst9PlZXFSez/zMICeUUEFYDVAb9cc5KB/jaID DJI/7MfTup5nJ0ALbzNhbnmffVzc6ZK+6xY6BcDdcso4KHswm9oHhfVUKhZtSRPU6vVE kwtGm3fdPHJyB7muhHCWoKwefUIwjlq/ulymvp8CuJ8A4vOxYgGyTe3DnsqK4Ze/q9lC fVzw== 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 :in-reply-to:references:mime-version:dkim-signature; bh=UvYk1Ccto8f5RQj4IZoV7E3ihNnWct61zvYBnVEZKak=; b=BGz1OUBOT6PslA5wBYC0f2qW8duhha2obXG1AXWboqlEOsHRyJyUOf0/y/Sm5d0OID QFXVrByyntpmgwozpZIV29AiGsHFOIk6LG49/aTpMi+v5kv1I9jUPICAhKIBmFAoAWbn gq8ae28IO1GHSCZEm/2hHyFaaeH6mfI8tZUmG/tihMUt6zgrs2QKtQdgxag60VWuv0s3 NxggCbbjx+L4U4KogECJmCrCTEaPK1EzZCY43PwM7OaFCptMjsiUFxOZesPWZAktl7Rv cSyPUsltb7xUkwdNv9Lc6qMDU2gdJw7Z2LMYMeSGTcS1HG38Nik8hX59m3WP/9dnMIm5 hggA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=BIpc23qB; 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 t20si36281539plj.94.2018.12.27.14.05.44; Thu, 27 Dec 2018 14:05:58 -0800 (PST) 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=BIpc23qB; 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 S1731046AbeL0O2S (ORCPT + 99 others); Thu, 27 Dec 2018 09:28:18 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:42098 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729882AbeL0O2R (ORCPT ); Thu, 27 Dec 2018 09:28:17 -0500 Received: by mail-io1-f65.google.com with SMTP id x6so14631588ioa.9 for ; Thu, 27 Dec 2018 06:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UvYk1Ccto8f5RQj4IZoV7E3ihNnWct61zvYBnVEZKak=; b=BIpc23qBMKexzqxCY+93Muedv4bK5JjI7oDuMXQK4xCeaEeBxtsxd1XGpi+7wvZZJd VR7SqeYQSdpAF46LNLB/H18rzZxM+S13RfQZj00YuLhxjkaYRiWGe80PLEAA5fVscEiP S5u91arb13+uzVOswtB9HJMJLSaFbjXj5dDSrYrG3YJ/FwOgairxUFCxfKwyai368PiC zCQ9sTq/cFhnYN9vrH/0LKYT3/4wnoe35xBf/Ll6Z7ZhsajpRe09gsEVpBC88suNsTAT u83z66yLj1Zmi21sxQfSfE9leCx3+AJZCnxNccJjjHFP1UXl8z+HbUoXIyeb/kC+enas qalQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UvYk1Ccto8f5RQj4IZoV7E3ihNnWct61zvYBnVEZKak=; b=F6oYqD5+mCRsp6mDSlwhIchre9BBEzQx6JtAWEKu9AHfwl986Y6y8BioMBoYOzwCw3 yxQu6Vb77RRaC4uw4zEQbr7vyf9Ioeur+zWeipa2V/g07gVbgd0vWCT6HR08SP41rx8s dGIRipL0ci1oQ+0nWNrMHdYwRCHyhE+YGstrLrSK2uDXq3FSDxda+3Bl/HX9CZjZq/6p xfjEEiO+wfZXy09zatVxrRNSW7AJzr9uZFThDwtyJBnW4C7IYQxeD52Xls93UWhUXlxX UKBOU6Ep9x1F2xx6TSCyL+EA2c2oN9XBAcOB7D7RRez+wexqcwd9VemZOm96DjNO6/MC dtLA== X-Gm-Message-State: AJcUukemw7CpHYICbb8CHVtkz2IyRMam1ducPcoiXDRL4FtSlSqT72k1 lukFc0RsjKayOCEwl3r5AzFajl7Cfuhp/0J0pjI2kg== X-Received: by 2002:a5d:8491:: with SMTP id t17mr16337069iom.11.1545920896418; Thu, 27 Dec 2018 06:28:16 -0800 (PST) MIME-Version: 1.0 References: <1542702858-4318-1-git-send-email-wanpengli@tencent.com> <442fc8ca-f92c-eded-9ede-c800a03bf39a@redhat.com> In-Reply-To: <442fc8ca-f92c-eded-9ede-c800a03bf39a@redhat.com> From: Dmitry Vyukov Date: Thu, 27 Dec 2018 15:28:05 +0100 Message-ID: Subject: Re: [PATCH] KVM: X86: Fix scan ioapic use-before-initialization To: Paolo Bonzini , LKML , Wanpeng Li , Linus Torvalds , Greg Kroah-Hartman , dledford@redhat.com Cc: KVM list , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Wei Wu , Kostya Serebryany , Daniel Vetter , syzkaller , Dan Williams , Chris Mason , Jonathan Corbet , Kees Cook , Laura Abbott , Olof Johansson , Steven Rostedt , Theodore Tso , Tim.Bird@sony.com 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 Sun, Nov 25, 2018 at 6:31 PM Paolo Bonzini wrote: > > On 20/11/18 09:34, Wanpeng Li wrote: > > From: Wanpeng Li > > ... > > This patch fixes it by bailing out scan ioapic if ioapic is not initialized in > > kernel. > > Reported-by: Wei Wu +Linus, Greg I want to point out that this was reported more then 3 months ago by syzbot: https://groups.google.com/forum/#!msg/syzkaller-bugs/cPT7tmaz-gQ/SzOyhM0YBAAJ then the report was lost on kernel mailing lists and then re-reported by somebody else: https://www.spinics.net/lists/kvm/msg177705.html and only then fixed. Lots of kernel bug reports routinely get lost on mailing lists, which is bad. Another bug was reported by syzbot in April: https://groups.google.com/forum/#!msg/syzkaller-bugs/-9XIT9gwq7M/sqvBXSZWBgAJ then get lost and then re-reported in November: https://www.spinics.net/lists/kvm/msg177704.html and only then fixed. Not specific for KVM, another bug in kernel/trace reported by syzbot, lost for months, then re-reported and fixed: https://groups.google.com/forum/#!msg/syzkaller-bugs/o_-OeMyoTwg/Ugh432hlAgAJ https://bugzilla.kernel.org/show_bug.cgi?id=200019 And, no, it's not that people ignore just syzbot reports. It's just that syzbot reports can be tracked so it's easier to spot such cases, for manually reported bugs nobody usually knows anything after few weeks. Here is an example of bug report by a human, which was even replied but then slipped from somebody's attention set for a moment and then complete oblivion. Months later happened to be re-reported by syzbot and then fixed: https://groups.google.com/forum/#!msg/syzkaller-bugs/wFUedfOK2Rw/waUrQYOxAQAJ Re-reported a year later bugs can cause security problems and large amounts of work to backport the fix to thousands of downstream kernel forks. Not re-reported bugs are even worse as they are just not fixed. This Plumbers I was approached by Doug Ledford from Redhat, who said literally that there was a bunch of syzbot reports in rdma subsystem but since they were reported some time ago, now nobody knows what/where are they. So while the bugs are still presumably there, now they are completely unactionable and kernel development process is incapable of dealing with this. While syzbot reports have some chances of being recovered, this equally applies to human-reported bugs and they can't be easily recovered. This does not looks like how things should be for the most critical and fundamental software project in the world. Lost bugs/patches should not be a thing. There are known working solutions for this in the form of tooling and procedures, namely bug tracking. Any bug tracking systems allows to answer the main question: what are the active bugs, sorted by priority, in subsystem X/assigned to me; and lots of other useful questions. And, yes, I know we have bugazilla. But it's not being used as a bug tracking system as of now. And when used, sometimes cause more trouble because nobody expects bugs to be there: https://lwn.net/ml/linux-kernel/20181208115629.GA3288@kroah.com/