From: Yonghong Song Subject: Re: [PATCH][v3] uprobes/x86: emulate push insns for uprobe on x86 Date: Wed, 15 Nov 2017 09:25:05 -0800 Message-ID: <8b85fd71-a35a-bd36-1490-cc8fd0b4dad6@fb.com> References: <20171113221139.1516536-1-yhs@fb.com> <20171114155124.GB17667@redhat.com> <20171114160304.GA19323@redhat.com> <946788b4-e57b-c7c2-9ba8-3c6fe87c4af8@fb.com> <20171115154707.GB21275@redhat.com> <20171115170734.GA12415@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: , , , , , , , To: Oleg Nesterov Return-path: In-Reply-To: <20171115170734.GA12415@redhat.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 11/15/17 9:07 AM, Oleg Nesterov wrote: > On 11/15, Oleg Nesterov wrote: >> >> 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. > > OK, I did the check for you. > > uprobe_init_insn() doesn't fail but insn_init(x86_64 => 0) parse it as > single-byte insn with OPCODE1 == 0x41, so push_setup_xol_ops() doesn't > need to worry about compat tasks. > > In short, your "V2" should be fine except you can factor out > auprobe->push.ilen initialization (as you did in V3). Please send V4. Thanks a lot! I am just about to use inline asm or binary rewriter to create such a code for testing... I will send V4 shortly. > > Oleg. >