From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH][v3] uprobes/x86: emulate push insns for uprobe on x86 Date: Wed, 15 Nov 2017 16:47:07 +0100 Message-ID: <20171115154707.GB21275@redhat.com> References: <20171113221139.1516536-1-yhs@fb.com> <20171114155124.GB17667@redhat.com> <20171114160304.GA19323@redhat.com> <946788b4-e57b-c7c2-9ba8-3c6fe87c4af8@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: mingo@kernel.org, tglx@linutronix.de, peterz@infradead.org, linux-kernel@vger.kernel.org, x86@kernel.org, netdev@vger.kernel.org, ast@fb.com, kernel-team@fb.com To: Yonghong Song Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34320 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932795AbdKOPrL (ORCPT ); Wed, 15 Nov 2017 10:47:11 -0500 Content-Disposition: inline In-Reply-To: <946788b4-e57b-c7c2-9ba8-3c6fe87c4af8@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: On 11/14, Yonghong Song wrote: > > > On 11/14/17 8:03 AM, Oleg Nesterov wrote: > >Ah, no, sizeof_long() is broken by the same reason, so you can't test it... > > Right. I hacked the emulate_push_stack (original name: push_ret_address) > with sizeof_long = 4, and 32bit binary uprobe works fine on x86_64 platform > then... OK, > >OK, I'll try to do something tomorrow, then we will see what can we do > >with your patch... > > Thanks for reviewing! I will wait for your further comments/direction > before next step. Oh. tomorrow, I promise. Sorry I was bit busy today... > > > >But it would be nice if you can check what uprobe_init_insn() does in this > >case, see above. > > As mentioned in my previous email, for 32bit application, > compiler won't generate "push %r8" as "%r8" is only available on > x86_64 platform. But this is irrelevant, see my previous email. So please, check if uprobe_init_insn() fails or not in this case. After that we will know whether your patch needs the additional is_64bit_mm() check in push_setup_xol_ops() or not. Oleg.