Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp284393pxb; Thu, 25 Feb 2021 02:24:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyKcWe8ux07D3P18K3acPpg0u8vWSfQO8Z65q6e3xwhqe6Es5wqLHJSAzhcmWLfW1QGjLsl X-Received: by 2002:a05:6402:1c08:: with SMTP id ck8mr2121851edb.154.1614248670230; Thu, 25 Feb 2021 02:24:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614248670; cv=none; d=google.com; s=arc-20160816; b=j7TXeMJglChAqBWpUVgfq2ihOO1qBT+39UvS/INEjrVKjETE7lN8hlPFKnE1XY85Su x4Wk0ftEO8g5eSPuqTuw2yp3LThM/CW0e7Do4VA4dNuCDdstIHnNyFK0wMmepO3WTxeD U/TaJcx62jx4Uj605r+thccjBHC+igOK/faIR+Lf4H1ZYE+FF3eccZFpk9FjbqkcRALw LazLjyuB8mHhIDg2BwrHt4Qf7bCILHCPIGPL1Yme1bLxpNzInFvuHPbfz5lFKgljVnfq aamfPmTFd5UVx/yOu1vTtXi1yoyxKZ9ZfLvZVefUjB98RI53+gH7so2W6R+QBVgpBm6b xsfA== 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=dBYHNHpjiMscbLFgcCRhnWMmA09aZCR09/PS/cqEOA0=; b=y3ohGYpg7qljEHUDrj9m5DOgnTIAHS2wIAdrVZ2dyksyYVMD6FkDxptqrRSrCOWSe/ M1Kcwk7Gr+LbVLA2Wwsm9hPERoSsWrfT607Y82w0LLFZw/4svAmPwGssifD9TapWxzc6 405MVyb75l3MgzNUF5Q+X6PJ8B+v+fPG48eTjw/scwo1YKHxFs+nEIR6yUOB1gziiSSh jo7gp4BAECHLb12r8OpCbwCbC1UGMGlNJx18K289LEUormqe1UVG1qB6VbGOow5OeCjp 3HfgetVua6imHH2W8cmIvf14T9m97qMRiKVvTI8YUSxJ1iWXCvj8fDcfUfbaPb752Kx7 rC/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=J6k0rjgm; 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 j26si3088344edq.184.2021.02.25.02.24.07; Thu, 25 Feb 2021 02:24:30 -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=merlin.20170209 header.b=J6k0rjgm; 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 S235601AbhBYKXV (ORCPT + 99 others); Thu, 25 Feb 2021 05:23:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233285AbhBYKAs (ORCPT ); Thu, 25 Feb 2021 05:00:48 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 736C0C06174A for ; Thu, 25 Feb 2021 02:00:08 -0800 (PST) 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=dBYHNHpjiMscbLFgcCRhnWMmA09aZCR09/PS/cqEOA0=; b=J6k0rjgmvniMx0Hs5rZuQyv8qP jfopzIqHaLBLoOD6MNP/xyhFf8bVcvBJjw1PuTc0SYrqCdNVGEYqqj03+XUnPkwGGzQyBGYfkeUvE LTdp6vwIpX2GzSiRNAzO4Qg6BU2mtJpWV5/Hl9pqKumIQCo41u9dr4/6C0ohs2trq1w4bxfGhnhle iIHbtUYf5msvt+eDNL/otVmNr115sP+6GadhD/dQxIWhpW7MYP94rh5+PI/neRC9PBezTMBPX4pyA wkAW14kEQtPZrH+al2Yacg0TOrq5OqeGxbnfsTxwqDGdBfFKOxWiqIj+7vt4bb48YEbEHLuxzYFPc ferYFfog==; 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 1lFDR9-000129-Nh; Thu, 25 Feb 2021 09:59:59 +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 237883006D0; Thu, 25 Feb 2021 10:59:58 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 02B5120BC9284; Thu, 25 Feb 2021 10:59:57 +0100 (CET) Date: Thu, 25 Feb 2021 10:59:57 +0100 From: Peter Zijlstra To: Andy Lutomirski Cc: Masami Hiramatsu , Oleg Nesterov , LKML , Anil S Keshavamurthy , "David S. Miller" , X86 ML , Andrew Cooper Subject: Re: Why do kprobes and uprobes singlestep? Message-ID: References: <20210224101756.bbdf95b9b6dfc982bff21324@kernel.org> 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 Wed, Feb 24, 2021 at 11:45:10AM -0800, Andy Lutomirski wrote: > I guess I see the point for CALL, JMP and RET, but it seems like we > could emulate those cases instead fairly easily. Today, yes. CALL emulation was 'recently' made possible by having #BP have a stack gap. We have emulation for all 3 those instructions implemented in asm/text-patching.h, see int3_emulate_$insn().