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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14EACC433F5 for ; Thu, 2 Dec 2021 17:56:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6021D6B0078; Thu, 2 Dec 2021 12:56:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5B2006B007B; Thu, 2 Dec 2021 12:56:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4546D6B007D; Thu, 2 Dec 2021 12:56:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id 39C2D6B0078 for ; Thu, 2 Dec 2021 12:56:30 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0C0928249980 for ; Thu, 2 Dec 2021 17:56:20 +0000 (UTC) X-FDA: 78873608520.26.06CB634 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf12.hostedemail.com (Postfix) with ESMTP id BA71D10000AE for ; Thu, 2 Dec 2021 17:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=z5l4ZowOfON8DShmpXR1Eklfg8s5dDGN7l9e7OCgVe8=; b=MfClZJKe0F1pbNikLiYqacxJtH esR3cz/4eCxZx19dx4KmDsEaorJDIesZdFC9Mqa0tY86lcw0dNvTiF7uIfNTzlQX3XhWTsgIzBpuD d/kjeXOcEH4s07UmV/HBaUMI7OPhwmL1BKEZZFiTdX/ZP2EtVcbZwnxLhRav0floJ4wEYA4BXqgOC rvA39Bla8yYIb32H9imAUKV1DKn9ronjzvb9BLOXYaIwNfZJ/bh/QgijwwqCfZFlrFMZ4atOR5rvF JbMXf+IfD8OyvfX70f8VDBvoVUbvfJdpa0f2k4pCh55BNPA3jRMhRmf1cC5aiFBBN3vaATtlLo2KK XlMcmX+Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1msqJU-0050IV-2P; Thu, 02 Dec 2021 17:56:09 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EE626300293; Thu, 2 Dec 2021 18:56:07 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D8E85322A81C1; Thu, 2 Dec 2021 18:56:07 +0100 (CET) Date: Thu, 2 Dec 2021 18:56:07 +0100 From: Peter Zijlstra 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, Nick Desaulniers , Nathan Chancellor , Dmitry Vyukov , Andrey Konovalov , Mark Rutland , 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: BA71D10000AE X-Stat-Signature: tux3rskms4io4zfhc3any8g3uwqryiga Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=MfClZJKe; dmarc=none; spf=none (imf12.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=peterz@infradead.org X-HE-Tag: 1638467779-424251 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 Thu, Dec 02, 2021 at 06:38:13PM +0100, Marco Elver wrote: > On Thu, 2 Dec 2021 at 18:30, Peter Zijlstra wrote: > > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > > > index 9ef7ce18b4f5..589c8aaa2d5b 100644 > > > --- a/lib/Kconfig.debug > > > +++ b/lib/Kconfig.debug > > > @@ -1977,6 +1977,8 @@ config KCOV > > > bool "Code coverage for fuzzing" > > > depends on ARCH_HAS_KCOV > > > depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS > > > + depends on !ARCH_WANTS_NO_INSTR || STACK_VALIDATION || \ > > > + GCC_VERSION >= 120000 || CLANG_VERSION >= 130000 > > > > Can we write that as something like: > > > > $(cc-attribute,__no_sanitize_coverage) > > > > instead? Other than that, yes totally. > > That'd be nice, but I think we don't have that cc-attribute helper? I Nah indeed, I made that up on the spot. > checked how e.g. CC_HAS_NO_PROFILE_FN_ATTR does it, but it won't work > like that because gcc and clang define the attribute differently and > it becomes a mess. That's also what Nathan pointed out here I think: > https://lkml.kernel.org/r/Yaet8x/1WYiADlPh@archlinux-ax161 Urgh, that's one of them MsgIDs with a '/' in.. /me substitues with %2f and magic... Hurmph yeah... so if we can somehow do that it would allow back porting those fixes to older compiler versions and have things magically work. Not sure how realistic that is, but still.. A well. I'll go do something useful then :-)