From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,T_DKIMWL_WL_HIGH autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD792C04AAD for ; Tue, 7 May 2019 17:16:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EA1A2054F for ; Tue, 7 May 2019 17:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557249363; bh=1tjepSiisGYS9Zw/hu0W/Biyos5/k6p+iNt0W5aPIfw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=1mcgfSLct9DmkMli8BETKHcvAFjk2Ma7EWLIYxdae14pNZO8Vme/gtFn8U16NVZUJ BDmlDxD3JtV+x3V6GqkeUr9eWUHIzmkzN2AKnF3JbO3I2eOf5KqktiSktOELVg9pgk Rnz4YIIKLQf/yli+Km+SNU27o/v+z+2aAS5fdAqc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727152AbfEGRQC (ORCPT ); Tue, 7 May 2019 13:16:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726225AbfEGRQC (ORCPT ); Tue, 7 May 2019 13:16:02 -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 96E9B2053B; Tue, 7 May 2019 17:15:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557249361; bh=1tjepSiisGYS9Zw/hu0W/Biyos5/k6p+iNt0W5aPIfw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tbmhMejcd6UkaxE2Uc/e+c1SOvBxCdyGipmE+RR6jxCNZznKgtg3N7SWrzmejNe2S bZMTe28ufQmpnn4bWqCa625z50NVnKbbuUw22wxAqslIUJirfKKoK8urWAI8RWYkkf IQDEJkiufK4HEkdxeCGE4UoiFnMz/ZaM9a7soISg= Date: Wed, 8 May 2019 02:15:51 +0900 From: Masami Hiramatsu To: Masami Hiramatsu Cc: Steven Rostedt , 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 Subject: Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions Message-Id: <20190508021551.ca791c725cbddc2db541273f@kernel.org> In-Reply-To: <20190507231340.92b1b0665d1110f90929d878@kernel.org> References: <20190502181811.GY2623@hirez.programming.kicks-ass.net> <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> <20190507231340.92b1b0665d1110f90929d878@kernel.org> 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 Tue, 7 May 2019 23:13:40 +0900 Masami Hiramatsu wrote: > 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. Sorry, I misunderstood. I see the issue ( https://lkml.org/lkml/2019/5/1/497 ) and solutions on the thread. If we really need to fix this trace-livepatch combination issue, it may be good to backport to stable trees. >From this viewpoint, Linus's suggestion (no pt_reg changes on x86-32) seems to have a point. BTW, even though I think Peter's patch (unifying pt_regs behavior) will also be good for us for more general reason (not only for fixing actual issue). Thank you, -- Masami Hiramatsu