Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2032503yba; Fri, 10 May 2019 05:20:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyepVzvr4ByiXt646jXyk/wZSuqnRPgS+DJzdog9X0fgvw0sIBH63I1fWLbdmrE+wZd0coV X-Received: by 2002:a63:c046:: with SMTP id z6mr13100314pgi.387.1557490820307; Fri, 10 May 2019 05:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557490820; cv=none; d=google.com; s=arc-20160816; b=YiWR9v9MZuTGPLiq0mbotoJeW/twRqITyt1FY9WeVwEmFbGRfZgh1FvZtYTZ+2J5bB 4cXeQxe+TwWAMb8kXdVCprqlB9i1gYmEmeZgF/A36O50rlDjCjdgnWOxjoXrc1/VtDKh nhsfhBIo/PhSTiJVk4pE5FufW+ymocWyx0NsAidhScE44UreMQP60/6ElE1BHFRJzpUS QQ1OntnvOsFb4CwJr231+mAmS8atxCGs21LzNNtLzHyJghiKHBBVj9pPZolmGi3Utgje sq58jZnsJj//pfJWiQr9P8uuWoudzhaWHTkMXQ8wZ4zDVNcbp46PlPOZ10hdylP7hQOR fjOw== 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=Zhu4heSzSl0zciCgHpqHGoWkGn39CgR6C2tptsMuYBM=; b=PCg96RLmoDf4vHzsG1SLc4hvdzS902hXV4KYHsA3uHZmSO9H5rR5FuMDiL+21YDAz7 Eyxyoew4keFEvxqA46vzYduD2rn63TOVsT+PsOmbzG39IMPnb0KDSpJKbyiQiCkWFF4s UFcehRpAu/yi6vnmjoZmNNxa6ReM5lq2/x17YHOBxnBmpzG2Z1ejuoiG8gBWIFbzk8wm lz1oiE6qA9akJn8Zg13AQ/iCtDf4l+vVofu9PKaQ9RC35RbS8vxBMVeqLhyehxzgCjVB P3NpCXyczon0IpHDC2zQtenxs/KtFV3luQZVyqnAjmQ2/DLwzQUkf0Bn2BQlecK+MQzF uK7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=NGB6qFBt; 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 w4si6590483pll.379.2019.05.10.05.20.02; Fri, 10 May 2019 05:20:20 -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=merlin.20170209 header.b=NGB6qFBt; 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 S1727263AbfEJMR5 (ORCPT + 99 others); Fri, 10 May 2019 08:17:57 -0400 Received: from merlin.infradead.org ([205.233.59.134]:38110 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727071AbfEJMR5 (ORCPT ); Fri, 10 May 2019 08:17:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=Zhu4heSzSl0zciCgHpqHGoWkGn39CgR6C2tptsMuYBM=; b=NGB6qFBt2V87eP39aFFQk44sG a1MQSCehHjm4bl0/c9oF9zFoQVP5qo5An72Q+stfXEUeRP6B1tX+JW20CZDdPUSSJXvNKhvjfvAGM gKxwWvJggOF/QrQllumc6FPxSjgDRLT1JeZFF+ECEKD2gfBADPwKAtRDXmsBqu8Xmj2a2nDbBe7Zw C7QAPemxyDPP9US4Vb+ObnU37O2j/yZT2ZfNwpFOz7r2UBZTccJ70hCMz77IvmRmew+FvQQ7Kjiob gPxPNEvdQtPXzJ6M72/5UmG5eeZ3cXboeJXR7q1CNNUKVoHNlv3TSnALh2+6C28w/yemcF/v2SZzi X8RLN0Img==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hP4Sn-0005Xp-Rz; Fri, 10 May 2019 12:17:22 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 544722029F1F3; Fri, 10 May 2019 14:17:20 +0200 (CEST) Date: Fri, 10 May 2019 14:17:20 +0200 From: Peter Zijlstra To: Masami Hiramatsu Cc: Steven Rostedt , Andy Lutomirski , Josh Poimboeuf , linux-kernel@vger.kernel.org, Linus Torvalds , Ingo Molnar , Andrew Morton , Andy Lutomirski , Nicolai Stange , Thomas Gleixner , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, 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 , linux-kselftest@vger.kernel.org Subject: Re: [PATCH 2/4] x86/kprobes: Fix frame pointer annotations Message-ID: <20190510121720.GT2589@hirez.programming.kicks-ass.net> References: <20190508115416.nblx7c2kocidpytm@treble> <20190508120416.GL2589@hirez.programming.kicks-ass.net> <20190508124248.u5ukpbhnh4wpiccq@treble> <20190508153907.GM2589@hirez.programming.kicks-ass.net> <20190508184848.qerg3flv3ej3xsev@treble> <20190509102030.dfa62e058f09d0d8cbdd6053@kernel.org> <20190509081431.GO2589@hirez.programming.kicks-ass.net> <81170F0B-A2BB-4CD6-A1B5-5E7E0DDBC282@amacapital.net> <20190509174316.pzuakeu657g3fnlm@home.goodmis.org> <20190510122103.5a7bc5416b7af96b27d4fab4@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190510122103.5a7bc5416b7af96b27d4fab4@kernel.org> 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 Fri, May 10, 2019 at 12:21:03PM +0900, Masami Hiramatsu wrote: > Yes, optprobe also has to save and restore the flags. > Above trampline is for kretprobe, which is placed at the function return, so > we don't have to care about flags. Sure, optprobe is actually special here, because it branches out at 'random' places and does indeed need to preserve flags. But both ftrace and retprobes are at C function call boundaries. Preserving flags doesn't make sense.