Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3884558yba; Tue, 7 May 2019 08:33:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJNLeD6WIcUAvrrW8lxOQK76E++Sh1H5l0TOTDwCtl7pfl/MlFVib60THiQ2WOkVd6W5pA X-Received: by 2002:a65:610a:: with SMTP id z10mr40427533pgu.54.1557243186390; Tue, 07 May 2019 08:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557243186; cv=none; d=google.com; s=arc-20160816; b=XKrLnNVcCkBlD13NAaRGRcMk8bLzazjQtzaZgF8fMeUW1YCaL5GoR6rkJhN0Xffm8e ehp7hp5honkMNNiHXxp+d2eICRnmEZxr8eXCkAToChcABqWZQGVFi8UhJogLNJzu3V7K e28bMrj/Ni5A9qryAkSBZOJVmwfNfLRuJkr0azS2ysOGjnO7aKi8YVI6ttREcO3zfOjb AQPONg7KIDBPC4iwV8UsThkRWZcVZcDcKZFeUw/fiSUGC51Ri7BNmyY/WzuLArBYBzr0 ipiNrO4rIOEPMCus3bRojIkm+cl6WoQfYXa6EgBcnnUdEGR5ZBZJTq/d4OiecQxl1j6g TaKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Y6ybn9R2wRwK7OVl8uatl/i1llM+QJoRgaCyqAFbo9Y=; b=PCgLVuEENVcJSdJ5YBZcFK2kL0dN7wVUFnC41wG1LLCzm8PL7x2vJBJhTTzoZ6Kqg/ YdyGjkOFF/s8dVR1BSEnF6NYGV3Fxfk85Z4LZ5a/ok1GoPsrfg2XqNxTHRQklFZkBmtn 5cI6FfBvQNwa7puQ01IHrS+QKDUwe8MhClCqdoF/MyiwZ5P5+wSifP7hulMLx3GnYMHD YokJl1yhkSHoIVX2hugKe09n7pDPO2l6sNMvZj36oUm03YhOzF2kDwJxUBYSTz3uYD7T WehNJBRBMADmmmpbTgRiU8i8Bqf0eXQ4jqv7PoVY6qI9dETuIAVWiBLkts2LsVeFlCD3 RRGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=BNzVqUAA; 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 h94si20552628plb.261.2019.05.07.08.32.50; Tue, 07 May 2019 08:33:06 -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=@linux-foundation.org header.s=google header.b=BNzVqUAA; 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 S1726679AbfEGPbh (ORCPT + 99 others); Tue, 7 May 2019 11:31:37 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:43877 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbfEGPbh (ORCPT ); Tue, 7 May 2019 11:31:37 -0400 Received: by mail-lf1-f66.google.com with SMTP id u27so11924250lfg.10 for ; Tue, 07 May 2019 08:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y6ybn9R2wRwK7OVl8uatl/i1llM+QJoRgaCyqAFbo9Y=; b=BNzVqUAAViERdEuxZy8DHUiuYxo8ddmm9cVx4BOchUH3WtVYroxRTUSipMK+LTDMnx G6Nz0qaFq78h9Jxdf15yovQ7B7GKRx+9GVUL2kenVn+ddQfRmu4UzyEd25IlQcp/jSGE dAIUJDF1c1Wz5T5Q+QRd4jWS9Etfzd3108pkw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y6ybn9R2wRwK7OVl8uatl/i1llM+QJoRgaCyqAFbo9Y=; b=bCmw6s3BSyRfjlUs/ktByJ4b4pBNwVGJAmfNmkyJ5xFbbwR5L3asgOHh3P/xiEu+W7 4jFwQPt0c2nPiYfocyPQOzvEv4O4HpyKOz/hdU8zAUoVZYMwbRDdLAywPJE9jrmXH9a7 5+HHmbZ4gtgP9qFmLLmMCmYRakp0dhhpwmmmRx5h9ztB1ibbGBDa3w1WPjzXOeH/62ny 4MFkGNSjnZRA8d8XgVnU2So3uf0StQm3PB2JO0y0arsWk3zB/2h3XwTe1ZiEX2Xh1qNh xW3eg3xmKv4bmkHFyhtA8vvdPQVHAEg7id2GbVrGmP0GK90B1gtFkTBThi4Gt7cBQlp7 kCXg== X-Gm-Message-State: APjAAAXPO8eCB36wAS577ueK/oLL0f27S0Gpmw0jCIWAUyk0hQmJRQli EyTHZy5SrxnvqZtWNG/HljqH+UwF1dc= X-Received: by 2002:ac2:53b2:: with SMTP id j18mr17591251lfh.78.1557243093971; Tue, 07 May 2019 08:31:33 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id m3sm3312502lfh.94.2019.05.07.08.31.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 08:31:32 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id r76so3670620lja.12 for ; Tue, 07 May 2019 08:31:31 -0700 (PDT) X-Received: by 2002:a2e:3e0e:: with SMTP id l14mr17667665lja.125.1557243091071; Tue, 07 May 2019 08:31:31 -0700 (PDT) MIME-Version: 1.0 References: <20190502181811.GY2623@hirez.programming.kicks-ass.net> <20190506145745.17c59596@gandalf.local.home> <20190506162915.380993f9@gandalf.local.home> <20190506174511.2f8b696b@gandalf.local.home> <20190506210416.2489a659@oasis.local.home> <20190506215353.14a8ef78@oasis.local.home> <20190506225819.11756974@oasis.local.home> <20190506232158.13c9123b@oasis.local.home> <20190507111227.1d4268d7@gandalf.local.home> In-Reply-To: <20190507111227.1d4268d7@gandalf.local.home> From: Linus Torvalds Date: Tue, 7 May 2019 08:31:14 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC][PATCH 1/2] x86: Allow breakpoints to emulate call functions To: Steven Rostedt Cc: 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 7, 2019 at 8:12 AM Steven Rostedt wrote: >> > Yes, band-aids are usually simpler than a proper fix. What? No/. My fix is the *proper* fix. PeterZ's is the bandaid. > We have 28 years > of hacks built on hacks. There's a lot of hacks in the C code to handle > the differences between the crappy way x86_32 does pt_regs and the > proper way x86_64 does them. You're confusing "reality": with "your dream world". They are different. The reality is that the i386 kernel stack is just how things work. End of story. The reality is that changing something fundamental like the kernel stack at this point for an architecture that will not change in the future is silly. The reality is that Peter's patch is much bigger than mine, because it needed a lot of other changes *because* it did that change. > To implement your way, we need to change how the int3 handler works. > It will be the only exception handler having to return regs, otherwise > it will crash. What? That's what the patch *does*. It's trivial. It is done. Linus