Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4283305ybg; Mon, 8 Jun 2020 04:03:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8oH/v2ZFh58pB9SWZBdavcov1mSnjU7Z6zy88HAcgBML0yvv7EmZReL+bf/hSixeDeXya X-Received: by 2002:a17:906:1088:: with SMTP id u8mr13822286eju.428.1591614218387; Mon, 08 Jun 2020 04:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591614218; cv=none; d=google.com; s=arc-20160816; b=kB4pgTeCaIakfByd8IY13TM474FqbWjC1a+dYpBdbV6HqTQvAgiXBikaN+mUSUUbPt tE6lGpKElDoJ7gGXQks52TZ/7KMjEhdconVl//LTXL/sQHBuLX/ApGPKqBxZjcQxQkYi Ulk+3Vw3ZhDUGM+Cr57sytDi76cO9fW5AmeHb41uqH2kI9JhHhHnKiKLNxfZR9bKyvwG TNg54NTSqLskr+J5t+QQQW03kb81SGin7IMIy0i7dq+zxUZnw3eNuBbDAinLgD55C6lN CbXqNhGTW3sLSXMiBrDjFvasvvq6gc89yJsOEf4w0MzGinmoPxMTB6Eecht3xcfdEDlv mF2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=K/s5mZYe0D3JGCoeAasezBJ22Tds6PXDtFml58Tk67I=; b=PHceUYxUm2eTzrZlcD/Sq4N1mtk7VbocJAoy2B3k2BE4YfV35pKUcHhSFDjMdSaHxw jfhdQriBRL9KeuPkjUjTBakWQNC4z4qfCKAFBjGb+KRAA00FApMHiwKWWNgvsGFpOwX+ D1RkzVStfToDsCyvfCtUaBRVjaq/dzC5/TD/wOeFnxUuYAz1f65EukmDhxArPwlzuiUu ClSv81sBlNCh1bS4JKKGyj3mancjafT5Sdc9+qWaQ6d2tG05W29lq5oYZW1HTpuXUlo3 ox/h5zt6m/zmeWqlbu2Khq/1sHWBzyIt+b6e+eGa/s29AyZ2r+2TSwurDWrTdS/mdyjy /5Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NV5cY9XI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa9si8458984ejb.171.2020.06.08.04.03.15; Mon, 08 Jun 2020 04:03:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NV5cY9XI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729482AbgFHLBb (ORCPT + 99 others); Mon, 8 Jun 2020 07:01:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729398AbgFHLBa (ORCPT ); Mon, 8 Jun 2020 07:01:30 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B20C8C08C5C2 for ; Mon, 8 Jun 2020 04:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=K/s5mZYe0D3JGCoeAasezBJ22Tds6PXDtFml58Tk67I=; b=NV5cY9XIrtGE8IEwqFs+sXr9sT vFEjzVsCyTj2I0GfXcvg8uYL6kLuxZKx7yLrjBjHIbK6C4lPqZtgBJz9nmcSfD++hSaTq7H9jGMc5 ob3OrF/ELz5wGyeSjaJ8u0xxSOSe0vs1UsypYjLsO1w+9zu2SL5bQPvmCqxwX3moMXIZ3FZbVEDaO gTUKbvEgLys6K+3LpF8Q8jLNXqNT/ZUryK3ndSycV3mwju6roSwzaeQYm8eVXOvxfzdoNQfqD04VK vbQ8423NHttN8zTU+kkeBY4H/VTcNSV66pnArqssCAGI7G9uKdboFSW4TtdyJgdFCcqRerGEADkxt PFBhEQkA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jiFWh-0002iJ-Of; Mon, 08 Jun 2020 11:01:13 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 13313301A7A; Mon, 8 Jun 2020 13:01:08 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id DB50A21A7523D; Mon, 8 Jun 2020 13:01:08 +0200 (CEST) Date: Mon, 8 Jun 2020 13:01:08 +0200 From: Peter Zijlstra To: Dmitry Vyukov Cc: Marco Elver , Andrey Konovalov , Mark Rutland , Borislav Petkov , Thomas Gleixner , Ingo Molnar , clang-built-linux , "Paul E. McKenney" , Alexander Potapenko , kasan-dev , LKML , the arch/x86 maintainers , Andrew Morton Subject: Re: [PATCH -tip v3 1/2] kcov: Make runtime functions noinstr-compatible Message-ID: <20200608110108.GB2497@hirez.programming.kicks-ass.net> References: <20200605082839.226418-1-elver@google.com> <20200605120352.GJ3976@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 08, 2020 at 09:57:39AM +0200, Dmitry Vyukov wrote: > As a crazy idea: is it possible to employ objtool (linker script?) to > rewrite all coverage calls to nops in the noinstr section? Or relocate > to nop function? > What we are trying to do is very static, it _should_ have been done > during build. We don't have means in existing _compilers_ to do this, > but maybe we could do it elsewhere during build?... Let me try and figure out how to make objtool actually rewrite code.