Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3797891yba; Tue, 7 May 2019 07:15:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTS3p2z9ZsyeGr2q4td9hjrW07ZPmSXWpCP3ykXICkjokKRqfQ1CK/ufSoF8LCDjWTVlPR X-Received: by 2002:a17:902:bc83:: with SMTP id bb3mr38222659plb.303.1557238553020; Tue, 07 May 2019 07:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557238553; cv=none; d=google.com; s=arc-20160816; b=tgj+68PdQ02Pn2hgYpDn+cjAptOoHL+6/kZAjJtxHKkppfiQqUoBeqe5un6GnzCc2R B/FF0EmU/PqHwzGBNG8ouyvZ/0BKtXko24z/ay0I1epbYQrduO5OAYGlqpOHKE/zWFKi nE/C9dyAQyAo/9u+8KgbUp614ap0UyulNjTlnG6xCILpCcyfA3Z1T+fM1w+gVXlieb1/ RQgBsOhhWNLcXATPSFYJh+UBvXCIrABHgvSAo3thaGdQBs9sfopJL6vW4fTxhE6vuS1q NMps8rZzlFTcfBPINZ2if3qIpbF8XAWaluTpUmMntcWillhwY6h+OpfdvGgkdl/BugiF vi5w== 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 :dkim-signature; bh=YPGVTg6O6ttY2bVtDmnEOU9tIMe08nS+FEt4qq4rwRI=; b=rql2poKT+UyAEx6MslmoFFcnDAsI59OzQUbMQq4a7nt5CaC4OsrOMuvPESwzureQHM 4WE4Z4SgZi6BlulYfVzEdAKW2dcFlauGPy1lPgAHAi6HHgmkcwJj/LN7TtxgEcf/YJnt m/XnOXuOF67tOpgEiX7D1iPQMQy3yGccC2Glxlx6VLDx8Y7Cpv+5Qa4VNr4BMqsn1Dj3 w8arXNDTf9UdGpp8fMelHbCe4LqBXH+s4N6j5fO0dqS7OUHyYfH8E335MSO0DOfCCDkb IGBcR01Neiy1tl3ii1EYv+4JnLe4Yc2r/uoYqNr52QgDfEgtkquOzjWuyZ4562LSLnwY cHoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lxB89Naz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si131076pgh.410.2019.05.07.07.15.36; Tue, 07 May 2019 07:15:53 -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; dkim=pass header.i=@kernel.org header.s=default header.b=lxB89Naz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726805AbfEGONu (ORCPT + 99 others); Tue, 7 May 2019 10:13:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:33576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbfEGONt (ORCPT ); Tue, 7 May 2019 10:13:49 -0400 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (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 143D62087F; Tue, 7 May 2019 14:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557238428; bh=mjdFGwwOnKVIrVi45uvuiRFe3/cX2qeCwTGz3dUy0Kg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lxB89NazciAzmWLPcaYInGMewi23ldKwznAmX9DJnMQqyTZbnJqAs1Z9etpVbAI5a qKcSGIYw5ona7JNwl1DubsRno1UQqfUO6QCjfaWmCcGAR7iBgeoNzRtrCHr8dAfLwA WgNqsCmaTdIXAoLSULY5EtT6I151yfQfDpJe4tnQ= Date: Tue, 7 May 2019 23:13:40 +0900 From: Masami Hiramatsu To: Steven Rostedt Cc: Linus Torvalds , Peter Zijlstra , 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 , Masami Hiramatsu Subject: Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions Message-Id: <20190507231340.92b1b0665d1110f90929d878@kernel.org> In-Reply-To: <20190506174511.2f8b696b@gandalf.local.home> References: <20190502181811.GY2623@hirez.programming.kicks-ass.net> <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> <20190506095631.6f71ad7c@gandalf.local.home> <20190506130643.62c35eeb@gandalf.local.home> <20190506145745.17c59596@gandalf.local.home> <20190506162915.380993f9@gandalf.local.home> <20190506174511.2f8b696b@gandalf.local.home> X-Mailer: Sylpheed 3.5.1 (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 Mon, 6 May 2019 17:45:11 -0400 Steven Rostedt wrote: > If we go with Peter's patch, I can make this code much more sane, and > not have to worry about having ®s->sp be at the top of the stack. I > could simply, just push everything in the order of pt_regs and call the > handler. Hi Steve, I need to catch up with the origin of this series, but it seems also good to optprobe which is doing similar trick on pt_regs. If we can assume that int3 pt_regs can have a gap, optprobe can also make a gap, and it can be also used for storing destination address. Thank you, -- Masami Hiramatsu