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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 60630C433F5 for ; Wed, 1 Dec 2021 18:30:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lF3GYm8MB+iTo/cOoePR0YwCE4xLB8AEM/zR3FGtrlU=; b=ZqGZNkcTl6opNS ocVIYPyr1XcuAFWOBOnYnhvLR289vPSJxJ/cnCgUz5IccQ5r2Kr6zyZ+QPsy0NZfpWNCfEVZB65Hh xKe8t3ZVMdPp4BjPMWxPLY8xLsTb0b5WU6qAtdmwSP+7eF/PjTJ3zHlMUj9xKzqhgTVyVQGrGyg/L Ts0nG/KKqNQa5zBrGLTQJl/s+d3t2ZzjhplndaUWaqotxcS/ejIoJtjHf2IvFUKZOOEFxaN/qmRGF tiH+Cq3KrR8sDFoOdsiIy/RFXXcZCd+nVBv7HzEzLW7Xsa1z2vRwk2ZI2yBSu4sn6x0Se5dKI2Wft ioxarp8NXbLf6/9irJzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msULu-009mrq-1O; Wed, 01 Dec 2021 18:29:10 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msULo-009mpm-Er for linux-arm-kernel@lists.infradead.org; Wed, 01 Dec 2021 18:29:06 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4AAE01477; Wed, 1 Dec 2021 10:29:03 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.65.205]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6AFB73F766; Wed, 1 Dec 2021 10:29:00 -0800 (PST) Date: Wed, 1 Dec 2021 18:28:57 +0000 From: Mark Rutland To: Marco Elver Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, Peter Zijlstra , Nick Desaulniers , Nathan Chancellor , Dmitry Vyukov , Andrey Konovalov , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] kcov: fix generic Kconfig dependencies if ARCH_WANTS_NO_INSTR Message-ID: References: <20211201152604.3984495-1-elver@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211201_102904_655951_11AB4E73 X-CRM114-Status: GOOD ( 32.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 01, 2021 at 07:16:25PM +0100, Marco Elver wrote: > On Wed, 1 Dec 2021 at 18:46, Mark Rutland wrote: > [...] > > > > Currently we mostly get away with disabling KCOV for while compilation units, > > > > so maybe it's worth waiting for the GCC 12.0 release, and restricting things > > > > once that's out? > > > > > > An alternative would be to express 'select ARCH_WANTS_NO_INSTR' more > > > precisely, say with an override or something. Because as-is, > > > ARCH_WANTS_NO_INSTR then doesn't quite reflect reality on arm64 > > > (yet?). > > > > It's more of a pragmatic thing -- ARCH_WANTS_NO_INSTR does reflect reality, and > > we do *want* to enforce that strictly, it's just that we're just struck between > > a rock and a hard place where until GCC 12 is released we either: > > > > a) Strictly enforce noinstr, and be sure there aren't any bugs from unexpected > > instrumentation, but we can't test GCC-built kernels under Syzkaller due to > > the lack of KCOV. > > > > b) Don't strictly enforce noinstr, and have the same latent bugs as today (of > > unknown severity), but we can test GCC-built kernels under Syzkaller. > > > > ... and since this (currently only affects KCOV, which people only practically > > enable for Syzkaller, I think it's ok to wait until GCC 12 is out, so that we > > can have the benefit of Sykaller in the mean time, and subsequrntly got for > > option (a) and say those people need to use GCC 12+ (and clang 13+). > > > > > But it does look simpler to wait, so I'm fine with that. I leave it to you. > > > > FWIW, for my purposes I'm happy to take this immediately and to have to apply a > > local patch to my fuzzing branches until GCC 12 is out, but I assume we'd want > > the upstream testing to work in the mean time without requiring additional > > patches. > > Agree, it's not an ideal situation. :-/ > > syzkaller would still work, just not as efficiently. Not sure what's > worse, less efficient fuzzing, or chance of random crashes. In fact, > on syzbot we already had to disable it: > https://github.com/google/syzkaller/blob/61f862782082c777ba335aa4b4b08d4f74d7d86e/dashboard/config/linux/bits/base.yml#L110 > https://lore.kernel.org/linux-arm-kernel/20210119130010.GA2338@C02TD0UTHF1T.local/T/#m78fdfcc41ae831f91c93ad5dabe63f7ccfb482f0 > > So if we ran into issues with KCOV on syzbot for arm64, I'm sure it's > not just us. I can't quite see what the reasons for the crashes are, > but ruling out noinstr vs. KCOV would be a first step. > > So I'm inclined to suggest we take this patch now and not wait for GCC > 12, given we're already crashing with KCOV and therefore have KCOV > disabled on arm64 syzbot. > > I'm still fine waiting, but just wanted to point out you can fuzz > without KCOV. Preferences? If it's not used by Syzbot, that's good enough for me -- I can apply local hacks to run with KCOV if I want to in the mean time, and I can debug my own mess if I have to. So FWIW, for taking that now: Acked-by: Mark Rutland Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel