Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4015002yba; Tue, 7 May 2019 10:40:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZArrQ57Wms9SY5IjzyN+zW+cO/CxSoQ0zI8ZIFph8L1rmGHjnzir5k7FSFLF5aBinxiRd X-Received: by 2002:a17:902:bcc6:: with SMTP id o6mr40032579pls.275.1557250815878; Tue, 07 May 2019 10:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557250815; cv=none; d=google.com; s=arc-20160816; b=GAkphenFxj3B5eIblHFHJH3E5X75Rf4o2wD4cf+iGeWOv8ZZ0BrMBgNEfBtV86Eccb c1wEDCyc5FdKdtxO6hk1zLQB5k+TMuUBj0KU5ONmTWfv3+o8Fg87Uhvii49kOwuiL6az Od6gOct8PA3hOtHUI8+xAQc4eWpeltTHDM2twJHQvt8kWag8EiNptj6oC7JxXn6BnkXR j162Hw6ncPp80TKmMTfb6m63nQnn88eRrZqyus9xUNpYx4b3zHQBPuvnh/23obb57pJK WAYZMDbMLJQ9vmeRtEmyPcCzM6fCjbXl6rifAvtQAkzAZoKlNbg/Tp7yvpH4M3CkNEAm UktQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=JOIMQ2PwgSE1LhNwkWDe6YdOB+QHfRQcSFVAFTagnHc=; b=QAMdMq2lStcF0Hjpb/Z8iCLOHVgHMmZMw31q8T6V+k7I3WzAlDzWcar+czCW0wLaS9 eWVEwykIo1xxWxXaK/BTL6WypnX3E8s3Y1aJr6qH9JD9QsHglUj7PQF+B3Cq6lE/j7uO dPcp1FQVhNzlOn7EcYdEJzrYEtqymDzxZM0mtYVNqMp7sHTlDRaZHnp1I68f+a/fRkKi IJb8tdu/arPLIPclpiD6PweaBH3gD8v50WtdHIwD0ogNKftvDIbg4heT8oNx51P1LYvn 4yN2A0XuFPjQfnee5NgMefhGln7cMcHqFlZYhr2uL6gIZnKNEJTi0MZKHX4XBcSOiFlR HmuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=sb4uWI6E; 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 co15si21595830plb.330.2019.05.07.10.40.00; Tue, 07 May 2019 10:40:15 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=sb4uWI6E; 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 S1727185AbfEGRix (ORCPT + 99 others); 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).