Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3680163yba; Tue, 7 May 2019 05:28:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQXwxS4xSZYHBkn6cwdJHEH+H62v9QecwtgshceyLO/H5zyl80vBt8Tgs/wDZHIdGViWz8 X-Received: by 2002:a63:f250:: with SMTP id d16mr39074241pgk.168.1557232121338; Tue, 07 May 2019 05:28:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557232121; cv=none; d=google.com; s=arc-20160816; b=cKnVx1Ki9pg2OtU5MwEP6rT2QaF3uiP05+a90eqCk1ueacc1GmkrNZnudM4ffgRV+y PD/zG1YF3HNVOJv4hO8Llo+iJbjvlZVxHG25wdL/IYeSoSem8azFhyh7OZob+c2fKleP J9KfdQaCA06DkJO6vPylPkdSveprfcsTr0s+7xppFGzXwVNXQBfNFA/xVtHQeONalGgJ /kmoh2ggDEjycmkYWgWQdgvKzFRGyiOSa4ilP4m/t9dol1zxUXM7tT/2KM5Bb4WkY2cj ay7A6tHnoeg3mVgYlT/vzZnnO9urpkaPCJ9dkgH9SPsVraCVz4AV5wFEcPfdnsvH3rx2 +/Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=B8TpvoEcDJDdU4NxbX+hChxGzd1mMMDdaBeRBeK/moE=; b=XEJkxDPdj8ExMzkYw2eK7S6DCvh8lpSFN10dq2NE5BooCIXytFhoandouMYqtFUQer 7xQFVMLaqaEKNodLYNRhXtJL5XDbkaXa+ucxJT9UoiBPrC52t/AdfbCg/lFtauRQQaRz QoCB1XI1i5tWXtJaVfrxg6FffCZdozaofiOack0vOYFJSjjIocpEuCXTZJdd1n4E6Sn4 Jyc79D6asnG4mzp0PAcMRn3Y6dVlXfxJgmWKSo7N/NGXo8ag3ibjbM6sgv4aln/J6iui SpBVYHMUGvG807amcf41pCCLTwKjGcV1g7jV7ObO9PISZwumXtv6tV0T0BkhOzMlgJWW cmpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si19029573pfa.252.2019.05.07.05.28.25; Tue, 07 May 2019 05:28:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbfEGM1V (ORCPT + 99 others); Tue, 7 May 2019 08:27:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:55840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbfEGM1V (ORCPT ); Tue, 7 May 2019 08:27:21 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E807520825; Tue, 7 May 2019 12:27:17 +0000 (UTC) Date: Tue, 7 May 2019 08:27:16 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: Linus Torvalds , Andy Lutomirski , Linux List Kernel Mailing , Ingo Molnar , Andrew Morton , Andy Lutomirski , Nicolai Stange , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , the arch/x86 maintainers , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , Shuah Khan , Konrad Rzeszutek Wilk , Tim Chen , Sebastian Andrzej Siewior , Mimi Zohar , Juergen Gross , Nick Desaulniers , Nayna Jain , Masahiro Yamada , Joerg Roedel , "open list:KERNEL SELFTEST FRAMEWORK" , stable Subject: Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions Message-ID: <20190507082716.73cd5a01@gandalf.local.home> In-Reply-To: <20190507092731.GH2650@hirez.programming.kicks-ass.net> References: <20190502202146.GZ2623@hirez.programming.kicks-ass.net> <20190502185225.0cdfc8bc@gandalf.local.home> <20190502193129.664c5b2e@gandalf.local.home> <20190502195052.0af473cf@gandalf.local.home> <20190503092959.GB2623@hirez.programming.kicks-ass.net> <20190503092247.20cc1ff0@gandalf.local.home> <2045370D-38D8-406C-9E94-C1D483E232C9@amacapital.net> <20190506081951.GJ2606@hirez.programming.kicks-ass.net> <20190507085753.GO2606@hirez.programming.kicks-ass.net> <20190507092731.GH2650@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 7 May 2019 11:27:31 +0200 Peter Zijlstra wrote: > FWIW, both these trampolines assume a kprobe will not > int3_emulate_{push/call}(), for both bitnesses. > > But then; I'm thinking kprobes should be inspection only and not modify > things. So that might just be good enough. I believe there are kprobe calls that do modify things. Note, they can modify regs->ip. Kprobes sets the FTRACE_OPS_FL_IPMODIFY flag, thus they can never be put at the same location that is being live patched. -- Steve