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=-2.2 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT 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 0F793C04AAD for ; Tue, 7 May 2019 17:38:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D993F205C9 for ; Tue, 7 May 2019 17:38:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="sb4uWI6E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbfEGRix (ORCPT ); Tue, 7 May 2019 13:38:53 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48376 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbfEGRiw (ORCPT ); Tue, 7 May 2019 13:38:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JOIMQ2PwgSE1LhNwkWDe6YdOB+QHfRQcSFVAFTagnHc=; b=sb4uWI6EOfMhfhDCgpKA1PsTt 7AhxjT2DW9CBAQi3QL28CeYK4IdpuEgwnbOH7iFySchxnUvQeMB5XWF7okxzl8rcTv0UfkZqZIZgP +VTGovbm0Nrgrhzot5tqQS7B4Qz5sOAs5QQoT9WLkUcOLm2z4uZ3WVDfGMg+E494qMmCmHSh9IhuK sCNzI0WjeVto0407AhNmb4eni+BMJHFALTFvTKoxt5Ak7fwsvdcvfxHIA2gN82rLNcp70nc8lx6Ul WqJH7yyS5UnLJnUXruUW0UaNb0SzWWtj6c+cT1YIoPCqOJE6YuoYPdPLam2cVWhhRBfmZksBl7MfW KDVqGkpcA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hO42w-0000jD-Rr; Tue, 07 May 2019 17:38:31 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 12157207E85C5; Tue, 7 May 2019 19:38:29 +0200 (CEST) Date: Tue, 7 May 2019 19:38:29 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Steven Rostedt , 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: <20190507173829.GY2606@hirez.programming.kicks-ass.net> References: <20190506225819.11756974@oasis.local.home> <20190506232158.13c9123b@oasis.local.home> <20190507111227.1d4268d7@gandalf.local.home> <20190507163440.GV2606@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 07, 2019 at 10:08:50AM -0700, Linus Torvalds wrote: > On Tue, May 7, 2019 at 9:34 AM Peter Zijlstra wrote: > > > > Would you consider my approach later on, under the guise of unification? > > WHY? > > The *only* advantage of your patch is that trivial "look up kernel stack" macro. > > Seriously. There's absolutely nothing else. The ftrace_regs_caller, the kprobe tramplines, the unwinder, they all have 'funny' bits because pt_regs isn't 'right'. > So the whole "let's clean up x86-32 to look like x86-64, which got > things right" is to me a completely bogus argument. x86-64 got the > "yes, push ss/sp unconditionally" part right, but got a lot of other > things horribly wrong. So this is all just one small detail that > differs, across two architectures that are similar but have very > different warts. It's a detail that leaks into the C code. Yes SWAPGS is horrible crap, but C code doesn't much care. The partial pt_regs thing otoh comes up a fair number of times. Anyway; I think we're at the point where we'll have to agree to disagree (or maybe slightly past it). From mboxrd@z Thu Jan 1 00:00:00 1970 From: peterz at infradead.org (Peter Zijlstra) Date: Tue, 7 May 2019 19:38:29 +0200 Subject: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions In-Reply-To: References: <20190506225819.11756974@oasis.local.home> <20190506232158.13c9123b@oasis.local.home> <20190507111227.1d4268d7@gandalf.local.home> <20190507163440.GV2606@hirez.programming.kicks-ass.net> Message-ID: <20190507173829.GY2606@hirez.programming.kicks-ass.net> On Tue, May 07, 2019 at 10:08:50AM -0700, Linus Torvalds wrote: > On Tue, May 7, 2019 at 9:34 AM Peter Zijlstra wrote: > > > > Would you consider my approach later on, under the guise of unification? > > WHY? > > The *only* advantage of your patch is that trivial "look up kernel stack" macro. > > Seriously. There's absolutely nothing else. The ftrace_regs_caller, the kprobe tramplines, the unwinder, they all have 'funny' bits because pt_regs isn't 'right'. > So the whole "let's clean up x86-32 to look like x86-64, which got > things right" is to me a completely bogus argument. x86-64 got the > "yes, push ss/sp unconditionally" part right, but got a lot of other > things horribly wrong. So this is all just one small detail that > differs, across two architectures that are similar but have very > different warts. It's a detail that leaks into the C code. Yes SWAPGS is horrible crap, but C code doesn't much care. The partial pt_regs thing otoh comes up a fair number of times. Anyway; I think we're at the point where we'll have to agree to disagree (or maybe slightly past it). From mboxrd@z Thu Jan 1 00:00:00 1970 From: peterz@infradead.org (Peter Zijlstra) Date: Tue, 7 May 2019 19:38:29 +0200 Subject: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions In-Reply-To: References: <20190506225819.11756974@oasis.local.home> <20190506232158.13c9123b@oasis.local.home> <20190507111227.1d4268d7@gandalf.local.home> <20190507163440.GV2606@hirez.programming.kicks-ass.net> Message-ID: <20190507173829.GY2606@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" Message-ID: <20190507173829.DfS3LM8ESO5xjPXHV0H1krbt5Cgf3F_W2oYst5vnUzQ@z> On Tue, May 07, 2019@10:08:50AM -0700, Linus Torvalds wrote: > On Tue, May 7, 2019@9:34 AM Peter Zijlstra wrote: > > > > Would you consider my approach later on, under the guise of unification? > > WHY? > > The *only* advantage of your patch is that trivial "look up kernel stack" macro. > > Seriously. There's absolutely nothing else. The ftrace_regs_caller, the kprobe tramplines, the unwinder, they all have 'funny' bits because pt_regs isn't 'right'. > So the whole "let's clean up x86-32 to look like x86-64, which got > things right" is to me a completely bogus argument. x86-64 got the > "yes, push ss/sp unconditionally" part right, but got a lot of other > things horribly wrong. So this is all just one small detail that > differs, across two architectures that are similar but have very > different warts. It's a detail that leaks into the C code. Yes SWAPGS is horrible crap, but C code doesn't much care. The partial pt_regs thing otoh comes up a fair number of times. Anyway; I think we're at the point where we'll have to agree to disagree (or maybe slightly past it).