Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1562359ybg; Thu, 4 Jun 2020 12:56:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPkVGV6h3plKpbzIu3T6KdIee9b2oUm3AtZT86hKb+6id0yPfWaLXrLsmup4OFhF+QX+km X-Received: by 2002:a50:b961:: with SMTP id m88mr6010981ede.4.1591300587786; Thu, 04 Jun 2020 12:56:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591300587; cv=none; d=google.com; s=arc-20160816; b=g1muR5trqmzCncfgFRYPgw4cvwAC7zbXfihrRkC7EdeYaxcVsG397TC/iZbeznjfta by8qfg6uUWpgpGzQ9ywgsNmvSSf3zSS9H/NWeSWHhN1H7JJA8sO0SpCuHXpGXxNTO0JE Us7R6Xz+zUfALzxTmwMHOE4ffwZz8FUb5RQa7G9cb5WDr5HRldRsL1MjKWAEbjez9lna tvNXtEG1QQCz3MNBLRvGAehX4M08HdgYLrqImqvbzkjr+iAw0NF1cXr7B22bAgAqdIAO O7FnCG5DeGo1+ccWJkvkBR1W45KTs8yuxa3qR11xE/tvegYHNtrcTzydJ/sAKmzLka3z 7RGQ== 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=tL9q+t8Vqftp23TReUP0WPRi7rrcPb/Bl/OGGiR0B+c=; b=yeVI9KkCJDBfmNaS0gEh2RmY3NgEacsqK6gOMlbarWod1HmGmsnHPV9yNXwTfLrTwX 0gefub+dgMdPXixny2usI/hgXpXaasLgm5/nKITJkSR0G0cAIZk5SGNiYZ3PSk6u2yzl /adr0u6x3+Ev0GVDCMQfAyOYxiY2Hb3b/ntxtWmXPM5q8Q9wFuEA8FZTXPxUkPc6ZXGq Yus+8HkvPnw2FoTrV0iGwmHYU+XN5izF7yBInakfuWPWXWBhvtXFxH6syVHWeCdLkRnn UxgR+c/1leuwjssWq5o1Chk3b/Tq5wwiByDTO8jl800fcJFn/ErSercVhEiwOSjk3p2K n0tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=pBLxwY3F; 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 w19si149410edl.458.2020.06.04.12.56.05; Thu, 04 Jun 2020 12:56:27 -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=merlin.20170209 header.b=pBLxwY3F; 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 S1728560AbgFDQEX (ORCPT + 99 others); Thu, 4 Jun 2020 12:04:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbgFDQEX (ORCPT ); Thu, 4 Jun 2020 12:04:23 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 011DAC08C5C0 for ; Thu, 4 Jun 2020 09:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=tL9q+t8Vqftp23TReUP0WPRi7rrcPb/Bl/OGGiR0B+c=; b=pBLxwY3FdJi/B95CQxC5sy60fF nj6BOVbpfeRct+qR4bDej3dOtdi9Ws+RR9Sa8c6/VVQO40xC0Y3tsskNeMKN8ZKqByeF4f1Y9sSgp 4hChjgSK0xZHMhpDNVd+HApV6CfehskCuQll6h2RAGhbjyCq3/lZVkpu3epzfHi6SgW74k2x2gO91 Sc4rX/4DJa3xmxCp/I+qcopphb09naROy4xVyksZbXP0kT6qBieoaIM5qUd7xALtBBil0+4QUTCWj 7uJPPPZBTW0+KoEYr9DzaAlFShUay1I9LCUkwpWXeDhyqzm4NjwiPFYUjK95+qVBsmiK2EPUfGF4K +absGcZw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgsLW-0004Zj-Fw; Thu, 04 Jun 2020 16:03:58 +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 239A430008D; Thu, 4 Jun 2020 18:03:57 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0DB1D20D6E7D6; Thu, 4 Jun 2020 18:03:57 +0200 (CEST) Date: Thu, 4 Jun 2020 18:03:57 +0200 From: Peter Zijlstra To: Andrey Konovalov Cc: Marco Elver , Borislav Petkov , Thomas Gleixner , Ingo Molnar , clang-built-linux , "Paul E . McKenney" , Dmitry Vyukov , Alexander Potapenko , kasan-dev , LKML Subject: Re: [PATCH -tip] kcov: Make runtime functions noinstr-compatible Message-ID: <20200604160357.GF3976@hirez.programming.kicks-ass.net> References: <20200604095057.259452-1-elver@google.com> <20200604110918.GA2750@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 Thu, Jun 04, 2020 at 04:02:54PM +0200, Andrey Konovalov wrote: > On Thu, Jun 4, 2020 at 1:09 PM Peter Zijlstra wrote: > > That whole kcov_remote stuff confuses me. > > > > KCOV_ENABLE() has kcov_fault_in_area(), which supposedly takes the > > vmalloc faults for the current task, but who does it for the remote? > > Hm, no one. This might be an issue, thanks for noticing! > > > Now, luckily Joerg went and ripped out the vmalloc faults, let me check > > where those patches are... w00t, they're upstream in this merge window. > > Could you point me to those patches? > > Even though it might work fine now, we might get issues if we backport > remote kcov to older kernels. Thinking more about this; you can't actually pre-fault for kernel threads, as kernel threads will run with the mm of whatever regular thread ran before them, and who knows if they have that vmalloc region faulted in. So Joerg's patches are pretty much the only way to guarantee remotes will not his the vmalloc fault.