Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3992831yba; Tue, 7 May 2019 10:17:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7lqLmvz7uI//QXEBAOLRwn91tI9Wp9oLSgtqysSZbcCpv0/pi0b9jjCrPY287mNwGq+jB X-Received: by 2002:a62:e201:: with SMTP id a1mr42099700pfi.67.1557249465197; Tue, 07 May 2019 10:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557249465; cv=none; d=google.com; s=arc-20160816; b=qyvCG++8paG+2RoSo6HWp+6tJYRkSdA/ouasoOV77dYe1a2dUGhUuLSZA6ETpdtdeX IqxMhcFCW1/a9If95hj9LRf/j6+ZwU/gA7rLQ+JfsPLAGRh5P4dpI5DeW74O2OdYfJNx tQT1tm5jguTeEPFTOc0VYFPLrG4IWSlsKoUbutR1rKhtCcbys7FwinuoVlstRkdW9L1T ZloY/rEcphKfdJGbuwvfkK9it7i1pCgYW9MS3USXYZSelQLwNE7oVh4QoqQxoZqJf6kt kpRN2XI5eo87Td9iqzIiwqbshZRj1oCI9TDaiYwL5X+qbvLjsWbvpkQ0Z5a8DtnT3AA9 Q/vA== 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=35SwpxNlaHYuHV9PKrXaqUXH76eNMf5dAx18X63TxYc=; b=m68I2xjCay6+xcEMimkDkmZBk9tyOVazWJImZ1Dm1DjOY1OSS0v7RDCmqZH/bJ8gew BaIUIlOaxypIusx3yMYT3LXPQsqt6KtYwMUL/xG4vCn5ER7KO5VhZKXO7qVRcwxe7Smb aq8G7oMVd7T8G/6+scIDk8vAYvzAFa76EjOWgB/F/5MeNLqG8OAxRksOjLVryThEOVT6 29ke/bqSnXYUNXmboWmki53cDqZI71H3FCX0kqkMtLzoSFLecPHvGVsoXBW3STUSMUcN l6FKqho40Nn1Bw+wo++kDANmjFKxhVh9etS1DOzntaDGVdOoWXwqLg9IGA9SMDcZIT7m KheQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tbmhMejc; 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 a4si6930720pls.189.2019.05.07.10.17.29; Tue, 07 May 2019 10:17:45 -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=tbmhMejc; 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 S1726985AbfEGRQC (ORCPT + 99 others); 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