Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2930229pxa; Tue, 25 Aug 2020 07:14:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrTcgWZxPslklPJQdikJ/+pUXgbzk3ss2yhR3+JtC+xgOBN/5nzCe3EZvIhwZJ7vaLUjAG X-Received: by 2002:a50:cc92:: with SMTP id q18mr10468516edi.159.1598364849189; Tue, 25 Aug 2020 07:14:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598364849; cv=none; d=google.com; s=arc-20160816; b=uaxVoLL7FgdFjmVXsoxzGt7r0Y6+MUkGgrrhf39WOk5mvWfRjjpMJ203bnmRcwc3tm uvhF0JRQy9B8d7R0SWW3ky7e2lf9iNDn4Yp473bIJlBbZ4/WgJIY+MRwdjIPfkdGbybY MFvgbFIv7bAngRVJ3+C9R/b7y26T8ibAlObFzCk99nzvpJDZ7/qMOXO43rFgKkuJnNut PCNDOGuySFxf23Lgx3pQEh2eBh1pHu7yyHHDyeo72VS/diuhjHEi1Vet1u4smpyGyCmt uaDNxcvT8AC8tmWE01UsCWo7UIespZ/Lc49xVUvTGOoUHVXcplvA2lYpD8Nqmqrph3b0 e6oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=INfPDuBEQjuK5krf1yIfiQ/ZIRrfrYzboKUxI06QpW4=; b=I0cXzV40KckJyLW87SQc7p2xfV39SLEUgLt9wEMUK8Jw6BM24dHMQ+/1Uf7IcTfIDD nVeMHPHjMsyEucl2hjdCv9PEJFHGmrWOHIke/mPsR/6qtE6b89xHU7Zb2E8buYsLToiN IQmkz/17tL503Xgh+33xET6pkZhrFl8AjacI0DhUbAuSbGVeHV4eA25IdPBGs7lrjcT0 iks53hpp/eQZd5hDkovpaHPPYUaHFu3Ost4cHlJOiFoHqJkVY2B/2dxQ/hN3yMNWHNRb WiyiwbgRV89ZVC8KOBBulmTNbwp/Hpap3hD04qT3y5+aOIYWgNpN37NY5vTZ+753YxdO 24/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=jiUck+ag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si9725430ejb.515.2020.08.25.07.13.46; Tue, 25 Aug 2020 07:14:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=jiUck+ag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726306AbgHYOLI (ORCPT + 99 others); Tue, 25 Aug 2020 10:11:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726090AbgHYOLH (ORCPT ); Tue, 25 Aug 2020 10:11:07 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 681F1C061574 for ; Tue, 25 Aug 2020 07:11:06 -0700 (PDT) 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; bh=INfPDuBEQjuK5krf1yIfiQ/ZIRrfrYzboKUxI06QpW4=; b=jiUck+agvbnD0b3KBAvuaQJr7j YwD5yUrhIMvSvcghlJTopYjPYK5cuihbrnXWQc3uW/6fX3XGRKXlUjQc+Q6sOy3dXmv3pgbhBFN4+ n3Xyy7g7dzYgPWg5XWN2vCZj8mfJ1nql/c0N0O2DkM3OAKT18qxr7eE0k4kVyHqsla3RrrQnv2LF1 pAzJtfAyn7PVPGjsxLoaDUFMffcuQpTmPk92oZT0x7YxK5tSjKuz44dfjOqNDmZ5CKOfKTn8zhIVw 6FO5SujhsBEMtX4tpNbsJD9jgxqiYjYzto1+4zKWMs543uV0nzjHw9X04QFvD9MaMTo4ew2ZKPWBg Ktp0b6HA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kAZfA-0003FU-93; Tue, 25 Aug 2020 14:11:00 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 00D9330280E; Tue, 25 Aug 2020 16:10:58 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id AEF0629E76F4B; Tue, 25 Aug 2020 16:10:58 +0200 (CEST) Date: Tue, 25 Aug 2020 16:10:58 +0200 From: peterz@infradead.org To: Masami Hiramatsu Cc: "Eddy_Wu@trendmicro.com" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" , "David S. Miller" Subject: Re: x86/kprobes: kretprobe fails to triggered if kprobe at function entry is not optimized (trigger by int3 breakpoint) Message-ID: <20200825141058.GZ1362448@hirez.programming.kicks-ass.net> References: <8816bdbbc55c4d2397e0b02aad2825d3@trendmicro.com> <20200825005426.f592075d13be740cb3c9aa77@kernel.org> <7396e7b2079644a6aafd9670a111232b@trendmicro.com> <20200825151538.f856d701a34f4e0561a64932@kernel.org> <20200825120911.GX1362448@hirez.programming.kicks-ass.net> <20200825221555.a2d72c9754284feced6a8536@kernel.org> <20200825133005.GY1362448@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825133005.GY1362448@hirez.programming.kicks-ass.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2020 at 03:30:05PM +0200, peterz@infradead.org wrote: > On Tue, Aug 25, 2020 at 10:15:55PM +0900, Masami Hiramatsu wrote: > > OK, this looks good to me too. > > I'll make a series to rewrite kretprobe based on this patch, OK? > > Please, I'll send the fix along when I have it. One approach that I think might work nicely is trying to pull trampoline_handler() into core code (with a few arch helpers). Then we can replace that loop once, instead of having to go fix each architectures one by one. They're all basically the same loop after all.