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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 63378C433B4 for ; Wed, 19 May 2021 09:32:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 472D3613B0 for ; Wed, 19 May 2021 09:32:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345511AbhESJeO (ORCPT ); Wed, 19 May 2021 05:34:14 -0400 Received: from foss.arm.com ([217.140.110.172]:56126 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345520AbhESJeK (ORCPT ); Wed, 19 May 2021 05:34:10 -0400 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 9DADA101E; Wed, 19 May 2021 02:32:50 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.30.170]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1FCFB3F73D; Wed, 19 May 2021 02:32:48 -0700 (PDT) Date: Wed, 19 May 2021 10:32:40 +0100 From: Mark Rutland To: Peter Zijlstra Cc: Nick Desaulniers , Josh Poimboeuf , Will Deacon , "Jose E. Marchesi" , "Paul E. McKenney" , Ard Biesheuvel , Catalin Marinas , linux-toolchains@vger.kernel.org Subject: Re: Linux Plumbers Conf 2021 Message-ID: <20210519093240.GA2797@C02TD0UTHF1T.local> References: <20210518121447.GB7914@willie-the-truck> <20210518124311.r4fwv6lfz3erkqnb@treble> <20210518124819.lkzzgjcrh4cc5a6i@treble> <20210518200306.GE21560@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210518200306.GE21560@worktop.programming.kicks-ass.net> Precedence: bulk List-ID: X-Mailing-List: linux-toolchains@vger.kernel.org On Tue, May 18, 2021 at 10:03:06PM +0200, Peter Zijlstra wrote: > On Tue, May 18, 2021 at 09:57:26AM -0700, Nick Desaulniers wrote: > > On Tue, May 18, 2021 at 6:23 AM Peter Zijlstra wrote: > > > > - validates noinstr annotation; *HOWEVER* we rely on objtool to NOP > > > all __sanitizer_cov_* calls in .noinstr/.entry text sections because > > > __no_sanitize_cov is 'broken' in all known compilers. > > > > ^ Do you have more information on this? > > Random link in the middle of a relevant thread: > > https://lkml.kernel.org/r/CANpmjNPNa2f=kAF6c199oYVJ0iSyirQRGxeOBLxa9PmakSXRbA@mail.gmail.com > > Notable quote: > > "It's everywhere. We cannot mark noinstr functions to not be > instrumented by KCOV/-fsanitize-coverage, because no compiler provides > an attribute to do so. GCC doesn't have > __attribute__((no_sanitize_coverage)) and Clang doesn't have > __attribute__((no_sanitize("coverage")), and therefore we can't have > __no_sanitize_coverage." Yuck; I wasn't aware of that. This means that arm64's entry code is unsound (along with some other parts) if kcov is enabled. That *really* needs an attribute, and going forward we shouldn't accept new compiler instrumentation that we can't opt-out of like this. Thanks, Mark.