From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 880E8C2D0C0 for ; Mon, 23 Dec 2019 07:51:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 247B920709 for ; Mon, 23 Dec 2019 07:51:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="qI+o8b7n" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 247B920709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9006F8E0005; Mon, 23 Dec 2019 02:51:46 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B10D8E0001; Mon, 23 Dec 2019 02:51:46 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 79F4D8E0005; Mon, 23 Dec 2019 02:51:46 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0181.hostedemail.com [216.40.44.181]) by kanga.kvack.org (Postfix) with ESMTP id 614EC8E0001 for ; Mon, 23 Dec 2019 02:51:46 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 1C624181AC9BF for ; Mon, 23 Dec 2019 07:51:46 +0000 (UTC) X-FDA: 76295637012.28.head64_49978ac62c12b X-HE-Tag: head64_49978ac62c12b X-Filterd-Recvd-Size: 4115 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Dec 2019 07:51:45 +0000 (UTC) Received: from localhost (unknown [5.29.147.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6333206B7; Mon, 23 Dec 2019 07:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577087504; bh=4hSYuA09rMK9TnyZpQa1j8/BOL1KxgydDPnPkvisxeE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qI+o8b7n8UGCHfqGEUreMmvT/2YMIrA/NNuddvo0vBCU/kLekwe3IJz4YTb2kaQcT MXOhDcMUlj5po0b70fehjt3aW0NotuvwuwStneTlKPfTatjFUjX/vtEGh94HxRCVuw GF3/Yz83Q1HvVAcYddcKNg2TcchuorIHAnxGsB1A= Date: Mon, 23 Dec 2019 09:51:41 +0200 From: Leon Romanovsky To: glider@google.com Cc: Alexander Viro , Andreas Dilger , Andrew Morton , Andrey Konovalov , Andrey Ryabinin , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Christoph Hellwig , Christoph Hellwig , "Darrick J. Wong" , "David S. Miller" , Dmitry Torokhov , Dmitry Vyukov , Eric Biggers , Eric Dumazet , Eric Van Hensbergen , Greg Kroah-Hartman , Harry Wentland , Herbert Xu , Ilya Leoshkevich , Ingo Molnar , Jason Wang , Jens Axboe , Marek Szyprowski , Marco Elver , Mark Rutland , "Martin K. Petersen" , Martin Schwidefsky , Matthew Wilcox , "Michael S. Tsirkin" , Michal Simek , Petr Mladek , Qian Cai , Randy Dunlap , Robin Murphy , Sergey Senozhatsky , Steven Rostedt , Takashi Iwai , Theodore Ts'o , Thomas Gleixner , Vasily Gorbik , Vegard Nossum , Wolfram Sang , linux-mm@kvack.org, mhocko@suse.com Subject: Re: [PATCH RFC v4 00/42] Add KernelMemorySanitizer infrastructure Message-ID: <20191223075141.GK13335@unreal> References: <20191220184955.223741-1-glider@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191220184955.223741-1-glider@google.com> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Dec 20, 2019 at 07:49:13PM +0100, glider@google.com wrote: > KernelMemorySanitizer (KMSAN) is a detector of errors related to uses of > uninitialized memory. It relies on compile-time Clang instrumentation > (similar to MSan in the userspace: > https://clang.llvm.org/docs/MemorySanitizer.html) > and tracks the state of every bit of kernel memory, being able to report > an error if uninitialized value is used in a condition, dereferenced or > copied to userspace, USB or network. > <..> > > 2. checkpatch.pl complains a lot about the use of BUG_ON in KMSAN > source. I don't have a strong opinion on this, but KMSAN is a debugging > tool, so any runtime invariant violation in it renders the tool useless. > Therefore it doesn't make much sense to not terminate after a bug in > KMSAN. Such early termination will cause hard time for verification teams execute any major test suite with KMSAN till it will be without any bugs. So yes, I think that the best solution is to avoid BUG_ONs in non-critical code. Thanks