Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp625967ybt; Wed, 17 Jun 2020 09:41:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF2oty97daACHExJrfd4piLHsJ3HT0kQpHiKsqTXKcRI/u1cRJLn7cSTRvVFKbvrRJjoAe X-Received: by 2002:a17:906:e47:: with SMTP id q7mr5391eji.279.1592412112181; Wed, 17 Jun 2020 09:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592412112; cv=none; d=google.com; s=arc-20160816; b=Lbd24FVNSmqU0GAJInkBfg7GFZPspR3BnJhLcPtgPVCKxhj0YOeBIKnowF+T9eqJOj 0xeHrn3AmbBTtjMzHM66/B5A7FxtdU3z2T5PuHdKvLbcdr8k1+/w5ssUYZR+90sxveLS SJKx4DIC9wcV9WitH1XXhruF7BVr0F0lcO8d1hM6ws2A74EEd8xp6xLWJHycqHb69s1/ 0sEAJzSWS9lgHFtVBbDejq3oVPo8oR9aEz1lq5cL4Wnmowk6ov5rSiQ9H4TgSGkBTnp9 jKYU3mp6VZUxB4YLt2vyvtTXjq/o2PzudAKIekB89852xY6gnE/QByJJqxXCnmu6mN2O Xmew== 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=tlT1YMQ39uBGe7lMvNKoVc7btUmDBldnB9RGq7PSmdU=; b=PCcM1a7kVnAU41yO0H1txXF0MT9C56TBbb90PvycPKJTjl7L8JT4alxkcdPFr/83J7 FLInr8N4fJMqEzd11GUsdga7Vbe9OoOgKXIi/X800QDtlI7QGi62Y6eiC8ky+TAaxFKF 5uPFu5RNdzgkQpbP77nX8kPdbhmMS5Hr+IDp+j7y/UW1b4X9wXXqPovfE9NqJIZzNz4p OYm8w1mvb3gWUpJqF3DEdumKMo7RYJ4WbkvY9SxDGtnVEonAkRgXX19K/hthJBxR2ppN Uvd2DsoS7A7o3nMOExNAgct6XDsBGrUqWKkf6GblPX6FTmtZG4w+kWdEGPAY4nFCtEnQ 7i5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=rqfiepsu; 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 ha3si178176ejb.563.2020.06.17.09.41.29; Wed, 17 Jun 2020 09:41:52 -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=rqfiepsu; 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 S1726928AbgFQQhI (ORCPT + 99 others); Wed, 17 Jun 2020 12:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbgFQQhH (ORCPT ); Wed, 17 Jun 2020 12:37:07 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B07ECC06174E for ; Wed, 17 Jun 2020 09:37:07 -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=tlT1YMQ39uBGe7lMvNKoVc7btUmDBldnB9RGq7PSmdU=; b=rqfiepsuCi33loo8rMB96DxiAu 9w1NY+X3myOmpj2D05fXb86U9Uvxn2NgLG4docMa0ChJ5PwKyPHQ/fTlpO5dfO6TcQQ9aYiWDyUVD IVx34rDpmlyL4guEZHN/KqXDljXE4p94UjziFzMBz8NJIteRNMOxjBTX76Bc1bv3S4FI8q5FgvXvP ifdRrUqkvkx44ictM3ik9G2qTUIGZ9SC2ogO5AxUYcfMAgzWW9GcXRtBVzOFnLbygyzA5Pcv8vWcB uWlrV/TGl65l5YBxBXzLHazsN9QI8UViP/kzrx7J3bAziA6oVuQ1LHXoT3zqTIYoZw4c5jbb+fGea v0RarUAg==; 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 1jlb3G-0000tM-Mw; Wed, 17 Jun 2020 16:36:38 +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 0C32E3017B7; Wed, 17 Jun 2020 18:36:36 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id F0F372BA7AE07; Wed, 17 Jun 2020 18:36:35 +0200 (CEST) Date: Wed, 17 Jun 2020 18:36:35 +0200 From: Peter Zijlstra To: Marco Elver Cc: Dmitry Vyukov , 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 , Josh Poimboeuf , ndesaulniers@google.com, Andy Lutomirski Subject: Re: [PATCH -tip v3 1/2] kcov: Make runtime functions noinstr-compatible Message-ID: <20200617163635.GC576905@hirez.programming.kicks-ass.net> References: <20200615142949.GT2531@hirez.programming.kicks-ass.net> <20200615145336.GA220132@google.com> <20200615150327.GW2531@hirez.programming.kicks-ass.net> <20200615152056.GF2554@hirez.programming.kicks-ass.net> <20200617143208.GA56208@elver.google.com> <20200617144949.GA576905@hirez.programming.kicks-ass.net> <20200617151959.GB56208@elver.google.com> <20200617155517.GB576905@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200617155517.GB576905@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 17, 2020 at 05:55:17PM +0200, Peter Zijlstra wrote: > On Wed, Jun 17, 2020 at 05:19:59PM +0200, Marco Elver wrote: > > > > Does GCC (8, as per the new KASAN thing) have that > > > __builtin_memcpy_inline() ? > > > > No, sadly it doesn't. Only Clang 11. :-/ > > > > But using a call to __memcpy() somehow breaks with Clang+KCSAN. Yet, > > it's not the memcpy that BUGs, but once again check_preemption_disabled > > (which is noinstr!). Just adding calls anywhere here seems to results in > > unpredictable behaviour. Are we running out of stack space? > > Very likely, bad_iret is running on that entry_stack you found, and as > you found, it is puny. > > Andy wanted to make it a full page a while ago, so I suppose the > question is do we do that now? Andy suggested doing the full page; untested patches here: git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/entry