Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1209794pxb; Thu, 28 Jan 2021 10:28:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNQb4lwWPUEd0cFvDUZmZQU+90BLtXOe/f2T5uTY7OGJdnhKsY8Lv8cJxUHEVfG7TxNWvp X-Received: by 2002:a17:906:11d6:: with SMTP id o22mr797902eja.106.1611858516362; Thu, 28 Jan 2021 10:28:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611858516; cv=none; d=google.com; s=arc-20160816; b=VORhHbjMnk50tTrpdZpOoxqYIGBRDNk7Ika8bQMT6mIrTYMPYvCy2NGxFpDGgxL3gN BDzkXOS3CqwWTHwS0m/pKd+88sYCGCZBVJ3UWv2rQX0Trrtzjh+jQ4d2eKR+IuU8/RAf l5HM+14DViQhVyX0YIiK5cQqCbyAVKt6hlQNTjvBVeSslhw70GEZO8v6Hb+eA7REI8vt aeU6I808SCO4QNq1aJb873aHasP/JPNWp7OaVALnXtCP8CxqPdY+bJzp/+h+gTF7zXud lwTnEk71huOJ4TeLooEu1PWodjXEXOajsHyWS5aI3WiQiGpsvSdNq/u8miQlaftOQrcT O2SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=I6mEsWyfZsiB3rlFhTgBIwxES1Rflykh4OLIPIv0rCk=; b=T0sOtHK7NNHegOVbUAaxAVwjYh3mkiK3PsE2iNw69O+kjYsoEx8zE0H+7mkkaq7CnB k9QuiovdIN8DL9HNu8Qy5ns1MW77VLYYb6i1QEXPIa9ATlS129w3qx1CQ7lG20T7srWF thRUTI3JoFEWnBZ9CtLelb8H9ZqGzrA6d+JFvDO47TEaKZYnu67sPOURLoy4tC+mmswp X4lguMYpmsyWzXDIrHZY2CxdZq0IUMgRgQZcvDbdnVkqqDzQ8rLoloDY5u+vDIINJ4iL VOvrC8xvMtzZQlwjyYCef8OTxLm4IcZAY80ryZqPAvvmdSzyOtbVAhvI7VHEgvkeSwGf NDCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gcabAO7X; 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 i20si2890247edv.576.2021.01.28.10.28.06; Thu, 28 Jan 2021 10:28:36 -0800 (PST) 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=pass header.i=@infradead.org header.s=casper.20170209 header.b=gcabAO7X; 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 S231321AbhA1S13 (ORCPT + 99 others); Thu, 28 Jan 2021 13:27:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231730AbhA1SZN (ORCPT ); Thu, 28 Jan 2021 13:25:13 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7F6FC061794; Thu, 28 Jan 2021 10:24:32 -0800 (PST) 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=I6mEsWyfZsiB3rlFhTgBIwxES1Rflykh4OLIPIv0rCk=; b=gcabAO7Xy6JOPzF0fg+TkJRqB1 4UDrYOTK7lJwX/yOkgXneIlZ14o+PmnfN+JT2iof2MefPJ5ByrdSflxuyRlE0+MkTmbrWDXdlICG7 xu6hXnWrAo2W3iAmYGOP1NUuKTOD4KxU2eKVetYN4VfecjiZ0AWv9GNh1f0foR3raJ7d5MbQBUfeN oDeIru8fUyX8ss/ryJNy5K/FdfliHweexWvrzU7CdKfotUlmFJ7/CF/W35f0Y7C3Axonsx5ELf0Fs 2A1196jNd2SGhPhrby9+Tl09WYiuqQd/Mrtj1fYXKb/WSf4fVx5rfkVi62yi70MXhDj10OQ7UpthJ q0N7UJuA==; 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 (Red Hat Linux)) id 1l5Bxn-008oak-7C; Thu, 28 Jan 2021 18:24:16 +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 7F66C300B22; Thu, 28 Jan 2021 19:24:14 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6EA7E200D4EF2; Thu, 28 Jan 2021 19:24:14 +0100 (CET) Date: Thu, 28 Jan 2021 19:24:14 +0100 From: Peter Zijlstra To: Nikolay Borisov Cc: Masami Hiramatsu , Masami Hiramatsu , LKML , Alexei Starovoitov , bpf@vger.kernel.org, Josh Poimboeuf , Steven Rostedt Subject: Re: kprobes broken since 0d00449c7a28 ("x86: Replace ist_enter() with nmi_enter()") Message-ID: References: <25cd2608-03c2-94b8-7760-9de9935fde64@suse.com> <20210128001353.66e7171b395473ef992d6991@kernel.org> <20210128002452.a79714c236b69ab9acfa986c@kernel.org> <20210128103415.d90be51ec607bb6123b2843c@kernel.org> <20210128123842.c9e33949e62f504b84bfadf5@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 06:45:56PM +0200, Nikolay Borisov wrote: > it would be placed on the __fentry__ (and not endbr64) hence it works. > So perhaps a workaround outside of bpf could essentially detect this > scenario and adjust the probe to be on the __fentry__ and not preceding > instruction if it's detected to be endbr64 ? Arguably the fentry handler should also set the nmi context, it can, after all, interrupt pretty much any other context by construction.